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 [[email protected]:1] Macro("SIP/200-0000008d", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [[email protected]:1] Set("SIP/200-0000008d", "TOUCH_MONITOR=1645663477.181") in new stack
    -- Executing [[email protected]:2] Set("SIP/200-0000008d", "CHANCONTEXT=") in new stack
    -- Executing [[email protected]:3] Set("SIP/200-0000008d", "CHANCONTEXT=") in new stack
    -- Executing [[email protected]:4] Set("SIP/200-0000008d", "CHANEXTENCONTEXT=200-0000008d") in new stack
    -- Executing [[email protected]:5] Set("SIP/200-0000008d", "CHANEXTEN=200-0000008d") in new stack
    -- Executing [[email protected]:6] Set("SIP/200-0000008d", "CALLERID(number)=200") in new stack
    -- Executing [[email protected]:7] Set("SIP/200-0000008d", "AMPUSER=200") in new stack
    -- Executing [[email protected]:8] Set("SIP/200-0000008d", "HOTDESCKCHAN=200-0000008d") in new stack
    -- Executing [[email protected]:9] Set("SIP/200-0000008d", "HOTDESKEXTEN=200") in new stack
    -- Executing [[email protected]:10] Set("SIP/200-0000008d", "HOTDESKCALL=0") in new stack
    -- Executing [[email protected]:11] ExecIf("SIP/200-0000008d", "0?Set(HOTDESKCALL=1)") in new stack
    -- Executing [[email protected]:12] ExecIf("SIP/200-0000008d", "0?Set(CALLERID(name)=)") in new stack
    -- Executing [[email protected]:13] GotoIf("SIP/200-0000008d", "0?report") in new stack
    -- Executing [[email protected]:14] ExecIf("SIP/200-0000008d", "1?Set(REALCALLERIDNUM=200)") in new stack
    -- Executing [[email protected]llerid:15] Set("SIP/200-0000008d", "AMPUSER=200") in new stack
    -- Executing [[email protected]:16] GotoIf("SIP/200-0000008d", "0?limit") in new stack
    -- Executing [[email protected]:17] Set("SIP/200-0000008d", "AMPUSERCIDNAME=John Doe") in new stack
    -- Executing [[email protected]:18] ExecIf("SIP/200-0000008d", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
    -- Executing [[email protected]:19] GotoIf("SIP/200-0000008d", "0?report") in new stack
    -- Executing [[email protected]:20] Set("SIP/200-0000008d", "AMPUSERCID=200") in new stack
    -- Executing [[email protected]:21] Set("SIP/200-0000008d", "__DIAL_OPTIONS=HhTtr") in new stack
    -- Executing [[email protected]:22] Set("SIP/200-0000008d", "CALLERID(all)="John Doe" <200>") in new stack
    -- Executing [[email protected]:23] ExecIf("SIP/200-0000008d", "0?Set(CUSDIAL=)") in new stack
    -- Executing [[email protected]:24] ExecIf("SIP/200-0000008d", "0?Set(CALLERID(all)="John Doe" <200>)") in new stack
    -- Executing [[email protected]:25] GotoIf("SIP/200-0000008d", "0?limit") in new stack
    -- Executing [[email protected]:26] ExecIf("SIP/200-0000008d", "1?Set(GROUP(concurrency_limit)=200)") in new stack
    -- Executing [[email protected]:27] ExecIf("SIP/200-0000008d", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [[email protected]:28] NoOp("SIP/200-0000008d", "Macro Depth is 1") in new stack
    -- Executing [[email protected]:29] GotoIf("SIP/200-0000008d", "1?report2:macroerror") in new stack
    -- Goto (macro-user-callerid,s,30)
    -- Executing [[email protected]:30] GotoIf("SIP/200-0000008d", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,49)
    -- Executing [[email protected]:49] Set("SIP/200-0000008d", "CALLERID(number)=200") in new stack
    -- Executing [[email protected]:50] Set("SIP/200-0000008d", "CALLERID(name)=John Doe") in new stack
    -- Executing [[email protected]:51] GotoIf("SIP/200-0000008d", "0?cnum") in new stack
    -- Executing [[email protected]:52] Set("SIP/200-0000008d", "CDR(cnam)=John Doe") in new stack
    -- Executing [[email protected]:53] Set("SIP/200-0000008d", "CDR(cnum)=200") in new stack
    -- Executing [[email protected]:54] Set("SIP/200-0000008d", "CHANNEL(language)=en") in new stack
    -- Executing [[email protected]:2] Gosub("SIP/200-0000008d", "sub-record-check,s,1(out,4161234567,yes)") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/200-0000008d", "0?initialized") in new stack
    -- Executing [[email protected]:2] Set("SIP/200-0000008d", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [[email protected]:3] Set("SIP/200-0000008d", "NOW=1645663477") in new stack
    -- Executing [[email protected]:4] Set("SIP/200-0000008d", "__DAY=24") in new stack
    -- Executing [[email protected]:5] Set("SIP/200-0000008d", "__MONTH=02") in new stack
    -- Executing [[email protected]:6] Set("SIP/200-0000008d", "__YEAR=2022") in new stack
    -- Executing [[email protected]:7] Set("SIP/200-0000008d", "__TIMESTR=20220224-004437") in new stack
    -- Executing [[email protected]:8] Set("SIP/200-0000008d", "__FROMEXTEN=200") in new stack
    -- Executing [[email protected]:9] Set("SIP/200-0000008d", "__MON_FMT=wav") in new stack
    -- Executing [[email protected]:10] NoOp("SIP/200-0000008d", "Recordings initialized") in new stack
    -- Executing [[email protected]:11] ExecIf("SIP/200-0000008d", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [[email protected]:12] Set("SIP/200-0000008d", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [[email protected]:13] ExecIf("SIP/200-0000008d", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [[email protected]:14] GotoIf("SIP/200-0000008d", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [[email protected]:17] GotoIf("SIP/200-0000008d", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [[email protected]ck:1] NoOp("SIP/200-0000008d", "Outbound Recording Check from 200 to 4161234567") in new stack
    -- Executing [[email protected]:2] Set("SIP/200-0000008d", "RECMODE=dontcare") in new stack
    -- Executing [[email protected]:3] ExecIf("SIP/200-0000008d", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [[email protected]:7] Gosub("SIP/200-0000008d", "recordcheck,1(yes,out,4161234567)") in new stack
    -- Executing [[email protected]:1] NoOp("SIP/200-0000008d", "Starting recording check against yes") in new stack
    -- Executing [[email protected]:2] Goto("SIP/200-0000008d", "yes") in new stack
    -- Goto (sub-record-check,recordcheck,9)
    -- Executing [[email protected]:9] ExecIf("SIP/200-0000008d", "0?Return()") in new stack
    -- Executing [[email protected]:10] Set("SIP/200-0000008d", "__REC_POLICY_MODE=YES") in new stack
    -- Executing [[email protected]:11] Goto("SIP/200-0000008d", "startrec") in new stack
    -- Goto (sub-record-check,recordcheck,16)
    -- Executing [[email protected]:16] NoOp("SIP/200-0000008d", "Starting recording: out, 4161234567") in new stack
    -- Executing [[email protected]: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 [[email protected]:18] MixMonitor("SIP/200-0000008d", "2022/02/24/out-4161234567-200-20220224-004437-1645663477.181.wav,abi(LOCAL_MIXMON_ID),") in new stack
    -- Executing [[email protected]:19] Set("SIP/200-0000008d", "__MIXMON_ID=0x7f66480f4de0") in new stack
    -- Executing [[email protected]:20] Set("SIP/200-0000008d", "__RECORD_ID=SIP/200-0000008d") in new stack
    -- Executing [[email protected]:21] Set("SIP/200-0000008d", "__REC_STATUS=RECORDING") in new stack
    -- Executing [[email protected]:22] Set("SIP/200-0000008d", "CDR(recordingfile)=out-4161234567-200-20220224-004437-1645663477.181.wav") in new stack
    -- Executing [[email protected]:23] Return("SIP/200-0000008d", "") in new stack
    -- Executing [[email protected]:8] Return("SIP/200-0000008d", "") in new stack
    -- Executing [[email protected]:3] ExecIf("SIP/200-0000008d", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [[email protected]:4] Set("SIP/200-0000008d", "_ROUTEID=4") in new stack
    -- Executing [[email protected]:5] Set("SIP/200-0000008d", "_ROUTENAME=MultiTel-15141234567") in new stack
    -- Executing [[email protected]:6] Set("SIP/200-0000008d", "MOHCLASS=default") in new stack
    -- Executing [[email protected]:7] ExecIf("SIP/200-0000008d", "1?Set(TRUNKCIDOVERRIDE=15141234567)") in new stack
    -- Executing [[email protected]:8] Set("SIP/200-0000008d", "_CALLERIDNAMEINTERNAL=John Doe") in new stack
    -- Executing [[email protected]:9] Set("SIP/200-0000008d", "_CALLERIDNUMINTERNAL=200") in new stack
    -- Executing [[email protected]:10] Set("SIP/200-0000008d", "_EMAILNOTIFICATION=FALSE") in new stack
    -- Executing [[email protected]:11] Set("SIP/200-0000008d", "_NODEST=") in new stack
    -- Executing [[email protected]:12] Macro("SIP/200-0000008d", "dialout-trunk,34,14161234567,,off") in new stack
    -- Executing [[email protected]:1] Set("SIP/200-0000008d", "DIAL_TRUNK=34") in new stack
    -- Executing [[email protected]:2] ExecIf("SIP/200-0000008d", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack
    -- Executing [[email protected]:3] GosubIf("SIP/200-0000008d", "0?sub-pincheck,s,1()") in new stack
    -- Executing [[email protected]:4] ExecIf("SIP/200-0000008d", "0?Set(CALLERID(num)=200)") in new stack
    -- Executing [[email protected]:5] GotoIf("SIP/200-0000008d", "0?disabletrunk,1") in new stack
    -- Executing [[email protected]:6] Set("SIP/200-0000008d", "DIAL_NUMBER=14161234567") in new stack
  == Begin MixMonitor Recording SIP/200-0000008d
    -- Executing [[email protected]:7] Set("SIP/200-0000008d", "DIAL_TRUNK_OPTIONS=HhTtr") in new stack
    -- Executing [[email protected]:8] Set("SIP/200-0000008d", "OUTBOUND_GROUP=OUT_34") in new stack
    -- Executing [[email protected]:9] Set("SIP/200-0000008d", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [[email protected]:10] GotoIf("SIP/200-0000008d", "0?nomax") in new stack
    -- Executing [[email protected]:11] GotoIf("SIP/200-0000008d", "0?chanfull") in new stack
    -- Executing [[email protected]:12] GotoIf("SIP/200-0000008d", "0?skipoutcid") in new stack
    -- Executing [[email protected]:13] Macro("SIP/200-0000008d", "outbound-callerid,34") in new stack
    -- Executing [[email protected]:1] NoOp("SIP/200-0000008d", "200") in new stack
    -- Executing [[email protected]:2] NoOp("SIP/200-0000008d", "") in new stack
    -- Executing [[email protected]:3] NoOp("SIP/200-0000008d", "off") in new stack
    -- Executing [[email protected]:4] ExecIf("SIP/200-0000008d", "0?Set(CALLERPRES(name-pres)=)") in new stack
    -- Executing [[email protected]:5] ExecIf("SIP/200-0000008d", "0?Set(CALLERPRES(num-pres)=)") in new stack
    -- Executing [[email protected]:6] Set("SIP/200-0000008d", "HOTDESCKCHAN=200-0000008d") in new stack
    -- Executing [[email protected]:7] Set("SIP/200-0000008d", "HOTDESKEXTEN=200") in new stack
    -- Executing [[email protected]:8] Set("SIP/200-0000008d", "HOTDESKCALL=0") in new stack
    -- Executing [[email protected]:9] ExecIf("SIP/200-0000008d", "0?Set(HOTDESKCALL=1)") in new stack
    -- Executing [[email protected]:10] ExecIf("SIP/200-0000008d", "0?Set(CALLERID(name)=)") in new stack
    -- Executing [[email protected]:11] Set("SIP/200-0000008d", "ALLOWTHISROUTE=NO") in new stack
    -- Executing [[email protected]:12] ExecIf("SIP/200-0000008d", "0?Set(ALLOWTHISROUTE=YES)") in new stack
    -- Executing [[email protected]:13] ExecIf("SIP/200-0000008d", "0?Hangup()") in new stack
    -- Executing [[email protected]:14] ExecIf("SIP/200-0000008d", "0?Set(REALCALLERIDNUM=200)") in new stack
    -- Executing [[email protected]:15] ExecIf("SIP/200-0000008d", "0?Set(AMPUSER=200)") in new stack
    -- Executing [[email protected]:16] GotoIf("SIP/200-0000008d", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,20)
    -- Executing [[email protected]:20] Set("SIP/200-0000008d", "USEROUTCID=") in new stack
    -- Executing [[email protected]:21] Set("SIP/200-0000008d", "EMERGENCYCID=") in new stack
    -- Executing [[email protected]:22] ExecIf("SIP/200-0000008d", "0?Set(EMERGENCYCID=)") in new stack
    -- Executing [[email protected]:23] Set("SIP/200-0000008d", "TRUNKOUTCID=15141234567") in new stack
    -- Executing [[email protected]:24] GotoIf("SIP/200-0000008d", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,30)
    -- Executing [[email protected]:30] ExecIf("SIP/200-0000008d", "1?Set(CALLERID(all)=15141234567)") in new stack
    -- Executing [[email protected]:31] ExecIf("SIP/200-0000008d", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [[email protected]:32] ExecIf("SIP/200-0000008d", "1?Set(CALLERID(all)=15141234567)") in new stack
    -- Executing [[email protected]:33] ExecIf("SIP/200-0000008d", "0?Set(CALLERID(all)=200)") in new stack
    -- Executing [[email protected]:34] ExecIf("SIP/200-0000008d", "0?Set(CALLERID(all)=200)") in new stack
    -- Executing [[email protected]:35] Set("SIP/200-0000008d", "TIOHIDE=no") in new stack
    -- Executing [[email protected]:36] ExecIf("SIP/200-0000008d", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [[email protected]:37] ExecIf("SIP/200-0000008d", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [[email protected]:38] ExecIf("SIP/200-0000008d", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [[email protected]:39] ExecIf("SIP/200-0000008d", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [[email protected]:40] Set("SIP/200-0000008d", "CDR(outbound_cnum)=15141234567") in new stack
    -- Executing [[email protected]:41] Set("SIP/200-0000008d", "CDR(outbound_cnam)=") in new stack
    -- Executing [[email protected]:14] GosubIf("SIP/200-0000008d", "1?sub-flp-34,s,1()") in new stack
    -- Executing [[email protected]:1] ExecIf("SIP/200-0000008d", "1?Return()") in new stack
    -- Executing [[email protected]:15] Set("SIP/200-0000008d", "OUTNUM=14161234567") in new stack
    -- Executing [[email protected]:16] Set("SIP/200-0000008d", "custom=PJSIP") in new stack
    -- Executing [[email protected]:17] ExecIf("SIP/200-0000008d", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Ttr)") in new stack
    -- Executing [[email protected]:18] ExecIf("SIP/200-0000008d", "0?Set(DIAL_TRUNK_OPTIONS=TtrM(confirm))") in new stack
    -- Executing [[email protected]: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 [[email protected]: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 [[email protected]:21] Macro("SIP/200-0000008d", "dialout-trunk-predial-hook,") in new stack
    -- Executing [[email protected]:1] MacroExit("SIP/200-0000008d", "") in new stack
    -- Executing [[email protected]:22] GotoIf("SIP/200-0000008d", "0?bypass,1") in new stack
    -- Executing [[email protected]:23] ExecIf("SIP/200-0000008d", "1?Set(CONNECTEDLINE(num,i)=14161234567)") in new stack
    -- Executing [[email protected]:24] ExecIf("SIP/200-0000008d", "1?Set(CONNECTEDLINE(name,i)=CID:15141234567)") in new stack
    -- Executing [[email protected]:25] ExecIf("SIP/200-0000008d", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)15141234567)") in new stack
    -- Executing [[email protected]:26] GotoIf("SIP/200-0000008d", "0?customtrunk") in new stack
    -- Executing [[email protected]:27] ExecIf("SIP/200-0000008d", "0?Set(DIAL_TRUNK_OPTIONS=tr)") in new stack
    -- Executing [[email protected]:28] Set("SIP/200-0000008d", "HASH(__SIPHEADERS,Alert-Info)=unset") in new stack
    -- Executing [[email protected]:29] Dial("SIP/200-0000008d", "PJSIP/[email protected],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 [[email protected]:1] NoOp("PJSIP/MultiTel-15141234567-00000028", "Applying SIP Headers to channel PJSIP/MultiTel-15141234567-00000028") in new stack
    -- Executing [[email protected]:2] Set("PJSIP/MultiTel-15141234567-00000028", "TECH=PJSIP") in new stack
    -- Executing [[email protected]:3] Set("PJSIP/MultiTel-15141234567-00000028", "SIPHEADERKEYS=Alert-Info") in new stack
    -- Executing [[email protected]:4] While("PJSIP/MultiTel-15141234567-00000028", "1") in new stack
    -- Executing [[email protected]:5] Set("PJSIP/MultiTel-15141234567-00000028", "sipheader=unset") in new stack
    -- Executing [[email protected]:6] ExecIf("PJSIP/MultiTel-15141234567-00000028", "0?SIPRemoveHeader(Alert-Info:)") in new stack
    -- Executing [[email protected]: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 [[email protected]:8] ExecIf("PJSIP/MultiTel-15141234567-00000028", "0?Set(sipheader=<http://127.0.0.1>;info=unset)") in new stack
    -- Executing [[email protected]:9] ExecIf("PJSIP/MultiTel-15141234567-00000028", "0?Set(sipheader=<http://127.0.0.1>unset)") in new stack
    -- Executing [[email protected]:10] ExecIf("PJSIP/MultiTel-15141234567-00000028", "0?SIPAddHeader(Alert-Info:unset)") in new stack
    -- Executing [[email protected]:11] ExecIf("PJSIP/MultiTel-15141234567-00000028", "0?Set(PJSIP_HEADER(add,Alert-Info)=unset)") in new stack
    -- Executing [[email protected]:12] EndWhile("PJSIP/MultiTel-15141234567-00000028", "") in new stack
    -- Executing [[email protected]:4] While("PJSIP/MultiTel-15141234567-00000028", "0") in new stack
    -- Executing [[email protected]: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/[email protected]
<--- 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 [[email protected]:30] NoOp("SIP/200-0000008d", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 88") in new stack
    -- Executing [[email protected]:31] GotoIf("SIP/200-0000008d", "0?continue,1:s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [[email protected]:1] Set("SIP/200-0000008d", "RC=88") in new stack
    -- Executing [[email protected]:2] Goto("SIP/200-0000008d", "88,1") in new stack
    -- Goto (macro-dialout-trunk,88,1)
    -- Executing [[email protected]:1] Goto("SIP/200-0000008d", "continue,1") in new stack
    -- Goto (macro-dialout-trunk,continue,1)
    -- Executing [[email protected]:1] NoOp("SIP/200-0000008d", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 88 - failing through to other trunks") in new stack
    -- Executing [[email protected]:2] ExecIf("SIP/200-0000008d", "1?Set(CALLERID(number)=200)") in new stack
    -- Executing [[email protected]:13] Macro("SIP/200-0000008d", "outisbusy,") in new stack
    -- Executing [[email protected]:1] Progress("SIP/200-0000008d", "") in new stack
    -- Executing [[email protected]:2] GotoIf("SIP/200-0000008d", "0?emergency,1") in new stack
    -- Executing [[email protected]:3] GotoIf("SIP/200-0000008d", "0?intracompany,1") in new stack
    -- Executing [[email protected]: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 [[email protected]: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 [[email protected]:1] Macro("SIP/200-0000008d", "hangupcall") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/200-0000008d", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [[email protected]:3] ExecIf("SIP/200-0000008d", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [[email protected]: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.