MultiTel PJSIP TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 88

Hi,

I am having trouble with Outbound route. Every time I place a call, I get “All circuits are busy now. Please try your call again later”.

I’m using DID from MultiTel and followed their PJSIP guide which is pretty standard.

Here are following facts:

  • My FreePBX Public IPv4 Address is successfully added in Authenticated IP of MultiTel.
  • I ran same SIP extension in BRIA App and it works fine for both inbound and outbound call.
  • I’ve also whitelisted host which is sbc-ca.multitel.net in sip_custom.conf file
  • I’ve also added custom context “from-multitel”, as described in guide, in extensions_custom.conf file.

Following are the logs:
NOTE:
Replaced my VOIP number with 15141234567
Replaced my Destination number with 14161234567
Replaced CID Name with John Doe
Replaced FreePBX IPv4 Address with 198.133.229.136
Replaced My Home IPv4 Address with 161.16.118.11

== Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
       > 0x7f6644235e90 -- Strict RTP learning after remote address set to: 161.16.118.11:63280
    -- Executing [4161234567@from-internal:1] Macro("SIP/200-0000008d", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/200-0000008d", "TOUCH_MONITOR=1645663477.181") in new stack
    -- Executing [s@macro-user-callerid:2] Set("SIP/200-0000008d", "CHANCONTEXT=") in new stack
    -- Executing [s@macro-user-callerid:3] Set("SIP/200-0000008d", "CHANCONTEXT=") in new stack
    -- Executing [s@macro-user-callerid:4] Set("SIP/200-0000008d", "CHANEXTENCONTEXT=200-0000008d") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SIP/200-0000008d", "CHANEXTEN=200-0000008d") in new stack
    -- Executing [s@macro-user-callerid:6] Set("SIP/200-0000008d", "CALLERID(number)=200") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SIP/200-0000008d", "AMPUSER=200") in new stack
    -- Executing [s@macro-user-callerid:8] Set("SIP/200-0000008d", "HOTDESCKCHAN=200-0000008d") in new stack
    -- Executing [s@macro-user-callerid:9] Set("SIP/200-0000008d", "HOTDESKEXTEN=200") in new stack
    -- Executing [s@macro-user-callerid:10] Set("SIP/200-0000008d", "HOTDESKCALL=0") in new stack
    -- Executing [s@macro-user-callerid:11] ExecIf("SIP/200-0000008d", "0?Set(HOTDESKCALL=1)") in new stack
    -- Executing [s@macro-user-callerid:12] ExecIf("SIP/200-0000008d", "0?Set(CALLERID(name)=)") in new stack
    -- Executing [s@macro-user-callerid:13] GotoIf("SIP/200-0000008d", "0?report") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("SIP/200-0000008d", "1?Set(REALCALLERIDNUM=200)") in new stack
    -- Executing [s@macro-user-callerid:15] Set("SIP/200-0000008d", "AMPUSER=200") in new stack
    -- Executing [s@macro-user-callerid:16] GotoIf("SIP/200-0000008d", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:17] Set("SIP/200-0000008d", "AMPUSERCIDNAME=John Doe") in new stack
    -- Executing [s@macro-user-callerid:18] ExecIf("SIP/200-0000008d", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
    -- Executing [s@macro-user-callerid:19] GotoIf("SIP/200-0000008d", "0?report") in new stack
    -- Executing [s@macro-user-callerid:20] Set("SIP/200-0000008d", "AMPUSERCID=200") in new stack
    -- Executing [s@macro-user-callerid:21] Set("SIP/200-0000008d", "__DIAL_OPTIONS=HhTtr") in new stack
    -- Executing [s@macro-user-callerid:22] Set("SIP/200-0000008d", "CALLERID(all)="John Doe" <200>") in new stack
    -- Executing [s@macro-user-callerid:23] ExecIf("SIP/200-0000008d", "0?Set(CUSDIAL=)") in new stack
    -- Executing [s@macro-user-callerid:24] ExecIf("SIP/200-0000008d", "0?Set(CALLERID(all)="John Doe" <200>)") in new stack
    -- Executing [s@macro-user-callerid:25] GotoIf("SIP/200-0000008d", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:26] ExecIf("SIP/200-0000008d", "1?Set(GROUP(concurrency_limit)=200)") in new stack
    -- Executing [s@macro-user-callerid:27] ExecIf("SIP/200-0000008d", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:28] NoOp("SIP/200-0000008d", "Macro Depth is 1") in new stack
    -- Executing [s@macro-user-callerid:29] GotoIf("SIP/200-0000008d", "1?report2:macroerror") in new stack
    -- Goto (macro-user-callerid,s,30)
    -- Executing [s@macro-user-callerid:30] GotoIf("SIP/200-0000008d", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,49)
    -- Executing [s@macro-user-callerid:49] Set("SIP/200-0000008d", "CALLERID(number)=200") in new stack
    -- Executing [s@macro-user-callerid:50] Set("SIP/200-0000008d", "CALLERID(name)=John Doe") in new stack
    -- Executing [s@macro-user-callerid:51] GotoIf("SIP/200-0000008d", "0?cnum") in new stack
    -- Executing [s@macro-user-callerid:52] Set("SIP/200-0000008d", "CDR(cnam)=John Doe") in new stack
    -- Executing [s@macro-user-callerid:53] Set("SIP/200-0000008d", "CDR(cnum)=200") in new stack
    -- Executing [s@macro-user-callerid:54] Set("SIP/200-0000008d", "CHANNEL(language)=en") in new stack
    -- Executing [4161234567@from-internal:2] Gosub("SIP/200-0000008d", "sub-record-check,s,1(out,4161234567,yes)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("SIP/200-0000008d", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("SIP/200-0000008d", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("SIP/200-0000008d", "NOW=1645663477") in new stack
    -- Executing [s@sub-record-check:4] Set("SIP/200-0000008d", "__DAY=24") in new stack
    -- Executing [s@sub-record-check:5] Set("SIP/200-0000008d", "__MONTH=02") in new stack
    -- Executing [s@sub-record-check:6] Set("SIP/200-0000008d", "__YEAR=2022") in new stack
    -- Executing [s@sub-record-check:7] Set("SIP/200-0000008d", "__TIMESTR=20220224-004437") in new stack
    -- Executing [s@sub-record-check:8] Set("SIP/200-0000008d", "__FROMEXTEN=200") in new stack
    -- Executing [s@sub-record-check:9] Set("SIP/200-0000008d", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("SIP/200-0000008d", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("SIP/200-0000008d", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("SIP/200-0000008d", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("SIP/200-0000008d", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("SIP/200-0000008d", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("SIP/200-0000008d", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] NoOp("SIP/200-0000008d", "Outbound Recording Check from 200 to 4161234567") in new stack
    -- Executing [out@sub-record-check:2] Set("SIP/200-0000008d", "RECMODE=dontcare") in new stack
    -- Executing [out@sub-record-check:3] ExecIf("SIP/200-0000008d", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("SIP/200-0000008d", "recordcheck,1(yes,out,4161234567)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("SIP/200-0000008d", "Starting recording check against yes") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("SIP/200-0000008d", "yes") in new stack
    -- Goto (sub-record-check,recordcheck,9)
    -- Executing [recordcheck@sub-record-check:9] ExecIf("SIP/200-0000008d", "0?Return()") in new stack
    -- Executing [recordcheck@sub-record-check:10] Set("SIP/200-0000008d", "__REC_POLICY_MODE=YES") in new stack
    -- Executing [recordcheck@sub-record-check:11] Goto("SIP/200-0000008d", "startrec") in new stack
    -- Goto (sub-record-check,recordcheck,16)
    -- Executing [recordcheck@sub-record-check:16] NoOp("SIP/200-0000008d", "Starting recording: out, 4161234567") in new stack
    -- Executing [recordcheck@sub-record-check:17] Set("SIP/200-0000008d", "__CALLFILENAME=out-4161234567-200-20220224-004437-1645663477.181") in new stack
[2022-02-24 00:44:37] WARNING[27081][C-00000093]: func_strings.c:1442 function_eval: EVAL requires an argument: EVAL(<string>)
    -- Executing [recordcheck@sub-record-check:18] MixMonitor("SIP/200-0000008d", "2022/02/24/out-4161234567-200-20220224-004437-1645663477.181.wav,abi(LOCAL_MIXMON_ID),") in new stack
    -- Executing [recordcheck@sub-record-check:19] Set("SIP/200-0000008d", "__MIXMON_ID=0x7f66480f4de0") in new stack
    -- Executing [recordcheck@sub-record-check:20] Set("SIP/200-0000008d", "__RECORD_ID=SIP/200-0000008d") in new stack
    -- Executing [recordcheck@sub-record-check:21] Set("SIP/200-0000008d", "__REC_STATUS=RECORDING") in new stack
    -- Executing [recordcheck@sub-record-check:22] Set("SIP/200-0000008d", "CDR(recordingfile)=out-4161234567-200-20220224-004437-1645663477.181.wav") in new stack
    -- Executing [recordcheck@sub-record-check:23] Return("SIP/200-0000008d", "") in new stack
    -- Executing [out@sub-record-check:8] Return("SIP/200-0000008d", "") in new stack
    -- Executing [4161234567@from-internal:3] ExecIf("SIP/200-0000008d", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [4161234567@from-internal:4] Set("SIP/200-0000008d", "_ROUTEID=4") in new stack
    -- Executing [4161234567@from-internal:5] Set("SIP/200-0000008d", "_ROUTENAME=MultiTel-15141234567") in new stack
    -- Executing [4161234567@from-internal:6] Set("SIP/200-0000008d", "MOHCLASS=default") in new stack
    -- Executing [4161234567@from-internal:7] ExecIf("SIP/200-0000008d", "1?Set(TRUNKCIDOVERRIDE=15141234567)") in new stack
    -- Executing [4161234567@from-internal:8] Set("SIP/200-0000008d", "_CALLERIDNAMEINTERNAL=John Doe") in new stack
    -- Executing [4161234567@from-internal:9] Set("SIP/200-0000008d", "_CALLERIDNUMINTERNAL=200") in new stack
    -- Executing [4161234567@from-internal:10] Set("SIP/200-0000008d", "_EMAILNOTIFICATION=FALSE") in new stack
    -- Executing [4161234567@from-internal:11] Set("SIP/200-0000008d", "_NODEST=") in new stack
    -- Executing [4161234567@from-internal:12] Macro("SIP/200-0000008d", "dialout-trunk,34,14161234567,,off") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("SIP/200-0000008d", "DIAL_TRUNK=34") in new stack
    -- Executing [s@macro-dialout-trunk:2] ExecIf("SIP/200-0000008d", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack
    -- Executing [s@macro-dialout-trunk:3] GosubIf("SIP/200-0000008d", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:4] ExecIf("SIP/200-0000008d", "0?Set(CALLERID(num)=200)") in new stack
    -- Executing [s@macro-dialout-trunk:5] GotoIf("SIP/200-0000008d", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("SIP/200-0000008d", "DIAL_NUMBER=14161234567") in new stack
  == Begin MixMonitor Recording SIP/200-0000008d
    -- Executing [s@macro-dialout-trunk:7] Set("SIP/200-0000008d", "DIAL_TRUNK_OPTIONS=HhTtr") in new stack
    -- Executing [s@macro-dialout-trunk:8] Set("SIP/200-0000008d", "OUTBOUND_GROUP=OUT_34") in new stack
    -- Executing [s@macro-dialout-trunk:9] Set("SIP/200-0000008d", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-dialout-trunk:10] GotoIf("SIP/200-0000008d", "0?nomax") in new stack
    -- Executing [s@macro-dialout-trunk:11] GotoIf("SIP/200-0000008d", "0?chanfull") in new stack
    -- Executing [s@macro-dialout-trunk:12] GotoIf("SIP/200-0000008d", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:13] Macro("SIP/200-0000008d", "outbound-callerid,34") in new stack
    -- Executing [s@macro-outbound-callerid:1] NoOp("SIP/200-0000008d", "200") in new stack
    -- Executing [s@macro-outbound-callerid:2] NoOp("SIP/200-0000008d", "") in new stack
    -- Executing [s@macro-outbound-callerid:3] NoOp("SIP/200-0000008d", "off") in new stack
    -- Executing [s@macro-outbound-callerid:4] ExecIf("SIP/200-0000008d", "0?Set(CALLERPRES(name-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:5] ExecIf("SIP/200-0000008d", "0?Set(CALLERPRES(num-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:6] Set("SIP/200-0000008d", "HOTDESCKCHAN=200-0000008d") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("SIP/200-0000008d", "HOTDESKEXTEN=200") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("SIP/200-0000008d", "HOTDESKCALL=0") in new stack
    -- Executing [s@macro-outbound-callerid:9] ExecIf("SIP/200-0000008d", "0?Set(HOTDESKCALL=1)") in new stack
    -- Executing [s@macro-outbound-callerid:10] ExecIf("SIP/200-0000008d", "0?Set(CALLERID(name)=)") in new stack
    -- Executing [s@macro-outbound-callerid:11] Set("SIP/200-0000008d", "ALLOWTHISROUTE=NO") in new stack
    -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/200-0000008d", "0?Set(ALLOWTHISROUTE=YES)") in new stack
    -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/200-0000008d", "0?Hangup()") in new stack
    -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/200-0000008d", "0?Set(REALCALLERIDNUM=200)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/200-0000008d", "0?Set(AMPUSER=200)") in new stack
    -- Executing [s@macro-outbound-callerid:16] GotoIf("SIP/200-0000008d", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,20)
    -- Executing [s@macro-outbound-callerid:20] Set("SIP/200-0000008d", "USEROUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:21] Set("SIP/200-0000008d", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:22] ExecIf("SIP/200-0000008d", "0?Set(EMERGENCYCID=)") in new stack
    -- Executing [s@macro-outbound-callerid:23] Set("SIP/200-0000008d", "TRUNKOUTCID=15141234567") in new stack
    -- Executing [s@macro-outbound-callerid:24] GotoIf("SIP/200-0000008d", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,30)
    -- Executing [s@macro-outbound-callerid:30] ExecIf("SIP/200-0000008d", "1?Set(CALLERID(all)=15141234567)") in new stack
    -- Executing [s@macro-outbound-callerid:31] ExecIf("SIP/200-0000008d", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:32] ExecIf("SIP/200-0000008d", "1?Set(CALLERID(all)=15141234567)") in new stack
    -- Executing [s@macro-outbound-callerid:33] ExecIf("SIP/200-0000008d", "0?Set(CALLERID(all)=200)") in new stack
    -- Executing [s@macro-outbound-callerid:34] ExecIf("SIP/200-0000008d", "0?Set(CALLERID(all)=200)") in new stack
    -- Executing [s@macro-outbound-callerid:35] Set("SIP/200-0000008d", "TIOHIDE=no") in new stack
    -- Executing [s@macro-outbound-callerid:36] ExecIf("SIP/200-0000008d", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:37] ExecIf("SIP/200-0000008d", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:38] ExecIf("SIP/200-0000008d", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:39] ExecIf("SIP/200-0000008d", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:40] Set("SIP/200-0000008d", "CDR(outbound_cnum)=15141234567") in new stack
    -- Executing [s@macro-outbound-callerid:41] Set("SIP/200-0000008d", "CDR(outbound_cnam)=") in new stack
    -- Executing [s@macro-dialout-trunk:14] GosubIf("SIP/200-0000008d", "1?sub-flp-34,s,1()") in new stack
    -- Executing [s@sub-flp-34:1] ExecIf("SIP/200-0000008d", "1?Return()") in new stack
    -- Executing [s@macro-dialout-trunk:15] Set("SIP/200-0000008d", "OUTNUM=14161234567") in new stack
    -- Executing [s@macro-dialout-trunk:16] Set("SIP/200-0000008d", "custom=PJSIP") in new stack
    -- Executing [s@macro-dialout-trunk:17] ExecIf("SIP/200-0000008d", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Ttr)") in new stack
    -- Executing [s@macro-dialout-trunk:18] ExecIf("SIP/200-0000008d", "0?Set(DIAL_TRUNK_OPTIONS=TtrM(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:19] AGI("SIP/200-0000008d", "clearlytrunking.agi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/clearlytrunking.agi
    -- AGI Script Executing Application: (NoOp) Options: (Clearlydevices)
    -- AGI Script Executing Application: (NoOp) Options: (Clearlydevices)
    -- <SIP/200-0000008d>AGI Script clearlytrunking.agi completed, returning 0
    -- Executing [s@macro-dialout-trunk:20] AGI("SIP/200-0000008d", "clearlypaging.agi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/clearlypaging.agi
    -- AGI Script Executing Application: (NoOp) Options: (Clearlydevices)
    -- AGI Script Executing Application: (NoOp) Options: (Clearlydevices)
    -- <SIP/200-0000008d>AGI Script clearlypaging.agi completed, returning 0
    -- Executing [s@macro-dialout-trunk:21] Macro("SIP/200-0000008d", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/200-0000008d", "") in new stack
    -- Executing [s@macro-dialout-trunk:22] GotoIf("SIP/200-0000008d", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:23] ExecIf("SIP/200-0000008d", "1?Set(CONNECTEDLINE(num,i)=14161234567)") in new stack
    -- Executing [s@macro-dialout-trunk:24] ExecIf("SIP/200-0000008d", "1?Set(CONNECTEDLINE(name,i)=CID:15141234567)") in new stack
    -- Executing [s@macro-dialout-trunk:25] ExecIf("SIP/200-0000008d", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)15141234567)") in new stack
    -- Executing [s@macro-dialout-trunk:26] GotoIf("SIP/200-0000008d", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:27] ExecIf("SIP/200-0000008d", "0?Set(DIAL_TRUNK_OPTIONS=tr)") in new stack
    -- Executing [s@macro-dialout-trunk:28] Set("SIP/200-0000008d", "HASH(__SIPHEADERS,Alert-Info)=unset") in new stack
    -- Executing [s@macro-dialout-trunk:29] Dial("SIP/200-0000008d", "PJSIP/14161234567@MultiTel-15141234567,300,Ttrb(func-apply-sipheaders^s^1,(34))U(sub-send-obroute-email^14161234567^4161234567^34^1645663477^^15141234567)") in new stack
    -- PJSIP/MultiTel-15141234567-00000028 Internal Gosub(func-apply-sipheaders,s,1(34)) start
    -- Executing [s@func-apply-sipheaders:1] NoOp("PJSIP/MultiTel-15141234567-00000028", "Applying SIP Headers to channel PJSIP/MultiTel-15141234567-00000028") in new stack
    -- Executing [s@func-apply-sipheaders:2] Set("PJSIP/MultiTel-15141234567-00000028", "TECH=PJSIP") in new stack
    -- Executing [s@func-apply-sipheaders:3] Set("PJSIP/MultiTel-15141234567-00000028", "SIPHEADERKEYS=Alert-Info") in new stack
    -- Executing [s@func-apply-sipheaders:4] While("PJSIP/MultiTel-15141234567-00000028", "1") in new stack
    -- Executing [s@func-apply-sipheaders:5] Set("PJSIP/MultiTel-15141234567-00000028", "sipheader=unset") in new stack
    -- Executing [s@func-apply-sipheaders:6] ExecIf("PJSIP/MultiTel-15141234567-00000028", "0?SIPRemoveHeader(Alert-Info:)") in new stack
    -- Executing [s@func-apply-sipheaders:7] ExecIf("PJSIP/MultiTel-15141234567-00000028", "1?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack
[2022-02-24 00:44:38] ERROR[32539]: res_pjsip_header_funcs.c:410 remove_header: No headers had been previously added to this session.
    -- Executing [s@func-apply-sipheaders:8] ExecIf("PJSIP/MultiTel-15141234567-00000028", "0?Set(sipheader=<http://127.0.0.1>;info=unset)") in new stack
    -- Executing [s@func-apply-sipheaders:9] ExecIf("PJSIP/MultiTel-15141234567-00000028", "0?Set(sipheader=<http://127.0.0.1>unset)") in new stack
    -- Executing [s@func-apply-sipheaders:10] ExecIf("PJSIP/MultiTel-15141234567-00000028", "0?SIPAddHeader(Alert-Info:unset)") in new stack
    -- Executing [s@func-apply-sipheaders:11] ExecIf("PJSIP/MultiTel-15141234567-00000028", "0?Set(PJSIP_HEADER(add,Alert-Info)=unset)") in new stack
    -- Executing [s@func-apply-sipheaders:12] EndWhile("PJSIP/MultiTel-15141234567-00000028", "") in new stack
    -- Executing [s@func-apply-sipheaders:4] While("PJSIP/MultiTel-15141234567-00000028", "0") in new stack
    -- Executing [s@func-apply-sipheaders:13] Return("PJSIP/MultiTel-15141234567-00000028", "") in new stack
  == Spawn extension (from-multitel, 4161234567, 1) exited non-zero on 'PJSIP/MultiTel-15141234567-00000028'
    -- PJSIP/MultiTel-15141234567-00000028 Internal Gosub(func-apply-sipheaders,s,1(34)) complete GOSUB_RETVAL=
    -- Called PJSIP/14161234567@MultiTel-15141234567
<--- Transmitting SIP request (1037 bytes) to UDP:138.197.130.40:5060 --->
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 198.133.229.136:5061;rport;branch=z9hG4bKPj37351162-e6f5-4dc4-8a47-71a0a5fd4a9e
From: <sip:[email protected]>;tag=ea80f776-7145-4eb2-a3ca-72684ee00833
To: <sip:[email protected]>
Contact: <sip:[email protected]:5061>
Call-ID: 4bb39bf3-d0dc-4bb3-9369-28c0fae3ab8c
CSeq: 25682 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REFER, MESSAGE
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: IncrediblePBX-15.0.21(18.1.1)
Content-Type: application/sdp
Content-Length:   328

v=0
o=- 391815172 391815172 IN IP4 (null)
s=Asterisk
c=IN IP4 (null)
t=0 0
m=audio 15390 RTP/AVP 0 8 9 107 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:107 opus/48000/2
a=fmtp:107 useinbandfec=1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:20
a=sendrecv

<--- Received SIP response (362 bytes) from UDP:138.197.130.40:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 198.133.229.136:5061;rport=5061;branch=z9hG4bKPj37351162-e6f5-4dc4-8a47-71a0a5fd4a9e
From: <sip:[email protected]>;tag=ea80f776-7145-4eb2-a3ca-72684ee00833
To: <sip:[email protected]>
Call-ID: 4bb39bf3-d0dc-4bb3-9369-28c0fae3ab8c
CSeq: 25682 INVITE
User-Agent: multitel.net
Content-Length: 0


<--- Received SIP response (913 bytes) from UDP:138.197.130.40:5060 --->
SIP/2.0 488 Not Acceptable Here
Via: SIP/2.0/UDP 198.133.229.136:5061;rport=5061;branch=z9hG4bKPj37351162-e6f5-4dc4-8a47-71a0a5fd4a9e
Max-Forwards: 69
From: <sip:[email protected]>;tag=ea80f776-7145-4eb2-a3ca-72684ee00833
To: <sip:[email protected]>;tag=9QygSvm9e6cXp
Call-ID: 4bb39bf3-d0dc-4bb3-9369-28c0fae3ab8c
CSeq: 25682 INVITE
User-Agent: multitel.net
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Reason: Q.850;cause=88;text="INCOMPATIBLE_DESTINATION"
Content-Length: 0
Remote-Party-ID: "14161234567" <sip:[email protected]>;party=calling;privacy=off;screen=no


<--- Transmitting SIP request (437 bytes) to UDP:138.197.130.40:5060 --->
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 161.16.118.11:5061;rport;branch=z9hG4bKPj37351162-e6f5-4dc4-8a47-71a0a5fd4a9e
From: <sip:[email protected]>;tag=ea80f776-7145-4eb2-a3ca-72684ee00833
To: <sip:[email protected]>;tag=9QygSvm9e6cXp
Call-ID: 4bb39bf3-d0dc-4bb3-9369-28c0fae3ab8c
CSeq: 25682 ACK
Max-Forwards: 70
User-Agent: IncrediblePBX-15.0.21(18.1.1)
Content-Length:  0


  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-dialout-trunk:30] NoOp("SIP/200-0000008d", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 88") in new stack
    -- Executing [s@macro-dialout-trunk:31] GotoIf("SIP/200-0000008d", "0?continue,1:s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("SIP/200-0000008d", "RC=88") in new stack
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("SIP/200-0000008d", "88,1") in new stack
    -- Goto (macro-dialout-trunk,88,1)
    -- Executing [88@macro-dialout-trunk:1] Goto("SIP/200-0000008d", "continue,1") in new stack
    -- Goto (macro-dialout-trunk,continue,1)
    -- Executing [continue@macro-dialout-trunk:1] NoOp("SIP/200-0000008d", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 88 - failing through to other trunks") in new stack
    -- Executing [continue@macro-dialout-trunk:2] ExecIf("SIP/200-0000008d", "1?Set(CALLERID(number)=200)") in new stack
    -- Executing [4161234567@from-internal:13] Macro("SIP/200-0000008d", "outisbusy,") in new stack
    -- Executing [s@macro-outisbusy:1] Progress("SIP/200-0000008d", "") in new stack
    -- Executing [s@macro-outisbusy:2] GotoIf("SIP/200-0000008d", "0?emergency,1") in new stack
    -- Executing [s@macro-outisbusy:3] GotoIf("SIP/200-0000008d", "0?intracompany,1") in new stack
    -- Executing [s@macro-outisbusy:4] Playback("SIP/200-0000008d", "all-circuits-busy-now&please-try-call-later, noanswer") in new stack
    -- <SIP/200-0000008d> Playing 'all-circuits-busy-now.ulaw' (language 'en')
       > 0x7f6644235e90 -- Strict RTP switching to RTP target address 198.133.229.136:63280 as source
    -- <SIP/200-0000008d> Playing 'please-try-call-later.ulaw' (language 'en')
    -- Executing [s@macro-outisbusy:5] Congestion("SIP/200-0000008d", "20") in new stack
  == Spawn extension (macro-outisbusy, s, 5) exited non-zero on 'SIP/200-0000008d' in macro 'outisbusy'
  == Spawn extension (from-internal, 4161234567, 13) exited non-zero on 'SIP/200-0000008d'
    -- Executing [h@from-internal:1] Macro("SIP/200-0000008d", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("SIP/200-0000008d", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("SIP/200-0000008d", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("SIP/200-0000008d", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/200-0000008d' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/200-0000008d'
  == MixMonitor close filestream (mixed)
  == End MixMonitor Recording SIP/200-0000008d

Following is how I added IP settings in sip_custom.conf - even though it wasn’t required:

[sbc-ca-01]
host=138.197.130.40
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-multitel
insecure=invite,port
nat=never
allow=all

[sbc-ca-02]
host=138.197.130.41
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-multitel
insecure=invite,port
nat=never
allow=all

[sbc-ca-03]
host=138.197.130.42
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-multitel
insecure=invite,port
nat=never
allow=all

[sbc-ca-04]
host=138.197.130.43
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-multitel
insecure=invite,port
nat=never
allow=all

Following is my custom-context setting in extensions_custom.conf:

[from-multitel]
; exten => s,1,Set(DID=${SIP_HEADER(X-DID)}) ; set this if using chan_sip
exten => s,1,Set(DID=${PJSIP_HEADER(read,X-DID)}) ; set this if using chan_pjsip
exten => s,2,Goto(from-pstn,${DID},1)

Custom Context is added in an appropriate section of settings in PJSIP. Advanced & Codecs setting tab wasn’t touched - as per guide.

PJSIP Registration did show it as “Registered” in SSH if I enter following command:
Command :

asterisk -rx ‘pjsip show registrations’ | grep multitel

Output:

MultiTel-15141234567/sip:sbc-ca.multitel.net            MultiTel-15141234567  Registered       Thu 01:23:30      590  Thu 01:33:20      575

Thanks in Advance for help.

I can only assume you have provided some strange value for the media address.

(null) should be your public IP address.

I’d also note that current versions of Asterisk have a bug that will create bad SDP if you use allow=all (at least for chan_pjsip), and this is never a sensible thing to do.

Note the 88 came from the provider; it isn’t the standard ISUP translation for 488. The text for it is “incompatible destination”

You were spot-on. It was a buggy asterisk.

I installed new version (IncrediblePBX2022.18.15-1) on Rocky Linux and added those exactly same PJSIP settings … and it worked for both inbound and outbound calls.

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