Okay - we’re having an weird issue when making outbound calls and to make things worse it’s sporadic.
FreePBX Distro - Asterisk 15
Twilio trunks (and I’ve got them helping troubleshoot).
When we make a call out there can be up to a 30 second delay before the call actually connects. Yes, we press # to initiate the call so it’s not a dial string issue. When looking at the logs, we get the error about retransmission issues and the system complains about congestion and rolls to the next trunk. Sometimes it will connect when rolling and sometimes it has to timeout and roll again, causing a longer delay.
The system sits behind a hardware firewall, the software firewall in FreePBX has been removed all together.
Inbound calls get routed fine and very quickly. Twilio is telling me they are not seeing timeouts - but I’m still questioning them on certain calls.
This one is really driving me crazy and we’re getting frequent complaints.
Any and all help would be greatly appreciated.
Excerpt of log (cleansed):
[2018-06-13 17:20:27] WARNING[23547] chan_sip.c: Retransmission timeout reached on transmission [email protected]:5060 for seqno 102 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response
[2018-06-13 17:20:27] WARNING[23547] chan_sip.c: Hanging up call [email protected]:5060 - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] app_dial.c: SIP/Twilio-Outbound-00001e6c is circuit-busy
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] app_dial.c: Everyone is busy/congested at this time (1:0/1/0)
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:33] NoOp("SIP/151-00001e6b", "Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 18") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:34] GotoIf("SIP/151-00001e6b", "1?continue,1:s-CONGESTION,1") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx_builtins.c: Goto (macro-dialout-trunk,continue,1)
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [continue@macro-dialout-trunk:1] NoOp("SIP/151-00001e6b", "TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 18 - failing through to other trunks") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [continue@macro-dialout-trunk:2] ExecIf("SIP/151-00001e6b", "1?Set(CALLERID(number)=151)") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [xxxxxxxxxx@from-internal:7] Macro("SIP/151-00001e6b", "dialout-trunk,9,+xxxxxxxxxxx,,on") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:1] Set("SIP/151-00001e6b", "DIAL_TRUNK=9") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:2] ExecIf("SIP/151-00001e6b", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:3] GosubIf("SIP/151-00001e6b", "0?sub-pincheck,s,1()") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:4] ExecIf("SIP/151-00001e6b", "0?Set(CALLERID(num)=151)") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:5] GotoIf("SIP/151-00001e6b", "0?disabletrunk,1") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:6] Set("SIP/151-00001e6b", "DIAL_NUMBER=+xxxxxxxxxx") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:7] Set("SIP/151-00001e6b", "DIAL_TRUNK_OPTIONS=HhTtr") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:8] Set("SIP/151-00001e6b", "OUTBOUND_GROUP=OUT_9") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:9] Set("SIP/151-00001e6b", "DIAL_TRUNK_OPTIONS=T") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:10] GotoIf("SIP/151-00001e6b", "1?nomax") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx_builtins.c: Goto (macro-dialout-trunk,s,12)
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:12] GotoIf("SIP/151-00001e6b", "0?skipoutcid") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:13] Macro("SIP/151-00001e6b", "outbound-callerid,9") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:1] NoOp("SIP/151-00001e6b", "151") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:2] NoOp("SIP/151-00001e6b", "") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:3] NoOp("SIP/151-00001e6b", "off") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:4] ExecIf("SIP/151-00001e6b", "0?Set(CALLERPRES(name-pres)=)") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:5] ExecIf("SIP/151-00001e6b", "0?Set(CALLERPRES(num-pres)=)") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:6] ExecIf("SIP/151-00001e6b", "0?Set(REALCALLERIDNUM=151)") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:7] ExecIf("SIP/151-00001e6b", "0?Set(AMPUSER=151)") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:8] GotoIf("SIP/151-00001e6b", "1?normcid") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx_builtins.c: Goto (macro-outbound-callerid,s,12)
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:12] Set("SIP/151-00001e6b", "USEROUTCID=") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:13] Set("SIP/151-00001e6b", "EMERGENCYCID=") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:14] Set("SIP/151-00001e6b", "TRUNKOUTCID=") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:15] GotoIf("SIP/151-00001e6b", "1?trunkcid") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx_builtins.c: Goto (macro-outbound-callerid,s,20)
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:20] ExecIf("SIP/151-00001e6b", "0?Set(CALLERID(all)=)") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:21] ExecIf("SIP/151-00001e6b", "0?Set(CALLERID(all)=)") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:22] ExecIf("SIP/151-00001e6b", "0?Set(CALLERID(all)=)") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:23] ExecIf("SIP/151-00001e6b", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:24] ExecIf("SIP/151-00001e6b", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:25] Set("SIP/151-00001e6b", "CDR(outbound_cnum)=151") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-outbound-callerid:26] Set("SIP/151-00001e6b", "CDR(outbound_cnam)=Caller ID") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:14] GosubIf("SIP/151-00001e6b", "0?sub-flp-9,s,1()") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:15] Set("SIP/151-00001e6b", "OUTNUM=+xxxxxxxxxxx") in new stack
[2018-06-13 17:20:27] VERBOSE[17372][C-000005b8] pbx.c: Executing [s@macro-dialout-trunk:16] Set("SIP/151-00001e6b", "custom=SIP/Twilio-Trunk-1-Oregon") in new stack