No outbound calls from SIP trunk devices

I have a sip trunk Asterisk server (Toolvox) connected a main PBX. Devices registered to the main PBX are working normally. However, calls from sips trunk devices are getting all circuits are busy message.

Trunk setting from Toolvox.
host=(Main PBX)
type=peer
insecure=invite
qualify=yes
context=from-internal
canreinvite=no

Trunk Setting to the main PBX:
Incoming
type=user
qualify=yes
insecure=very
host=(Toolvox Server)
context=from-trunk
canreinvite=no

Outgoing
type=peer
qualify=yes
insecure=very
host=(Toolvox server)
context=from-internal
canreinvite=no

Dialing out from Toolvox will cause hangup - 17
I can see from Toolvox CLI calls are generating and passing to the main PBX. I can also see on main PBX CLI that the call from Toolvox is recognized, passing through a correct outbound route, then the call hung there.

Call flow that is not working: Calls generate from Toolvox > pass to main PBX > generate outbound call to external number.

Troubleshooting: General call from main PBX devices > outbound to external number is working
Calls generate from Toolvox > pass to main PBX > ring to internal device is working

Blockquote
== Spawn extension (from-digital, 6616757583, 1) exited non-zero on ‘DAHDI/i1/6616757583-8’
– DAHDI/i1/6616757583-8 Internal Gosub(func-apply-sipheaders,s,1(1)) complete GOSUB_RETVAL=
– Requested transfer capability: 0x00 - SPEECH
– Called DAHDI/G0/6616757583
– DAHDI/i1/6616757583-8 is proceeding passing it to Local/6616757583@from-internal-00000030;2
– Local/6616757583@from-internal-00000030;1 is proceeding passing it to Local/FMGL-6616757583#@from-internal-0000002f;2
– Span 1: Channel 0/23 got hangup request, cause 17
– DAHDI/i1/6616757583-8 is busy
– Hungup ‘DAHDI/i1/6616757583-8’
== Everyone is busy/congested at this time (1:1/0/0)
– Executing [s@macro-dialout-trunk:28] NoOp(“Local/6616757583@from-internal-00000030;2”, “Dial failed for some reason with DIALSTATUS = BUSY and HA NGUPCAUSE = 17”) in new stack
– Executing [s@macro-dialout-trunk:29] GotoIf(“Local/6616757583@from-internal-00000030;2”, “1?continue,1:s-BUSY,1”) in new stack
– Goto (macro-dialout-trunk,continue,1)
– Executing [continue@macro-dialout-trunk:1] NoOp(“Local/6616757583@from-internal-00000030;2”, “TRUNK Dial failed due to BUSY HANGUPCAUSE: 17 - fai ling through to other trunks”) in new stack
– Executing [continue@macro-dialout-trunk:2] ExecIf(“Local/6616757583@from-internal-00000030;2”, “0?Set(CALLERID(number)=)”) in new stack
– Executing [6616757583@from-internal:12] Macro(“Local/6616757583@from-internal-00000030;2”, “outisbusy,”) in new stack
– Executing [s@macro-outisbusy:1] Progress(“Local/6616757583@from-internal-00000030;2”, “”) in new stack
– Local/6616757583@from-internal-00000030;1 is making progress passing it to Local/FMGL-6616757583#@from-internal-0000002f;2
– Executing [s@macro-outisbusy:2] GotoIf(“Local/6616757583@from-internal-00000030;2”, “0?emergency,1”) in new stack
– Executing [s@macro-outisbusy:3] GotoIf(“Local/6616757583@from-internal-00000030;2”, “0?intracompany,1”) in new stack
– Executing [s@macro-outisbusy:4] Playback(“Local/6616757583@from-internal-00000030;2”, “all-circuits-busy-now&please-try-call-later, noanswer”) in new stack
– <Local/6616757583@from-internal-00000030;2> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)
– <Local/6616757583@from-internal-00000030;2> Playing ‘please-try-call-later.ulaw’ (language ‘en’)
– Executing [s@macro-outisbusy:5] Congestion(“Local/6616757583@from-internal-00000030;2”, “20”) in new stack
– Local/6616757583@from-internal-00000030;1 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
== Spawn extension (macro-outisbusy, s, 5) exited non-zero on ‘Local/6616757583@from-internal-00000030;2’ in macro ‘outisbusy’
– Executing [s@macro-dial:23] Set(“Local/FMGL-6616757583#@from-internal-0000002f;2”, “DIALSTATUS=CONGESTION”) in new stack
== Spawn extension (from-internal, 6616757583, 12) exited non-zero on ‘Local/6616757583@from-internal-00000030;2’
– Executing [s@macro-dial:24] GosubIf(“Local/FMGL-6616757583#@from-internal-0000002f;2”, “0?CONGESTION,1()”) in new stack
– Executing [h@from-internal:1] Macro(“Local/6616757583@from-internal-00000030;2”, “hangupcall”) in new stack
– Executing [s@macro-dial:25] NoOp(“Local/FMGL-6616757583#@from-internal-0000002f;2”, “Returning since nobody answered”) in new stack
– Executing [s@macro-dial:26] MacroExit(“Local/FMGL-6616757583#@from-internal-0000002f;2”, “”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“Local/6616757583@from-internal-00000030;2”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [FMGL-6616757583#@from-internal:9] Hangup(“Local/FMGL-6616757583#@from-internal-0000002f;2”, “”) in new stack
== Spawn extension (from-internal, FMGL-6616757583#, 9) exited non-zero on ‘Local/FMGL-6616757583#@from-internal-0000002f;2’
– Executing [h@from-internal:1] Macro(“Local/FMGL-6616757583#@from-internal-0000002f;2”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“Local/FMGL-6616757583#@from-internal-0000002f;2”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“Local/FMGL-6616757583#@from-internal-0000002f;2”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] NoOp(“Local/FMGL-6616757583#@from-internal-0000002f;2”, " montior file= ") in new stack
– Executing [s@macro-hangupcall:5] GotoIf(“Local/FMGL-6616757583#@from-internal-0000002f;2”, “1?skipagi”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] Hangup(“Local/FMGL-6616757583#@from-internal-0000002f;2”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘Local/FMGL-6616757583#@from-internal-0000002f;2’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘Local/FMGL-6616757583#@from-internal-0000002f;2’
– Executing [s@macro-hangupcall:3] ExecIf(“Local/6616757583@from-internal-00000030;2”, “0?Set(CDR(recordingfile)=)”) in new stack
– No one is available to answer at this time (2:0/0/1)
– Executing [s@macro-dial:23] Set(“Local/9993@from-internal-0000002d;2”, “DIALSTATUS=NOANSWER”) in new stack
– Executing [s@macro-dial:24] GosubIf(“Local/9993@from-internal-0000002d;2”, “0?NOANSWER,1()”) in new stack
– Executing [s@macro-dial:25] NoOp(“Local/9993@from-internal-0000002d;2”, “Returning since nobody answered”) in new stack
– Executing [s@macro-dial:26] MacroExit(“Local/9993@from-internal-0000002d;2”, “”) in new stack
– Executing [9993@followme-sub:41] Goto(“Local/9993@from-internal-0000002d;2”, “nextstep”) in new stack
– Goto (followme-sub,9993,46)
– Executing [9993@followme-sub:46] Set(“Local/9993@from-internal-0000002d;2”, “RingGroupMethod=”) in new stack
– Executing [s@macro-hangupcall:4] NoOp(“Local/6616757583@from-internal-00000030;2”, " montior file= ") in new stack
– Executing [9993@followme-sub:47] GotoIf(“Local/9993@from-internal-0000002d;2”, “1?nodest”) in new stack
– Goto (followme-sub,9993,55)
– Executing [9993@followme-sub:55] NoOp(“Local/9993@from-internal-0000002d;2”, “SKIPPING DEST, CALL CAME FROM Q/RG: 8033”) in new stack
– Executing [9993@followme-sub:56] Return(“Local/9993@from-internal-0000002d;2”, “”) in new stack
– Executing [s@macro-hangupcall:5] GotoIf(“Local/6616757583@from-internal-00000030;2”, “1?skipagi”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [9993@followme-check:2] NoOp(“Local/9993@from-internal-0000002d;2”, “Should never get here”) in new stack
– Executing [s@macro-hangupcall:7] Hangup(“Local/6616757583@from-internal-00000030;2”, “”) in new stack
– Executing [9993@followme-check:3] Hangup(“Local/9993@from-internal-0000002d;2”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘Local/6616757583@from-internal-00000030;2’ in macro ‘hangupcall’
== Spawn extension (followme-check, 9993, 3) exited non-zero on ‘Local/9993@from-internal-0000002d;2’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘Local/6616757583@from-internal-00000030;2’
– No one is available to answer at this time (1:0/0/0)
– Executing [s@macro-dial:23] Set(“SIP/CB_Out-0000000f”, “DIALSTATUS=NOANSWER”) in new stack
– Executing [s@macro-dial:24] GosubIf(“SIP/CB_Out-0000000f”, “0?NOANSWER,1()”) in new stack
– Executing [s@macro-dial:25] NoOp(“SIP/CB_Out-0000000f”, “Returning since nobody answered”) in new stack
– Executing [s@macro-dial:26] MacroExit(“SIP/CB_Out-0000000f”, “”) in new stack
– Executing [8033@from-internal:23] Gosub(“SIP/CB_Out-0000000f”, “sub-record-cancel,s,1()”) in new stack
– Executing [s@sub-record-cancel:1] Return(“SIP/CB_Out-0000000f”, “”) in new stack
– Executing [8033@from-internal:24] Set(“SIP/CB_Out-0000000f”, “RingGroupMethod=”) in new stack
– Executing [8033@from-internal:25] GotoIf(“SIP/CB_Out-0000000f”, “0?nodest”) in new stack
– Executing [8033@from-internal:26] Set(“SIP/CB_Out-0000000f”, “__NODEST=”) in new stack
– Executing [8033@from-internal:27] Macro(“SIP/CB_Out-0000000f”, “blkvm-clr,”) in new stack
– Executing [s@macro-blkvm-clr:1] Set(“SIP/CB_Out-0000000f”, “SHARED(BLKVM,SIP/CB_Out-0000000f)=”) in new stack
– Executing [s@macro-blkvm-clr:2] Set(“SIP/CB_Out-0000000f”, “GOSUB_RETVAL=”) in new stack
– Executing [s@macro-blkvm-clr:3] MacroExit(“SIP/CB_Out-0000000f”, “”) in new stack
– Executing [8033@from-internal:28] Goto(“SIP/CB_Out-0000000f”, “app-blackhole,hangup,1”) in new stack
– Goto (app-blackhole,hangup,1)
– Executing [hangup@app-blackhole:1] NoOp(“SIP/CB_Out-0000000f”, “Blackhole Dest: Hangup”) in new stack
– Executing [hangup@app-blackhole:2] Hangup(“SIP/CB_Out-0000000f”, “”) in new stack

Blockquote

This is a security vulnerability, and will bypass FreePBX inbound routes.

This hasn’t done anything for a long time, and before that would have had no effect for your configuration as you have no secret not to challenge for. Also insecure is only meaningful for inbound calls.

It is very unlikely that the provider will put your trunk name in the From user field, so it is very unlikely that this will ever match.

You should be using chan_pjsip. There is nothing I can see that indicates that this will cause any difficulty with that, that wouldn’t also happen for chan_sip.

The call does seem to have been directed to the DAHDI device, so this is not a SIP problem. If this is ISDN, it is possible that the network didn’t like the number or the caller ID.

Cause code 17 is a straightforward BUSY.

There may be cases where from-internal is right, but in that case, all the sections for that peer should be from-internal.

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