Hi! I’m having trouble and I can’t solve it…
This is an outgoing call to a mobile phone (inbound call works well).
The calling phone is extension 200, an analog phone, and it’s calling number 911234567 (that’s what you see in the log below, I obfuscated that a bit).
It connects to a Grandstream FXS Gateway, 10.0.0.2
That connects to FreePBX (10.0.0.10).
FreePBX sends it (correctly) on an OutboundRouteExterna, an outbound trunk to the phone company, where our number (after obfuscation) is 211234567
That route connects to a Grandstream FXO Gateway (10.0.0.3), which connects to the company line.
It’s failing with “all circuits are busy now”, and in the PJSIP trace I see that final gateway returning a “403 Forbidden”.
What could that be? How can I solve it?
Here’s the first part of the SIP trace:
freepbx*CLI>
freepbx*CLI>
freepbx*CLI>
freepbx*CLI> pjsip set logger on
PJSIP Logging enabled
<--- Received SIP request (1293 bytes) from UDP:10.0.0.2:5060 --->
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.0.0.2:5060;branch=z9hG4bK407964590;rport
Route: <sip:10.0.0.10:5060;lr>
From: "Garagem" <sip:[email protected]>;tag=1951005369
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 150 INVITE
Contact: "Garagem" <sip:[email protected]:5060>
Max-Forwards: 70
User-Agent: Grandstream GXW4216V2 1.0.15.2
Privacy: none
P-Preferred-Identity: "Garagem" <sip:[email protected]>
P-Access-Network-Info: IEEE-EUI-48;eui-48-addr=D2-21-F9-85-6B-4E
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=C0-74-AD-AC-D5-99
Supported: replaces, path, timer, eventlist
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length: 488
v=0
o=200 8000 8000 IN IP4 10.0.0.2
s=SIP Call
c=IN IP4 10.0.0.2
t=0 0
m=audio 50000 RTP/AVP 0 8 4 18 2 97 123 9 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:2 G726-32/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:123 opus/48000/2
a=fmtp:123 maxplaybackrate=16000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16,32-36,54
<--- Transmitting SIP response (471 bytes) to UDP:10.0.0.2:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.0.2:5060;rport=5060;received=10.0.0.2;branch=z9hG4bK407964590
Call-ID: [email protected]
From: "Garagem" <sip:[email protected]>;tag=1951005369
To: <sip:[email protected]>;tag=z9hG4bK407964590
CSeq: 150 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1699031145/5e2cc6b913e6cc9758678a7f37a1a44e",opaque="3bb380b7545bff42",algorithm=MD5,qop="auth"
Server: FPBX-16.0.40.7(18.17.1)
Content-Length: 0
<--- Received SIP request (308 bytes) from UDP:10.0.0.2:5060 --->
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.0.0.2:5060;branch=z9hG4bK407964590;rport
Route: <sip:10.0.0.10:5060;lr>
From: "Garagem" <sip:[email protected]>;tag=1951005369
To: <sip:[email protected]>;tag=z9hG4bK407964590
Call-ID: [email protected]
CSeq: 150 ACK
Content-Length: 0
<--- Received SIP request (1562 bytes) from UDP:10.0.0.2:5060 --->
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.0.0.2:5060;branch=z9hG4bK607604217;rport
Route: <sip:10.0.0.10:5060;lr>
From: "Garagem" <sip:[email protected]>;tag=1951005369
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 151 INVITE
Contact: "Garagem" <sip:[email protected]:5060>
Authorization: Digest username="200", realm="asterisk", nonce="1699031145/5e2cc6b913e6cc9758678a7f37a1a44e", uri="sip:[email protected]", response="c9e61e25490ca04e72b6e9cd00fccdd0", algorithm=MD5, cnonce="08238538", opaque="3bb380b7545bff42", qop=auth, nc=00000001
Max-Forwards: 70
User-Agent: Grandstream GXW4216V2 1.0.15.2
Privacy: none
P-Preferred-Identity: "Garagem" <sip:[email protected]>
P-Access-Network-Info: IEEE-EUI-48;eui-48-addr=D2-21-F9-85-6B-4E
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=C0-74-AD-AC-D5-99
Supported: replaces, path, timer, eventlist
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length: 488
v=0
o=200 8000 8000 IN IP4 10.0.0.2
s=SIP Call
c=IN IP4 10.0.0.2
t=0 0
m=audio 50000 RTP/AVP 0 8 4 18 2 97 123 9 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:2 G726-32/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:123 opus/48000/2
a=fmtp:123 maxplaybackrate=16000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16,32-36,54
<--- Transmitting SIP response (298 bytes) to UDP:10.0.0.2:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.0.2:5060;rport=5060;received=10.0.0.2;branch=z9hG4bK607604217
Call-ID: [email protected]
From: "Garagem" <sip:[email protected]>;tag=1951005369
To: <sip:[email protected]>
CSeq: 151 INVITE
Server: FPBX-16.0.40.7(18.17.1)
Content-Length: 0
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
-- Executing [911234567@from-internal:1] Macro("PJSIP/200-00001008", "user-callerid,LIMIT,EXTERNAL,") in new stack
-- Executing [s@macro-user-callerid:1] Set("PJSIP/200-00001008", "TOUCH_MONITOR=1699031145.5606") in new stack
-- Executing [s@macro-user-callerid:2] Set("PJSIP/200-00001008", "CHANCONTEXT=") in new stack
-- Executing [s@macro-user-callerid:3] Progress("PJSIP/200-00001008", "") in new stack
-- Executing [s@macro-user-callerid:4] Set("PJSIP/200-00001008", "CHANCONTEXT=") in new stack
-- Executing [s@macro-user-callerid:5] Set("PJSIP/200-00001008", "CHANEXTENCONTEXT=200-00001008") in new stack
-- Executing [s@macro-user-callerid:6] Set("PJSIP/200-00001008", "CHANEXTEN=200-00001008") in new stack
-- Executing [s@macro-user-callerid:7] Set("PJSIP/200-00001008", "CALLERID(number)=200") in new stack
-- Executing [s@macro-user-callerid:8] Set("PJSIP/200-00001008", "AMPUSER=200") in new stack
-- Executing [s@macro-user-callerid:9] Set("PJSIP/200-00001008", "HOTDESCKCHAN=200-00001008") in new stack
-- Executing [s@macro-user-callerid:10] Set("PJSIP/200-00001008", "HOTDESKEXTEN=200") in new stack
-- Executing [s@macro-user-callerid:11] Set("PJSIP/200-00001008", "HOTDESKCALL=0") in new stack
-- Executing [s@macro-user-callerid:12] ExecIf("PJSIP/200-00001008", "0?Set(HOTDESKCALL=1)") in new stack
-- Executing [s@macro-user-callerid:13] ExecIf("PJSIP/200-00001008", "0?Set(CALLERID(name)=)") in new stack
-- Executing [s@macro-user-callerid:14] GotoIf("PJSIP/200-00001008", "0?report") in new stack
-- Executing [s@macro-user-callerid:15] ExecIf("PJSIP/200-00001008", "1?Set(REALCALLERIDNUM=200)") in new stack
-- Executing [s@macro-user-callerid:16] Set("PJSIP/200-00001008", "AMPUSER=200") in new stack
-- Executing [s@macro-user-callerid:17] GotoIf("PJSIP/200-00001008", "0?limit") in new stack
-- Executing [s@macro-user-callerid:18] Set("PJSIP/200-00001008", "AMPUSERCIDNAME=Hall Entrada") in new stack
-- Executing [s@macro-user-callerid:19] ExecIf("PJSIP/200-00001008", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
-- Executing [s@macro-user-callerid:20] GotoIf("PJSIP/200-00001008", "0?report") in new stack
-- Executing [s@macro-user-callerid:21] Set("PJSIP/200-00001008", "AMPUSERCID=200") in new stack
-- Executing [s@macro-user-callerid:22] Set("PJSIP/200-00001008", "__DIAL_OPTIONS=HhTtr") in new stack
-- Executing [s@macro-user-callerid:23] Set("PJSIP/200-00001008", "CALLERID(all)="Hall Entrada" <200>") in new stack
-- Executing [s@macro-user-callerid:24] ExecIf("PJSIP/200-00001008", "0?Set(CUSDIAL=)") in new stack
-- Executing [s@macro-user-callerid:25] ExecIf("PJSIP/200-00001008", "0?Set(CALLERID(all)="Hall Entrada" <200>)") in new stack
-- Executing [s@macro-user-callerid:26] GotoIf("PJSIP/200-00001008", "0?limit") in new stack
-- Executing [s@macro-user-callerid:27] ExecIf("PJSIP/200-00001008", "1?Set(GROUP(concurrency_limit)=200)") in new stack
-- Executing [s@macro-user-callerid:28] ExecIf("PJSIP/200-00001008", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:29] NoOp("PJSIP/200-00001008", "Macro Depth is 1") in new stack
-- Executing [s@macro-user-callerid:30] GotoIf("PJSIP/200-00001008", "1?report2:macroerror") in new stack
-- Goto (macro-user-callerid,s,31)
-- Executing [s@macro-user-callerid:31] GotoIf("PJSIP/200-00001008", "1?continue") in new stack
-- Goto (macro-user-callerid,s,50)
-- Executing [s@macro-user-callerid:50] Set("PJSIP/200-00001008", "CALLERID(number)=200") in new stack
-- Executing [s@macro-user-callerid:51] Set("PJSIP/200-00001008", "CALLERID(name)=Hall Entrada") in new stack
-- Executing [s@macro-user-callerid:52] GotoIf("PJSIP/200-00001008", "0?cnum") in new stack
-- Executing [s@macro-user-callerid:53] Set("PJSIP/200-00001008", "__MCNUM=200") in new stack
-- Executing [s@macro-user-callerid:54] Set("PJSIP/200-00001008", "__MCNAME=Hall Entrada") in new stack
-- Executing [s@macro-user-callerid:55] Set("PJSIP/200-00001008", "__MCEXTEN=200") in new stack
-- Executing [s@macro-user-callerid:56] Set("PJSIP/200-00001008", "__MCORGCHAN=PJSIP/200-00001008") in new stack
-- Executing [s@macro-user-callerid:57] Set("PJSIP/200-00001008", "CDR(cnam)=Hall Entrada") in new stack
<--- Transmitting SIP response (819 bytes) to UDP:10.0.0.2:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 10.0.0.2:5060;rport=5060;received=10.0.0.2;branch=z9hG4bK607604217
Call-ID: [email protected]
From: "Garagem" <sip:[email protected]>;tag=1951005369
To: <sip:[email protected]>;tag=8cb87d33-9856-4824-b31f-76d4528d68ab
CSeq: 151 INVITE
Server: FPBX-16.0.40.7(18.17.1)
Contact: <sip:10.0.0.10:5060>
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
Content-Type: application/sdp
Content-Length: 294
v=0
o=- 8000 8002 IN IP4 10.0.0.10
s=Asterisk
c=IN IP4 10.0.0.10
t=0 0
m=audio 19452 RTP/AVP 0 8 2 9 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
-- Executing [s@macro-user-callerid:58] Set("PJSIP/200-00001008", "CDR(cnum)=200") in new stack
-- Executing [s@macro-user-callerid:59] Set("PJSIP/200-00001008", "CHANNEL(language)=en") in new stack
-- Executing [911234567@from-internal:2] Gosub("PJSIP/200-00001008", "sub-record-check,s,1(out,911234567,dontcare)") in new stack
-- Executing [s@sub-record-check:1] GotoIf("PJSIP/200-00001008", "0?initialized") in new stack
-- Executing [s@sub-record-check:2] Set("PJSIP/200-00001008", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s@sub-record-check:3] Set("PJSIP/200-00001008", "NOW=1699031145") in new stack
-- Executing [s@sub-record-check:4] Set("PJSIP/200-00001008", "__DAY=03") in new stack
-- Executing [s@sub-record-check:5] Set("PJSIP/200-00001008", "__MONTH=11") in new stack
-- Executing [s@sub-record-check:6] Set("PJSIP/200-00001008", "__YEAR=2023") in new stack
-- Executing [s@sub-record-check:7] Set("PJSIP/200-00001008", "__TIMESTR=20231103-170545") in new stack
-- Executing [s@sub-record-check:8] Set("PJSIP/200-00001008", "__FROMEXTEN=200") in new stack
-- Executing [s@sub-record-check:9] Set("PJSIP/200-00001008", "__MON_FMT=wav") in new stack
-- Executing [s@sub-record-check:10] NoOp("PJSIP/200-00001008", "Recordings initialized") in new stack
-- Executing [s@sub-record-check:11] ExecIf("PJSIP/200-00001008", "0?Set(ARG3=dontcare)") in new stack
-- Executing [s@sub-record-check:12] Set("PJSIP/200-00001008", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:13] ExecIf("PJSIP/200-00001008", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [s@sub-record-check:14] GotoIf("PJSIP/200-00001008", "3?checkaction") in new stack
-- Goto (sub-record-check,s,17)
-- Executing [s@sub-record-check:17] GotoIf("PJSIP/200-00001008", "1?sub-record-check,out,1") in new stack
-- Goto (sub-record-check,out,1)
-- Executing [out@sub-record-check:1] NoOp("PJSIP/200-00001008", "Outbound Recording Check from 200 to 911234567") in new stack
-- Executing [out@sub-record-check:2] Set("PJSIP/200-00001008", "RECMODE=dontcare") in new stack
-- Executing [out@sub-record-check:3] ExecIf("PJSIP/200-00001008", "1?Goto(routewins)") in new stack
-- Goto (sub-record-check,out,7)
-- Executing [out@sub-record-check:7] Gosub("PJSIP/200-00001008", "recordcheck,1(dontcare,out,911234567)") in new stack
-- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/200-00001008", "Starting recording check against dontcare") in new stack
-- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/200-00001008", "dontcare") in new stack
-- Goto (sub-record-check,recordcheck,3)
-- Executing [recordcheck@sub-record-check:3] Return("PJSIP/200-00001008", "") in new stack
-- Executing [out@sub-record-check:8] Return("PJSIP/200-00001008", "") in new stack
-- Executing [911234567@from-internal:3] ExecIf("PJSIP/200-00001008", "0 ?Set(CDR(accountcode)=)") in new stack
-- Executing [911234567@from-internal:4] Set("PJSIP/200-00001008", "_ROUTEID=1") in new stack
-- Executing [911234567@from-internal:5] Set("PJSIP/200-00001008", "_ROUTENAME=OutboundRouteExterna") in new stack
-- Executing [911234567@from-internal:6] Set("PJSIP/200-00001008", "EMERGENCYROUTE=YES") in new stack
-- Executing [911234567@from-internal:7] Set("PJSIP/200-00001008", "MOHCLASS=default") in new stack
-- Executing [911234567@from-internal:8] Set("PJSIP/200-00001008", "_CALLERIDNAMEINTERNAL=Hall Entrada") in new stack
-- Executing [911234567@from-internal:9] Set("PJSIP/200-00001008", "_CALLERIDNUMINTERNAL=200") in new stack
-- Executing [911234567@from-internal:10] Set("PJSIP/200-00001008", "_EMAILNOTIFICATION=FALSE") in new stack
-- Executing [911234567@from-internal:11] Set("PJSIP/200-00001008", "_NODEST=") in new stack
-- Executing [911234567@from-internal:12] Macro("PJSIP/200-00001008", "dialout-trunk,3,911234567,,off") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("PJSIP/200-00001008", "DIAL_TRUNK=3") in new stack
-- Executing [s@macro-dialout-trunk:2] ExecIf("PJSIP/200-00001008", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack
-- Executing [s@macro-dialout-trunk:3] GosubIf("PJSIP/200-00001008", "0?sub-pincheck,s,1()") in new stack
-- Executing [s@macro-dialout-trunk:4] ExecIf("PJSIP/200-00001008", "0?Set(CALLERID(num)=200)") in new stack
-- Executing [s@macro-dialout-trunk:5] GotoIf("PJSIP/200-00001008", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("PJSIP/200-00001008", "DIAL_NUMBER=911234567") in new stack
-- Executing [s@macro-dialout-trunk:7] Set("PJSIP/200-00001008", "DIAL_TRUNK_OPTIONS=HhTtr") in new stack
-- Executing [s@macro-dialout-trunk:8] Set("PJSIP/200-00001008", "OUTBOUND_GROUP=OUT_3") in new stack
-- Executing [s@macro-dialout-trunk:9] Set("PJSIP/200-00001008", "DIAL_TRUNK_OPTIONS=T") in new stack
-- Executing [s@macro-dialout-trunk:10] GotoIf("PJSIP/200-00001008", "0?nomax") in new stack
-- Executing [s@macro-dialout-trunk:11] GotoIf("PJSIP/200-00001008", "0?chanfull") in new stack
-- Executing [s@macro-dialout-trunk:12] GotoIf("PJSIP/200-00001008", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:13] Macro("PJSIP/200-00001008", "outbound-callerid,3") in new stack
-- Executing [s@macro-outbound-callerid:1] NoOp("PJSIP/200-00001008", "200") in new stack
-- Executing [s@macro-outbound-callerid:2] NoOp("PJSIP/200-00001008", "") in new stack
-- Executing [s@macro-outbound-callerid:3] NoOp("PJSIP/200-00001008", "off") in new stack
-- Executing [s@macro-outbound-callerid:4] ExecIf("PJSIP/200-00001008", "0?Set(CALLERID(name-pres)=)") in new stack
-- Executing [s@macro-outbound-callerid:5] ExecIf("PJSIP/200-00001008", "0?Set(CALLERID(num-pres)=)") in new stack
-- Executing [s@macro-outbound-callerid:6] Set("PJSIP/200-00001008", "HOTDESCKCHAN=200-00001008") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("PJSIP/200-00001008", "HOTDESKEXTEN=200") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("PJSIP/200-00001008", "HOTDESKCALL=0") in new stack
-- Executing [s@macro-outbound-callerid:9] ExecIf("PJSIP/200-00001008", "0?Set(HOTDESKCALL=1)") in new stack
-- Executing [s@macro-outbound-callerid:10] ExecIf("PJSIP/200-00001008", "0?Set(CALLERID(name)=)") in new stack
-- Executing [s@macro-outbound-callerid:11] Set("PJSIP/200-00001008", "ALLOWTHISROUTE=NO") in new stack
-- Executing [s@macro-outbound-callerid:12] ExecIf("PJSIP/200-00001008", "1?Set(ALLOWTHISROUTE=YES)") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("PJSIP/200-00001008", "0?Hangup()") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("PJSIP/200-00001008", "0?Set(REALCALLERIDNUM=200)") in new stack
-- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/200-00001008", "0?Set(AMPUSER=200)") in new stack
-- Executing [s@macro-outbound-callerid:16] GotoIf("PJSIP/200-00001008", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,20)
-- Executing [s@macro-outbound-callerid:20] Set("PJSIP/200-00001008", "USEROUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:21] Set("PJSIP/200-00001008", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:22] ExecIf("PJSIP/200-00001008", "0?Set(SCDEXT=YES)") in new stack
-- Executing [s@macro-outbound-callerid:23] ExecIf("PJSIP/200-00001008", "0?Set(EMERGENCYCID=)") in new stack
-- Executing [s@macro-outbound-callerid:24] ExecIf("PJSIP/200-00001008", "0?Set(CALLERID(name)=)") in new stack
-- Executing [s@macro-outbound-callerid:25] ExecIf("PJSIP/200-00001008", "0?Set(EMERGENCYCID=)") in new stack
-- Executing [s@macro-outbound-callerid:26] Set("PJSIP/200-00001008", "TRUNKOUTCID=211234567") in new stack
-- Executing [s@macro-outbound-callerid:27] GotoIf("PJSIP/200-00001008", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,33)
-- Executing [s@macro-outbound-callerid:33] ExecIf("PJSIP/200-00001008", "1?Set(CALLERID(all)=211234567)") in new stack
-- Executing [s@macro-outbound-callerid:34] ExecIf("PJSIP/200-00001008", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:35] ExecIf("PJSIP/200-00001008", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:36] ExecIf("PJSIP/200-00001008", "0?Set(CALLERID(all)=200)") in new stack
-- Executing [s@macro-outbound-callerid:37] ExecIf("PJSIP/200-00001008", "0?Set(CALLERID(all)=200)") in new stack
-- Executing [s@macro-outbound-callerid:38] Set("PJSIP/200-00001008", "TIOHIDE=no") in new stack
-- Executing [s@macro-outbound-callerid:39] ExecIf("PJSIP/200-00001008", "0?Set(CALLERID(name-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:40] ExecIf("PJSIP/200-00001008", "0?Set(CALLERID(num-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:41] ExecIf("PJSIP/200-00001008", "0?Set(CALLERID(name-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:42] ExecIf("PJSIP/200-00001008", "0?Set(CALLERID(num-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:43] Set("PJSIP/200-00001008", "CDR(outbound_cnum)=211234567") in new stack
-- Executing [s@macro-outbound-callerid:44] Set("PJSIP/200-00001008", "CDR(outbound_cnam)=") in new stack
-- Executing [s@macro-dialout-trunk:14] GosubIf("PJSIP/200-00001008", "0?sub-flp-3,s,1()") in new stack
-- Executing [s@macro-dialout-trunk:15] Set("PJSIP/200-00001008", "OUTNUM=911234567") in new stack
-- Executing [s@macro-dialout-trunk:16] Set("PJSIP/200-00001008", "custom=PJSIP") in new stack
-- Executing [s@macro-dialout-trunk:17] ExecIf("PJSIP/200-00001008", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
-- Executing [s@macro-dialout-trunk:18] ExecIf("PJSIP/200-00001008", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack
-- Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/200-00001008", "0?AGI(allowlist-autoadd.agi,)") in new stack
-- Executing [s@macro-dialout-trunk:20] Macro("PJSIP/200-00001008", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/200-00001008", "") in new stack
-- Executing [s@macro-dialout-trunk:21] GotoIf("PJSIP/200-00001008", "0?skipcrm") in new stack
-- Executing [s@macro-dialout-trunk:22] Set("PJSIP/200-00001008", "__CRM_DIRECTION=OUTBOUND") in new stack
-- Executing [s@macro-dialout-trunk:23] Set("PJSIP/200-00001008", "__CRM_DESTINATION=911234567") in new stack
-- Executing [s@macro-dialout-trunk:24] Set("PJSIP/200-00001008", "__CRM_SOURCE=200") in new stack
-- Executing [s@macro-dialout-trunk:25] AGI("PJSIP/200-00001008", "agi://127.0.0.1/sangomacrm.agi") in new stack
-- <PJSIP/200-00001008>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
-- Executing [s@macro-dialout-trunk:26] Set("PJSIP/200-00001008", "CHANNEL(hangup_handler_push)=crm-hangup,s,1") in new stack
-- Executing [s@macro-dialout-trunk:27] NoOp("PJSIP/200-00001008", "CRM Finished") in new stack
-- Executing [s@macro-dialout-trunk:28] GotoIf("PJSIP/200-00001008", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:29] ExecIf("PJSIP/200-00001008", "1?Set(CONNECTEDLINE(num,i)=911234567)") in new stack
-- Executing [s@macro-dialout-trunk:30] ExecIf("PJSIP/200-00001008", "1?Set(CONNECTEDLINE(name,i)=CID:211234567)") in new stack
-- Executing [s@macro-dialout-trunk:31] ExecIf("PJSIP/200-00001008", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)211234567)") in new stack
-- Executing [s@macro-dialout-trunk:32] GotoIf("PJSIP/200-00001008", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:33] ExecIf("PJSIP/200-00001008", "0?Set(DIAL_TRUNK_OPTIONS=)") in new stack
-- Executing [s@macro-dialout-trunk:34] Set("PJSIP/200-00001008", "HASH(__SIPHEADERS,Alert-Info)=unset") in new stack
-- Executing [s@macro-dialout-trunk:35] Dial("PJSIP/200-00001008", "PJSIP/911234567@211234567,300,Tb(func-apply-sipheaders^s^1,(3))U(sub-send-obroute-email^911234567^911234567^3^1699031145^^211234567)") in new stack
-- PJSIP/211234567-00001009 Internal Gosub(func-apply-sipheaders,s,1(3)) start
-- Executing [s@func-apply-sipheaders:1] ExecIf("PJSIP/211234567-00001009", "0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
-- Executing [s@func-apply-sipheaders:2] NoOp("PJSIP/211234567-00001009", "Applying SIP Headers to channel PJSIP/211234567-00001009") in new stack
-- Executing [s@func-apply-sipheaders:3] Set("PJSIP/211234567-00001009", "localchan=211234567-00001009") in new stack
-- Executing [s@func-apply-sipheaders:4] Set("PJSIP/211234567-00001009", "DialMCEXT=211234567") in new stack
-- Executing [s@func-apply-sipheaders:5] Set("PJSIP/211234567-00001009", "CHANNEL(hangup_handler_push)=app-missedcall-hangup,211234567,1") in new stack
-- Executing [s@func-apply-sipheaders:6] Set("PJSIP/211234567-00001009", "TECH=PJSIP") in new stack
-- Executing [s@func-apply-sipheaders:7] Set("PJSIP/211234567-00001009", "SIPHEADERKEYS=Alert-Info") in new stack
-- Executing [s@func-apply-sipheaders:8] While("PJSIP/211234567-00001009", "1") in new stack
-- Executing [s@func-apply-sipheaders:9] Set("PJSIP/211234567-00001009", "sipheader=unset") in new stack
-- Executing [s@func-apply-sipheaders:10] ExecIf("PJSIP/211234567-00001009", "1?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack
[2023-11-03 17:05:45] ERROR[18730]: res_pjsip_header_funcs.c:717 remove_header: No headers had been previously added to this session.
-- Executing [s@func-apply-sipheaders:11] ExecIf("PJSIP/211234567-00001009", "0?Set(sipheader=<http://127.0.0.1>;info=unset)") in new stack
-- Executing [s@func-apply-sipheaders:12] ExecIf("PJSIP/211234567-00001009", "0?Set(sipheader=<http://127.0.0.1>unset)") in new stack
-- Executing [s@func-apply-sipheaders:13] ExecIf("PJSIP/211234567-00001009", "0?Set(PJSIP_HEADER(add,Alert-Info)=unset)") in new stack
-- Executing [s@func-apply-sipheaders:14] EndWhile("PJSIP/211234567-00001009", "") in new stack
-- Executing [s@func-apply-sipheaders:8] While("PJSIP/211234567-00001009", "0") in new stack
-- Executing [s@func-apply-sipheaders:15] Return("PJSIP/211234567-00001009", "") in new stack
== Spawn extension (func-apply-sipheaders, s, 15) exited non-zero on 'PJSIP/211234567-00001009'
-- PJSIP/211234567-00001009 Internal Gosub(func-apply-sipheaders,s,1(3)) complete GOSUB_RETVAL=
-- Called PJSIP/911234567@211234567