How can I play custom message when the trunk is in "486 busy here"?

Hi,

I have a similar situation as in below thread, and I observe receiving “sorry the call cannot be completed” male voice message whenever SIP trunk vendor reply back with SIP 486 status.

I learned the message is played from far end call server whenever far-end line is filled up so it is not the issue of neither our PBX nor our SIP trunk provider. But the played message is not so clear to our internal user why the phone is terminated after the message.

So I am thinking somehow to override the played message to custom message so that our internal user understand the cause of issue is on far end, not our phone system. (instead of “sorry the cannot be completed” male voice, “Far end line is busy and can not reach out at this time”, etc.)

Any comment / advice would be highly appreciated!

Many thanks in advance,

Platform:
FreePBX: 13.0.195.1
Asterisk: 13.19.2

Settings > Route Congestion Messages, you can change it there.

https://wiki.freepbx.org/display/FPG/Route+Congestion+Messages (seems like this page can use an update)

There is likely no practical way to avoid playing the unwanted message – it is delivered (and played) as ‘early media’ before the 486 is sent. You wouldn’t want to replace all early media; ringback tone is often delivered that way, as well as useful announcements such as “number has been changed, the new number is …”, cellular phone out of range, etc.

You could play your announcement after the unwanted one, though you would need some custom dial plan and possibly some custom code. Normally, a 486 plays a ‘busy signal’; are you hearing that (after the unwanted message)? If so, you could replace that audio file with your message, but that would be heard on all line busy conditions, including internal calls if voicemail and call waiting are disabled.

Hi Stewart1,

Thank you, interesting thing was we did not hear ‘busy signal’, SIP trunk immediately responded back with busy status, (SIP trunk vendor engineer was monitoring while I was calling this particular number and saw SIP 486 on his console). Funny part was that when I luckily established the call to this particular number, SIP Trunking vendor engineer was also making a call to the number while I was talking and he received SIP 486. Therefore, we are guessing perhaps callee side can only accept 1 line at a time.

[2018-07-09 13:28:43] VERBOSE[32121][C-000009eb] pbx.c: Executing [[email protected]:23] Dial(“SIP/”, “SIP/SIP_Trunk_Junction/,300,Tt”) in new stack
[2018-07-09 13:28:43] VERBOSE[32121][C-000009eb] netsock2.c: Using SIP RTP TOS bits 184
[2018-07-09 13:28:43] VERBOSE[32121][C-000009eb] netsock2.c: Using SIP RTP CoS mark 5
[2018-07-09 13:28:43] VERBOSE[32121][C-000009eb] app_dial.c: Called SIP/SIP_Trunk_Junction/
[2018-07-09 13:28:48] VERBOSE[32121][C-000009eb] app_dial.c: SIP/SIP_Trunk_Junction-00001285 is making progress passing it to SIP/
[2018-07-09 13:28:48] VERBOSE[32121][C-000009eb] app_dial.c: SIP/SIP_Trunk_Junction-00001285 is ringing
[2018-07-09 13:29:03] VERBOSE[32121][C-000009eb] app_dial.c: SIP/SIP_Trunk_Junction-00001285 requested media update control 26, passing it to SIP/
[2018-07-09 13:29:03] VERBOSE[32121][C-000009eb] app_dial.c: SIP/SIP_Trunk_Junction-00001285 is making progress passing it to SIP/
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] app_dial.c: SIP/SIP_Trunk_Junction-00001285 redirecting info has changed, passing it to SIP/
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] app_dial.c: SIP/SIP_Trunk_Junction-00001285 is busy
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] app_dial.c: Everyone is busy/congested at this time (1:1/0/0)
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] pbx.c: Executing [[email protected]:24] NoOp(“SIP/”, “Dial failed for some reason with DIALSTATUS = BUSY and HANGUPCAUSE = 19”) in new stack
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] pbx.c: Executing [[email protected]:25] GotoIf(“SIP/”, “0?continue,1:s-BUSY,1”) in new stack
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] pbx_builtins.c: Goto (macro-dialout-trunk,s-BUSY,1)
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] pbx.c: Executing [[email protected]:1] NoOp(“SIP/”, “Dial failed due to trunk reporting BUSY - giving up”) in new stack
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] pbx.c: Executing [[email protected]o-dialout-trunk:2] PlayTones(“SIP/”, “busy”) in new stack
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] pbx.c: Executing [[email protected]:3] Busy(“SIP/”, “20”) in new stack
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] app_macro.c: Spawn extension (macro-dialout-trunk, s-BUSY, 3) exited non-zero on ‘SIP/’ in macro ‘dialout-trunk’
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] pbx.c: Spawn extension (from-internal, 9, 6) exited non-zero on ‘SIP/’
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] pbx.c: Executing [[email protected]:1] Macro(“SIP/”, “hangupcall”) in new stack
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] pbx.c: Executing [[email protected]:1] GotoIf(“SIP/”, “1?theend”) in new stack
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] pbx.c: Executing [[email protected]:3] ExecIf(“SIP/”, “0?Set(CDR(recordingfile)=)”) in new stack
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] pbx.c: Executing [[email protected]:4] Hangup(“SIP/”, “”) in new stack
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/’ in macro ‘hangupcall’
[2018-07-09 13:29:08] VERBOSE[32121][C-000009eb] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/’

I don’t mind play custom voice prompt right before hangup, but I prefer to make it simple, and wondering what the best way of doing it.

Hi PitzKey,

Thanks for your comment! My Route Congestion module setting is in default, but by looking at the asterisk log, Trunk between my PBX and SIP trunk vendor is not busy, and I assume I will hear Alison’s female voice prompt if the trunk is in congested case.

In my case, I hear male voice saying “sorry the call cannot be completed” so I wonder this module tweak will solve my problem. (SIP trunking vendor engineer said the voice prompt is actually coming from far end side)

I personally would investigate if the Male voice is early media originating from the far end in the 15 seconds between

2018-07-09 13:28:48] VERBOSE[32121][C-000009eb] app_dial.c: SIP/SIP_Trunk_Junction-00001285 is ringing
[2018-07-09 13:29:03] VERBOSE[32121][C-000009eb] app_dial.c: SIP/SIP_Trunk_Junction-00001285 requested media update control 26, passing it to SIP/

tcpdump/wireshark/tshark might be useful to so identify . .

2 Likes

I agree with @dicko . Perhaps easier than tcpdump, make a test call and use your smartphone’s clock to see when the message is played, then compare with the Asterisk log. (Your smartphone and Asterisk are likely within one second of the correct time. If needed, go into the clock app settings to enable display of seconds.)

I made some test calls to see why the PlayTones(“SIP/”, “busy”) didn’t play, using the number +1 909 661 0001, which should consistently give a 486 (though without an announcement). It appears that before the tones can be played, Busy(“SIP/”, “20”) is executed, which sends a 486 to the extension. In response, the Yealink phone (T26P) plays busy tone for three seconds and also displays the busy condition visually:
41
If your extensions do something similar, I don’t see why users would be confused.

If you still want to add a custom announcement, try copying the macro dialout-trunk to extensions_override_freepbx.conf and replacing the PlayTones statement in s-BUSY with a Playback of the desired announcement.

2 Likes

Many thanks Dicko (as always!) and Stewart1 for your insight!

I am still investigating why my Trunk respond back with “busy”, I am looking at /var/log/asterisk/full log now and , some calls only takes 6 seconds to receive “busy” status from my SIP trunk, which I feel it is a bit fast response. My SIP trunk vendor engineer is digging into possible cause, I will update if he finds anything new on his side.

Meanwhile, I would like to ask a question, what will “Optional Destination on Congestion” field will do under Connectivity > Outbound Routes setting? It is currently set to “Normal Congestion”, (default, I did not touch the setting) but is this a triggering condition when my trunk respond back with “busy”? (such as “SIP/SIP_Trunk_Junction-00001285 is busy”)

image

Hi Stewart1,

I tried +1 909 661 0001 number and what I got was “Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 38”, I’ve heard Alison’s “all-circuits-busy-now” voice.

I need to somehow create the test environment so that [email protected] will be played. :slight_smile:

   -- SIP/SIP_Trunk_Junction-00001376 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Executing [[email protected]:24] NoOp("SIP/<extension>-00001375", "Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 38") in new stack
    -- Executing [[email protected]:25] GotoIf("SIP/<extension>-00001375", "0?continue,1:s-CONGESTION,1") in new stack
    -- Goto (macro-dialout-trunk,s-CONGESTION,1)
    -- Executing [[email protected]:1] Set("SIP/<extension>-00001375", "RC=38") in new stack
    -- Executing [[email protected]:2] Goto("SIP/<extension>-00001375", "38,1") in new stack
    -- Goto (macro-dialout-trunk,38,1)
    -- Executing [[email protected]:1] Goto("SIP/<extension>-00001375", "continue,1") in new stack
    -- Goto (macro-dialout-trunk,continue,1)
    -- Executing [[email protected]:1] NoOp("SIP/<extension>-00001375", "TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 38 - failing through to other trunks") in new stack
    -- Executing [[email protected]:2] ExecIf("SIP/<extension>-00001375", "1?Set(CALLERID(number)=<extension>)") in new stack
    -- Executing [[email protected]:7] Macro("SIP/<extension>-00001375", "outisbusy,") in new stack
    -- Executing [[email protected]:1] Progress("SIP/<extension>-00001375", "") in new stack
    -- Executing [[email protected]:2] GotoIf("SIP/<extension>-00001375", "0?emergency,1") in new stack
    -- Executing [[email protected]:3] GotoIf("SIP/<extension>-00001375", "0?intracompany,1") in new stack
    -- Executing [[email protected]:4] Playback("SIP/<extension>-00001375", "all-circuits-busy-now&please-try-call-later, noanswer") in new stack
 

Route Congestion Messages can differentiate between ISDN causes 18 and 19 ( no answer) and ISDN cause 28 (incomplete) you have Cause 38 “Network out of order” , currently this is not handled individually hence the generic “all circuits are busy”, but you could re-write your macro-dialout-trunk to intercept that cause and send it werever.

1 Like

Hi Dicko,

Oh, I see under Setting > Router Congestion Messages > Trunk Failures > No Answer!
Actually, I would like to send custom announcement for the HANGUPCAUSE=19, I will use the module to set the custom announcement. I will post if it works. Thank you for your advice!!!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.