IVR with an external option fails

I have an issue with my IVR which has a digit option that need to handle callers to an external number.

I did two approaches as:

  • Ring group with the external number followed by #
  • Virtual extension with local/[email protected]

the problem is that when the IVR option is pressed it ring o ring and hangup.

The interesting part is that both approaches work will when dialing their extensions directly, but not from the IVR.

a sample tail for debugging:

== Spawn extension (from-trunk-sip-+XXsip_trunkXX, XXexternal_numkXX, 1) exited non-zero on 'SIP/+XXsip_trunkXX-00000074'
    -- SIP/+XXsip_trunkXX-00000074 Internal Gosub(func-apply-sipheaders,s,1(1)) complete GOSUB_RETVAL=
    -- Called SIP/+XXsip_trunkXX/XXexternal_numkXX
    -- SIP/+XXsip_trunkXX-00000074 redirecting info has changed, passing it to Local/[email protected];2
    -- Redirecting update to SIP/XXsip_trubkkXX-00000073 prevented.
    -- SIP/+XXsip_trunkXX-00000074 is making progress passing it to Local/[email protected];2
    -- Local/[email protected];1 is making progress passing it to SIP/XXsip_trubkkXX-00000073
    -- Got SIP response 486 "Busy Here" back from XXsip_hostXX:5060
    -- SIP/+XXsip_trunkXX-00000074 is busy
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [[email protected]:28] NoOp("Local/[email protected];2", "Dial failed for some reason with DIALSTATUS = BUSY and HANGUPCAUSE = 17") in new stack
    -- Executing [[email protected]:29] GotoIf("Local/[email protected];2", "0?continue,1:s-BUSY,1") in new stack
    -- Goto (macro-dialout-trunk,s-BUSY,1)
    -- Executing [[email protected]:1] NoOp("Local/[email protected];2", "Dial failed due to trunk reporting BUSY - giving up") in new stack
    -- Executing [[email protected]:2] PlayTones("Local/[email protected];2", "busy") in new stack
    -- Executing [[email protected]:3] Busy("Local/[email protected];2", "20") in new stack
    -- Local/[email protected];1 is busy
  == Spawn extension (macro-dialout-trunk, s-BUSY, 3) exited non-zero on 'Local/[email protected];2' in macro 'dialout-trunk'
  == Spawn extension (from-internal, XXexternal_numkXX, 12) exited non-zero on 'Local/[email protected];2'
    -- Executing [[email protected]:1] Macro("Local/[email protected];2", "hangupcall") in new stack
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [[email protected]:56] ExecIf("SIP/XXsip_trubkkXX-00000073", "0?MacroExit()") in new stack
    -- Executing [[email protected]:1] GotoIf("Local/[email protected];2", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [[email protected]:57] ExecIf("SIP/XXsip_trubkkXX-00000073", "0?Set(DIALSTATUS=)") in new stack
    -- Executing [[email protected]:3] ExecIf("Local/[email protected];2", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [[email protected]:4] NoOp("Local/[email protected];2", " montior file= ") in new stack
    -- Executing [[email protected]:58] GosubIf("SIP/XXsip_trubkkXX-00000073", "0?s-BUSY,1()") in new stack
    -- Executing [[email protected]:5] GotoIf("Local/[email protected];2", "1?skipagi") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [[email protected]:7] Hangup("Local/[email protected];2", "") in new stack
    -- Executing [[email protected]:59] MacroExit("SIP/XXsip_trubkkXX-00000073", "") in new stack
  == Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'Local/[email protected];2' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'Local/[email protected];2'
    -- Executing [[email protected]:15] Set("SIP/XXsip_trubkkXX-00000073", "SV_DIALSTATUS=BUSY") in new stack
    -- Executing [[email protected]:16] GosubIf("SIP/XXsip_trubkkXX-00000073", "0?docfu,1()") in new stack
    -- Executing [[email protected]:17] GosubIf("SIP/XXsip_trubkkXX-00000073", "0?docfb,1()") in new stack
    -- Executing [[email protected]:18] Set("SIP/XXsip_trubkkXX-00000073", "DIALSTATUS=BUSY") in new stack
    -- Executing [[email protected]:19] ExecIf("SIP/XXsip_trubkkXX-00000073", "0?MacroExit()") in new stack
    -- Executing [[email protected]:20] GotoIf("SIP/XXsip_trubkkXX-00000073", "1?s-BUSY,1") in new stack
    -- Goto (macro-exten-vm,s-BUSY,1)
    -- Executing [[email protected]:1] GotoIf("SIP/XXsip_trubkkXX-00000073", "0?exit,1") in new stack
    -- Executing [[email protected]:2] PlayTones("SIP/XXsip_trubkkXX-00000073", "busy") in new stack
    -- Executing [[email protected]:3] Busy("SIP/XXsip_trubkkXX-00000073", "20") in new stack
  == Spawn extension (macro-exten-vm, s-BUSY, 3) exited non-zero on 'SIP/XXsip_trubkkXX-00000073' in macro 'exten-vm'
  == Spawn extension (from-did-direct, 402, 3) exited non-zero on 'SIP/XXsip_trubkkXX-00000073'
    -- Executing [[email protected]:1] Macro("SIP/XXsip_trubkkXX-00000073", "hangupcall,") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/XXsip_trubkkXX-00000073", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [[email protected]:3] ExecIf("SIP/XXsip_trubkkXX-00000073", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [[email protected]:4] NoOp("SIP/XXsip_trubkkXX-00000073", " montior file= ") in new stack
    -- Executing [[email protected]:5] GotoIf("SIP/XXsip_trubkkXX-00000073", "1?skipagi") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [[email protected]:7] Hangup("SIP/XXsip_trubkkXX-00000073", "") in new stack
  == Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'SIP/XXsip_trubkkXX-00000073' in macro 'hangupcall'
  == Spawn extension (from-did-direct, h, 1) exited non-zero on 'SIP/XXsip_trubkkXX-00000073'

I suspect that either your trunking provider does not allow you to send a caller ID that is not yours, or the terminating carrier rejected the call because the calling number appears spoofed.

Use a Ring Group, set Change External CID Configuration to Fixed CID Value and set Fixed CID Value to your main number, in the format your provider expects.

Good point Stew, but Why it success when dial the extension directly?

Their internal extension number, or an extension with FollowMe?
To call an internal extension, the call does not get routed through your Trunk.

To understand exactly what’s happening, please enable sip debug and share the output via pastebin

pjsip set logger on

Edit, it seems like you are using chan_sip. So you’ll need to use

sip set debug on
    -- Executing [[email protected]:2] Set("Local/[email protected];2", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [[email protected]:3] Set("Local/[email protected];2", "NOW=1647792965") in new stack
    -- Executing [[email protected]:4] Set("Local/[email protected];2", "__DAY=20") in new stack
    -- Executing [[email protected]:5] Set("Local/[email protected];2", "__MONTH=03") in new stack
    -- Executing [[email protected]:6] Set("Local/[email protected];2", "__YEAR=2022") in new stack
    -- Executing [[email protected]:7] Set("Local/[email protected];2", "__TIMESTR=20220320-191605") in new stack
    -- Executing [[email protected]:8] Set("Local/[email protected];2", "__FROMEXTEN=xxexternal-numberxx") in new stack
    -- Executing [[email protected]:9] Set("Local/[email protected]nal-000000fa;2", "__MON_FMT=wav") in new stack
    -- Executing [[email protected]:10] NoOp("Local/[email protected];2", "Recordings initialized") in new stack
    -- Executing [[email protected]:11] ExecIf("Local/[email protected];2", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [[email protected]:12] Set("Local/[email protected];2", "REC_POLICY_MODE_SAVE=NEVER") in new stack
    -- Executing [[email protected]:13] ExecIf("Local/[email protected];2", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [[email protected]:14] GotoIf("Local/[email protected];2", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [[email protected]:17] GotoIf("Local/[email protected];2", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [[email protected]:1] NoOp("Local/[email protected];2", "Outbound Recording Check from xxexternal-numberxx to xxexternal-numberxx") in new stack
    -- Executing [[email protected]:2] Set("Local/[email protected];2", "RECMODE=") in new stack
    -- Executing [[email protected]:3] ExecIf("Local/[email protected];2", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [[email protected]:7] Gosub("Local/[email protected];2", "recordcheck,1(dontcare,out,xxexternal-numberxx)") in new stack
    -- Executing [[email protected]:1] NoOp("Local/[email protected];2", "Starting recording check against dontcare") in new stack
    -- Executing [[email protected]:2] Goto("Local/[email protected];2", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [[email protected]:3] Return("Local/[email protected];2", "") in new stack
    -- Executing [[email protected]:8] Return("Local/[email protected];2", "") in new stack
    -- Executing [[email protected]:3] Set("Local/[email protected];2", "ROUTE_CIDSAVE="xxexternal-numberxx" <xxexternal-numberxx>") in new stack
    -- Executing [[email protected]:4] Set("Local/[email protected];2", "_ROUTEID=1") in new stack
    -- Executing [[email protected]:5] Set("Local/[email protected];2", "_ROUTENAME=xxoutbound-trunkxx") in new stack
    -- Executing [[email protected]:6] Set("Local/[email protected];2", "MOHCLASS=default") in new stack
    -- Executing [[email protected]:7] ExecIf("Local/[email protected];2", "0?Set(TRUNKCIDOVERRIDE=+966xxoutbound-trunkxx)") in new stack
    -- Executing [[email protected]:8] Set("Local/[email protected];2", "_CALLERIDNAMEINTERNAL=xxexternal-numberxx") in new stack
    -- Executing [[email protected]:9] Set("Local/[email protected];2", "_CALLERIDNUMINTERNAL=xxexternal-numberxx") in new stack
    -- Executing [[email protected]:10] Set("Local/[email protected];2", "_EMAILNOTIFICATION=FALSE") in new stack
    -- Executing [[email protected]:11] Set("Local/[email protected];2", "_NODEST=") in new stack
    -- Executing [[email protected]:12] Macro("Local/[email protected];2", "dialout-trunk,1,xxexternal-numberxx,,off") in new stack
    -- Executing [[email protected]:1] Set("Local/[email protected];2", "DIAL_TRUNK=1") in new stack
    -- Executing [[email protected]:2] ExecIf("Local/[email protected];2", "1?Set(DIAL_OPTIONS=Hhtr)") in new stack
    -- Executing [[email protected]:3] GosubIf("Local/[email protected];2", "0?sub-pincheck,s,1()") in new stack
    -- Executing [[email protected]:4] ExecIf("Local/[email protected];2", "0?Set(CALLERID(num)=)") in new stack
    -- Executing [[email protected]:5] GotoIf("Local/[email protected];2", "0?disabletrunk,1") in new stack
    -- Executing [[email protected]:6] Set("Local/[email protected];2", "DIAL_NUMBER=xxexternal-numberxx") in new stack
    -- Executing [[email protected]:7] Set("Local/[email protected];2", "DIAL_TRUNK_OPTIONS=Hhtr") in new stack
    -- Executing [[email protected]:8] Set("Local/[email protected];2", "OUTBOUND_GROUP=OUT_1") in new stack
    -- Executing [[email protected]:9] Set("Local/[email protected];2", "DIAL_TRUNK_OPTIONS=T") in new stack
    -- Executing [[email protected]:10] GotoIf("Local/[email protected];2", "0?nomax") in new stack
    -- Executing [[email protected]:11] GotoIf("Local/[email protected];2", "0?chanfull") in new stack
    -- Executing [[email protected]:12] GotoIf("Local/[email protected];2", "0?skipoutcid") in new stack
    -- Executing [[email protected]:13] Macro("Local/[email protected];2", "outbound-callerid,1") in new stack
    -- Executing [[email protected]:1] NoOp("Local/[email protected];2", "xxexternal-numberxx") in new stack
    -- Executing [[email protected]:2] NoOp("Local/[email protected];2", "TRUE") in new stack
    -- Executing [[email protected]:3] NoOp("Local/[email protected];2", "all") in new stack
    -- Executing [[email protected]:4] ExecIf("Local/[email protected];2", "1?Set(CALLERPRES(name-pres)=allowed_not_screened)") in new stack
    -- Executing [[email protected]:5] ExecIf("Local/[email protected];2", "1?Set(CALLERPRES(num-pres)=allowed_not_screened)") in new stack
    -- Executing [[email protected]:6] Set("Local/[email protected];2", "[email protected];2") in new stack
    -- Executing [[email protected]:7] Set("Local/[email protected];2", "[email protected]") in new stack
    -- Executing [[email protected]:8] Set("Local/[email protected];2", "HOTDESKCALL=0") in new stack
    -- Executing [[email protected]:9] ExecIf("Local/[email protected];2", "0?Set(HOTDESKCALL=1)") in new stack
    -- Executing [[email protected]:10] ExecIf("Local/[email protected];2", "0?Set(CALLERID(name)=)") in new stack
    -- Executing [[email protected]:11] Set("Local/[email protected];2", "ALLOWTHISROUTE=NO") in new stack
    -- Executing [[email protected]:12] ExecIf("Local/[email protected];2", "0?Set(ALLOWTHISROUTE=YES)") in new stack
    -- Executing [[email protected]:13] ExecIf("Local/[email protected];2", "0?Hangup()") in new stack
    -- Executing [[email protected]:14] ExecIf("Local/[email protected];2", "0?Set(REALCALLERIDNUM=xxexternal-numberxx)") in new stack
    -- Executing [[email protected]:15] ExecIf("Local/[email protected];2", "0?Set(AMPUSER=xxexternal-numberxx)") in new stack
    -- Executing [[email protected]:16] GotoIf("Local/[email protected];2", "0?normcid") in new stack
    -- Executing [[email protected]:17] Set("Local/[email protected];2", "USEROUTCID=xxexternal-numberxx <xxexternal-numberxx>") in new stack
    -- Executing [[email protected]:18] GotoIf("Local/[email protected];2", "0?normcid") in new stack
    -- Executing [[email protected]:19] GotoIf("Local/[email protected];2", "1?bypass") in new stack
    -- Goto (macro-outbound-callerid,s,21)
    -- Executing [[email protected]:21] Set("Local/[email protected];2", "EMERGENCYCID=") in new stack
    -- Executing [[email protected]:22] ExecIf("Local/[email protected];2", "0?Set(EMERGENCYCID=)") in new stack
    -- Executing [[email protected]:23] Set("Local/[email protected];2", "TRUNKOUTCID=+966xxoutbound-trunkxx") in new stack
    -- Executing [[email protected]:24] GotoIf("Local/[email protected];2", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,30)
    -- Executing [[email protected]:30] ExecIf("Local/[email protected];2", "1?Set(CALLERID(all)=+966xxoutbound-trunkxx)") in new stack
    -- Executing [[email protected]:31] ExecIf("Local/[email protected];2", "1?Set(CALLERID(all)=xxexternal-numberxx <xxexternal-numberxx>)") in new stack
    -- Executing [[email protected]:32] ExecIf("Local/[email protected];2", "1?Set(CALLERID(all)=+966xxoutbound-trunkxx)") in new stack
    -- Executing [[email protected]:33] ExecIf("Local/[email protected];2", "0?Set(CALLERID(all)=xxexternal-numberxx)") in new stack
    -- Executing [[email protected]:34] Set("Local/[email protected];2", "TIOHIDE=no") in new stack
    -- Executing [[email protected]:35] ExecIf("Local/[email protected];2", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [[email protected]:36] ExecIf("Local/[email protected];2", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [[email protected]:37] ExecIf("Local/[email protected];2", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [[email protected]:38] ExecIf("Local/[email protected];2", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [[email protected]:39] Set("Local/[email protected];2", "CDR(outbound_cnum)=+966xxoutbound-trunkxx") in new stack
    -- Executing [[email protected]:40] Set("Local/[email protected];2", "CDR(outbound_cnam)=") in new stack
    -- Executing [[email protected]:14] GosubIf("Local/[email protected];2", "1?sub-flp-1,s,1()") in new stack
    -- Executing [[email protected]:1] ExecIf("Local/[email protected];2", "1?Return()") in new stack
    -- Executing [[email protected]:15] Set("Local/[email protected];2", "OUTNUM=xxexternal-numberxx") in new stack
    -- Executing [[email protected]:16] Set("Local/[email protected];2", "custom=SIP/+966xxoutbound-trunkxx") in new stack
    -- Executing [[email protected]:17] ExecIf("Local/[email protected];2", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
    -- Executing [[email protected]:18] ExecIf("Local/[email protected];2", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack
    -- Executing [[email protected]:19] Macro("Local/[email protected];2", "dialout-trunk-predial-hook,") in new stack
    -- Executing [[email protected]:1] MacroExit("Local/[email protected];2", "") in new stack
    -- Executing [[email protected]:20] GotoIf("Local/[email protected];2", "0?bypass,1") in new stack
    -- Executing [[email protected]:21] ExecIf("Local/[email protected];2", "0?Set(CONNECTEDLINE(num,i)=xxexternal-numberxx)") in new stack
    -- Executing [[email protected]:22] ExecIf("Local/[email protected];2", "0?Set(CONNECTEDLINE(name,i)=CID:+966xxoutbound-trunkxx)") in new stack
    -- Executing [[email protected]:23] ExecIf("Local/[email protected];2", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)+966xxoutbound-trunkxx)") in new stack
    -- Executing [[email protected]:24] GotoIf("Local/[email protected];2", "0?customtrunk") in new stack
    -- Executing [[email protected]:25] ExecIf("Local/[email protected];2", "1?Set(DIAL_TRUNK_OPTIONS=)") in new stack
    -- Executing [[email protected]:26] Set("Local/[email protected];2", "HASH(__SIPHEADERS,Alert-Info)=unset") in new stack
    -- Executing [[email protected]:27] Dial("Local/[email protected];2", "SIP/+966xxoutbound-trunkxx/xxexternal-numberxx,300,b(func-apply-sipheaders^s^1,(1))U(sub-send-obroute-email^xxexternal-numberxx^xxexternal-numberxx^1^1647792965^^+966xxoutbound-trunkxx)") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- SIP/+966xxoutbound-trunkxx-00000083 Internal Gosub(func-apply-sipheaders,s,1(1)) start
    -- Executing [[email protected]:1] NoOp("SIP/+966xxoutbound-trunkxx-00000083", "Applying SIP Headers to channel SIP/+966xxoutbound-trunkxx-00000083") in new stack
    -- Executing [[email protected]:2] Set("SIP/+966xxoutbound-trunkxx-00000083", "TECH=SIP") in new stack
    -- Executing [[email protected]:3] Set("SIP/+966xxoutbound-trunkxx-00000083", "SIPHEADERKEYS=Alert-Info") in new stack
    -- Executing [[email protected]:4] While("SIP/+966xxoutbound-trunkxx-00000083", "1") in new stack
    -- Executing [[email protected]:5] Set("SIP/+966xxoutbound-trunkxx-00000083", "sipheader=unset") in new stack
    -- Executing [[email protected]:6] ExecIf("SIP/+966xxoutbound-trunkxx-00000083", "1?SIPRemoveHeader(Alert-Info:)") in new stack
    -- Executing [[email protected]:7] ExecIf("SIP/+966xxoutbound-trunkxx-00000083", "0?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack
    -- Executing [[email protected]:8] ExecIf("SIP/+966xxoutbound-trunkxx-00000083", "0?Set(sipheader=<http://127.0.0.1>;info=unset)") in new stack
    -- Executing [[email protected]:9] ExecIf("SIP/+966xxoutbound-trunkxx-00000083", "0?Set(sipheader=<http://127.0.0.1>unset)") in new stack
    -- Executing [[email protected]:10] ExecIf("SIP/+966xxoutbound-trunkxx-00000083", "0?SIPAddHeader(Alert-Info:unset)") in new stack
    -- Executing [[email protected]:11] ExecIf("SIP/+966xxoutbound-trunkxx-00000083", "0?Set(PJSIP_HEADER(add,Alert-Info)=unset)") in new stack
    -- Executing [[email protected]:12] EndWhile("SIP/+966xxoutbound-trunkxx-00000083", "") in new stack
    -- Executing [[email protected]:4] While("SIP/+966xxoutbound-trunkxx-00000083", "0") in new stack
    -- Executing [[email protected]:13] Return("SIP/+966xxoutbound-trunkxx-00000083", "") in new stack
  == Spawn extension (from-trunk-sip-+966xxoutbound-trunkxx, xxexternal-numberxx, 1) exited non-zero on 'SIP/+966xxoutbound-trunkxx-00000083'
    -- SIP/+966xxoutbound-trunkxx-00000083 Internal Gosub(func-apply-sipheaders,s,1(1)) complete GOSUB_RETVAL=
Audio is at 10314
Adding codec ulaw to SDP
Adding codec alaw to SDP
Adding codec g726 to SDP
Adding codec g722 to SDP
Adding codec ilbc to SDP
Adding codec gsm to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to xxsip-hostxx:5060:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP xxgatewayxx:5160;branch=z9hG4bK761586e4;rport
Max-Forwards: 70
From: <sip:[email protected]:5160>;tag=as1ea51e35
To: <sip:[email protected]>
Contact: <sip:[email protected]x:5160>
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: FPBX-15.0.16.75(16.21.1)
Date: Sun, 20 Mar 2022 16:16:05 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 399

v=0
o=root 675961640 675961640 IN IP4 xxgatewayxx
s=Asterisk PBX 16.21.1
c=IN IP4 xxgatewayxx
t=0 0
m=audio 10314 RTP/AVP 0 8 111 9 97 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:9 G722/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

---
    -- Called SIP/+966xxoutbound-trunkxx/xxexternal-numberxx

<--- SIP read from UDP:xxsip-hostxx:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP xxgatewayxx:5160;branch=z9hG4bK761586e4;rport=5160
Call-ID: [email protected]
From: <sip:[email protected]:5160>;tag=as1ea51e35
To: <sip:[email protected]>
CSeq: 102 INVITE
Content-Length: 0

<------------->
--- (7 headers 0 lines) ---

<--- SIP read from UDP:xxsip-hostxx:5060 --->
SIP/2.0 181 Call Is Being Forwarded
Via: SIP/2.0/UDP xxgatewayxx:5160;branch=z9hG4bK761586e4;rport=5160
Record-Route: <sip:xxsip-hostxx:5060;transport=udp;lr>
Call-ID: [email protected]
From: <sip:[email protected]:5160>;tag=as1ea51e35
To: <sip:[email protected]>;tag=sbc0911y9n8nvmw
CSeq: 102 INVITE
Contact: <sip:xxsip-hostxx:5060>
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
sip_route_dump: route/path hop: <sip:xxsip-hostxx:5060;transport=udp;lr>
    -- SIP/+966xxoutbound-trunkxx-00000083 redirecting info has changed, passing it to Local/[email protected];2
    -- Redirecting update to SIP/xxtrunkxx-00000082 prevented.

<--- SIP read from UDP:xxsip-hostxx:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP xxgatewayxx:5160;branch=z9hG4bK761586e4;rport=5160
Record-Route: <sip:xxsip-hostxx:5060;transport=udp;lr>
Call-ID: [email protected]
From: <sip:[email protected]:5160>;tag=as1ea51e35
To: <sip:[email protected]>;tag=sbc0911y9n8nvmw
CSeq: 102 INVITE
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,PRACK,NOTIFY,MESSAGE
Contact: <sip:xxsip-hostxx:5060>
P-Asserted-Service-Info: vrbt=00
Content-Length: 192
Content-Type: application/sdp

v=0
o=- 133669906 133669906 IN IP4 xxsip-ipxx.42.124
s=SBC call
c=IN IP4 xxsip-ipxx.42.124
t=0 0
m=audio 13170 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=ptime:20
<------------->
--- (12 headers 9 lines) ---
sip_route_dump: route/path hop: <sip:xxsip-hostxx:5060;transport=udp;lr>
Got SDP version 133669906 and unique parts [- 133669906 IN IP4 xxsip-ipxx.42.124]
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw|alaw|g729|g726|g723|g722|ilbc|gsm), peer - audio=(ulaw)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port xxsip-ipxx.42.124:13170
    -- SIP/+966xxoutbound-trunkxx-00000083 is making progress passing it to Local/[email protected];2
    -- Local/[email protected];1 is making progress passing it to SIP/xxtrunkxx-00000082

<--- SIP read from UDP:xxsip-hostxx:5060 --->
SIP/2.0 486 Busy Here
Via: SIP/2.0/UDP xxgatewayxx:5160;branch=z9hG4bK761586e4;rport=5160
Call-ID: [email protected]
From: <sip:[email protected]:5160>;tag=as1ea51e35
To: <sip:[email protected]>;tag=sbc0911y9n8nvmw
CSeq: 102 INVITE
Reason: Q.850;cause=17;text="User busy",SIP;cause=486
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---
    -- Got SIP response 486 "Busy Here" back from xxsip-hostxx:5060
Transmitting (NAT) to xxsip-hostxx:5060:
ACK sip:xxsip-hostxx:5060 SIP/2.0
Via: SIP/2.0/UDP xxgatewayxx:5160;branch=z9hG4bK761586e4;rport
Route: <sip:xxsip-hostxx:5060;transport=udp;lr>
Max-Forwards: 70
From: <sip:[email protected]:5160>;tag=as1ea51e35
To: <sip:[email protected]>;tag=sbc0911y9n8nvmw
Contact: <sip:[email protected]:5160>
Call-ID: [email protected]
CSeq: 102 ACK
User-Agent: FPBX-15.0.16.75(16.21.1)
Content-Length: 0


---
    -- SIP/+966xxoutbound-trunkxx-00000083 is busy
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [[email protected]:28] NoOp("Local/[email protected];2", "Dial failed for some reason with DIALSTATUS = BUSY and HANGUPCAUSE = 17") in new stack
    -- Executing [[email protected]:29] GotoIf("Local/[email protected];2", "0?continue,1:s-BUSY,1") in new stack
    -- Goto (macro-dialout-trunk,s-BUSY,1)
    -- Executing [[email protected]:1] NoOp("Local/[email protected];2", "Dial failed due to trunk reporting BUSY - giving up") in new stack
    -- Executing [[email protected]:2] PlayTones("Local/[email protected];2", "busy") in new stack
    -- Executing [[email protected]:3] Busy("Local/[email protected];2", "20") in new stack
    -- Local/[email protected];1 is busy
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [[email protected]:56] ExecIf("SIP/xxtrunkxx-00000082", "0?MacroExit()") in new stack
  == Spawn extension (macro-dialout-trunk, s-BUSY, 3) exited non-zero on 'Local/[email protected];2' in macro 'dialout-trunk'
    -- Executing [[email protected]:57] ExecIf("SIP/xxtrunkxx-00000082", "0?Set(DIALSTATUS=)") in new stack
  == Spawn extension (from-internal, xxexternal-numberxx, 12) exited non-zero on 'Local/[email protected];2'
    -- Executing [[email protected]:58] GosubIf("SIP/xxtrunkxx-00000082", "0?s-BUSY,1()") in new stack
    -- Executing [[email protected]:59] MacroExit("SIP/xxtrunkxx-00000082", "") in new stack
    -- Executing [[email protected]:15] Set("SIP/xxtrunkxx-00000082", "SV_DIALSTATUS=BUSY") in new stack
    -- Executing [[email protected]:1] Macro("Local/[email protected];2", "hangupcall") in new stack
    -- Executing [[email protected]:16] GosubIf("SIP/xxtrunkxx-00000082", "0?docfu,1()") in new stack
    -- Executing [[email protected]:17] GosubIf("SIP/xxtrunkxx-00000082", "0?docfb,1()") in new stack
    -- Executing [[email protected]:18] Set("SIP/xxtrunkxx-00000082", "DIALSTATUS=BUSY") in new stack
    -- Executing [[email protected]:19] ExecIf("SIP/xxtrunkxx-00000082", "0?MacroExit()") in new stack
    -- Executing [[email protected]:20] GotoIf("SIP/xxtrunkxx-00000082", "1?s-BUSY,1") in new stack
    -- Goto (macro-exten-vm,s-BUSY,1)
    -- Executing [[email protected]:1] GotoIf("SIP/xxtrunkxx-00000082", "0?exit,1") in new stack
    -- Executing [[email protected]:2] PlayTones("SIP/xxtrunkxx-00000082", "busy") in new stack
    -- Executing [[email protected]:3] Busy("SIP/xxtrunkxx-00000082", "20") in new stack
    -- Executing [[email protected]:1] GotoIf("Local/[email protected];2", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [[email protected]:3] ExecIf("Local/[email protected];2", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [[email protected]:4] NoOp("Local/[email protected];2", " montior file= ") in new stack
    -- Executing [[email protected]:5] GotoIf("Local/[email protected];2", "1?skipagi") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [[email protected]:7] Hangup("Local/[email protected];2", "") in new stack
  == Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'Local/[email protected];2' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'Local/[email protected];2'
Really destroying SIP dialog '[email protected]' Method: INVITE
[2022-03-20 19:16:08] NOTICE[4115][C-0000006e]: translate.c:603 ast_translate: 2886 lost frame(s) 2887/0 ([email protected])->([email protected])

<--- SIP read from UDP:xxsip-hostxx:5060 --->
BYE sip:[email protected]:5160 SIP/2.0
Via: SIP/2.0/UDP xxsip-hostxx:5060;branch=z9hG4bKf9ngd9gdheo9ovwhhheafaindT09679
Call-ID: [email protected]
From: <tel:xxexternal-numberxx;noa=national;srvattri=national;phone-context=+966>;tag=sbc0906l7u4g77i
To: <sip:xxinbound-trunkxx;[email protected];user=phone>;tag=as1e6763b8
CSeq: 2 BYE
Allow: ACK,BYE,CANCEL,INFO,INVITE,MESSAGE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE
Max-Forwards: 63
Supported: 100rel,path,replaces
User-Agent: iOS/15.3.1 iPhone
Reason: SIP;cause=200;text="User Triggered"
P-Asserted-Identity: <sip:[email protected]>
Privacy: none
Session-ID: 562dd6fc0acbf26a7f0d8f10c50a12c4
Content-Length: 0

<------------->
--- (15 headers 0 lines) ---
Sending to xxsip-hostxx:5060 (NAT)
Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: BYE)

<--- Transmitting (NAT) to xxsip-hostxx:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP xxsip-hostxx:5060;branch=z9hG4bKf9ngd9gdheo9ovwhhheafaindT09679;received=xxsip-hostxx;rport=5060
From: <tel:xxexternal-numberxx;noa=national;srvattri=national;phone-context=+966>;tag=sbc0906l7u4g77i
To: <sip:xxinbound-trunkxx;[email protected];user=phone>;tag=as1e6763b8
Call-ID: [email protected]
CSeq: 2 BYE
Server: FPBX-15.0.16.75(16.21.1)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
  == Spawn extension (macro-exten-vm, s-BUSY, 3) exited non-zero on 'SIP/xxtrunkxx-00000082' in macro 'exten-vm'
  == Spawn extension (from-did-direct, 402, 3) exited non-zero on 'SIP/xxtrunkxx-00000082'
    -- Executing [[email protected]:1] Macro("SIP/xxtrunkxx-00000082", "hangupcall,") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/xxtrunkxx-00000082", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [[email protected]:3] ExecIf("SIP/xxtrunkxx-00000082", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [[email protected]:4] NoOp("SIP/xxtrunkxx-00000082", " montior file= ") in new stack
    -- Executing [[email protected]:5] GotoIf("SIP/xxtrunkxx-00000082", "1?skipagi") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [[email protected]:7] Hangup("SIP/xxtrunkxx-00000082", "") in new stack
  == Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'SIP/xxtrunkxx-00000082' in macro 'hangupcall'
  == Spawn extension (from-did-direct, h, 1) exited non-zero on 'SIP/xxtrunkxx-00000082'




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