I am using Asterisk version 16.16.1 and the latest FreePBX version 16.0.21.
I am maintaining two separate trunk setups towards the same SIP provider as it can be queried with the command “sip show peers”, showing the following output:
Name/username Host Dyn Forcerport Comedia ACL Port Status
Adip1/555123456 191.162.216.126 Yes Yes 5060 OK (7 ms)
Adip2/555456789 191.162.216.126 Yes Yes 5060 OK (7 ms)
When I make a SIP call with the caller ID “555124680” towards the trunk identified with the user name “555456789” (trunk name “Adip2”), the call completion simply gets aborted, and the Asterisk log shows the following entries:
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [555456789@from-trunk-sip-Adip1:1] Set("SIP/Adip1-00000023", "GROUP()=OUT_4") in new stack
-- Executing [555456789@from-trunk-sip-Adip1:2] Goto("SIP/Adip1-00000023", "from-trunk, 555456789,1") in new stack
-- Goto (from-trunk,555456789,1)
-- Executing [555456789@from-trunk:1] NoOp("SIP/Adip1-00000023", "CALLERID(num)=555124680") in new stack
-- Executing [555456789@from-trunk:2] NoOp("SIP/Adip1-00000023", "CALLERID(name)=555124680") in new stack
-- Executing [555456789@from-trunk:3] NoOp("SIP/Adip1-00000023", "EXTEN=555456789") in new stack
-- Executing [555456789@from-trunk:4] NoOp("SIP/Adip1-00000023", "CHANNEL=SIP/Adip1-00000023") in new stack
-- Executing [555456789@from-trunk:5] Set("SIP/Adip1-00000023", "CALLERID(num)=555124680") in new stack
-- Auto fallthrough, channel 'SIP/Adip1-00000023' status is 'UNKNOWN'
-- Executing [h@from-trunk:1] Macro("SIP/Adip1-00000023", "hangupcall,") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/Adip1-00000023", "1?theend") in new stack
-- Goto (macro-hangupcall,s,3)
-- Executing [s@macro-hangupcall:3] ExecIf("SIP/Adip1-00000023", "0?Set(CDR(recordingfile)=)") in new stack
-- Executing [s@macro-hangupcall:4] Hangup("SIP/Adip1-00000023", "") in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/Adip1-00000023' in macro 'hangupcall'
== Spawn extension (from-trunk, h, 1) exited non-zero on 'SIP/Adip1-0000002
When I make a SIP call with the same caller ID “555124680” towards the trunk identified with the user name “555123456” (trunk name “Adip1”), the call gets completed and the destination rings. The Asterisk log shows the following entries:
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [555123456@from-trunk-sip-Adip1:1] Set("SIP/Adip1-00000025", "GROUP()=OUT_4") in new stack
-- Executing [555123456@from-trunk-sip-Adip1:2] Goto("SIP/Adip1-00000025", "from-trunk,555123456,1") in new stack
-- Goto (from-trunk,555123456,1)
-- Executing [555123456@from-trunk:1] NoOp("SIP/Adip1-00000025", "CALLERID(num)=555124680") in new stack
-- Executing [555123456@from-trunk:2] NoOp("SIP/Adip1-00000025", "CALLERID(name)=555124680") in new stack
-- Executing [555123456@from-trunk:3] NoOp("SIP/Adip1-00000025", "EXTEN=555123456") in new stack
-- Executing [555123456@from-trunk:4] NoOp("SIP/Adip1-00000025", "CHANNEL=SIP/Adip1-00000025") in new stack
-- Executing [555123456@from-trunk:5] Set("SIP/Adip1-00000025", "CALLERID(num)=555124680") in new stack
-- Executing [555123456@from-trunk:6] Set("SIP/Adip1-00000025", "__DIRECTION=INBOUND") in new stack
-- Executing [555123456@from-trunk:7] Gosub("SIP/Adip1-00000025", "app-blacklist-check,s,1()") in new stack
-- Executing [555123456@from-trunk:8] ExecIf("SIP/Adip1-00000025", "1?Set(__FROM_DID=555124680)") in new stack
-- Executing [555123456@from-trunk:9] Set("SIP/Adip1-00000025", "CDR(did)=524858786") in new stack
-- Executing [555123456@from-trunk:10] ExecIf("SIP/Adip1-00000025", "0 ?Set(CALLERID(name)=555124680)") in new stack
-- Executing [555123456@from-trunk:11] Set("SIP/Adip1-00000025", "__MOHCLASS=") in new stack
-- Executing [555123456@from-trunk:12] Set("SIP/Adip1-00000025", "__REVERSAL_REJECT=FALSE") in new stack
-- Executing [555123456@from-trunk:13] GotoIf("SIP/Adip1-00000025", "1?post-reverse-charge") in new stack
-- Goto (from-trunk,555123456,14)
-- Executing [555123456@from-trunk:14] NoOp("SIP/Adip1-00000025", "") in new stack
-- Executing [555123456@from-trunk:15] Set("SIP/Adip1-00000025", "__CALLINGNAMEPRES_SV=allowed_not_screened") in new stack
-- Executing [555123456@from-trunk:16] Set("SIP/Adip1-00000025", "__CALLINGNUMPRES_SV=allowed_not_screened") in new stack
-- Executing [555123456@from-trunk:17] Set("SIP/Adip1-00000025", "CALLERID(name-pres)=allowed_not_screened") in new stack
-- Executing [555123456@from-trunk:18] Set("SIP/Adip1-00000025", "CALLERID(num-pres)=allowed_not_screened") in new stack
-- Executing [555123456@from-trunk:19] NoOp("SIP/Adip1-00000025", "CallerID Entry Point") in new stack
-- Executing [555123456@from-trunk:20] Goto("SIP/Adip1-00000025", "ext-group,600,1") in new stack
-- Goto (ext-group,600,1)
-- Executing [600@ext-group:1] GotoIf("SIP/Adip1-00000025", "0?cid") in new stack
-- Executing [600@ext-group:2] PlayTones("SIP/Adip1-00000025", "ring") in new stack
-- Executing [600@ext-group:3] Progress("SIP/Adip1-00000025", "") in new stack
-- Executing [600@ext-group:4] Macro("SIP/Adip1-00000025", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/Adip1-00000025", "TOUCH_MONITOR=1655455398.37") in new stack
-- Executing [s@macro-user-callerid:2] Set("SIP/Adip1-00000025", "CHANCONTEXT=") in new stack
-- Executing [s@macro-user-callerid:3] Set("SIP/Adip1-00000025", "CHANCONTEXT=") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/Adip1-00000025", "CHANEXTENCONTEXT=Adip1-00000025") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/Adip1-00000025", "CHANEXTEN=Adip1-00000025") in new stack
-- Executing [s@macro-user-callerid:6] Set("SIP/Adip1-00000025", "CALLERID(number)=555124680") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/Adip1-00000025", "AMPUSER=555124680") in new stack
-- Executing [s@macro-user-callerid:8] Set("SIP/Adip1-00000025", "HOTDESCKCHAN=Adip1-00000025") in new stack
-- Executing [s@macro-user-callerid:9] Set("SIP/Adip1-00000025", "HOTDESKEXTEN=Adip1") in new stack
-- Executing [s@macro-user-callerid:10] Set("SIP/Adip1-00000025", "HOTDESKCALL=0") in new stack
-- Executing [s@macro-user-callerid:11] ExecIf("SIP/Adip1-00000025", "0?Set(HOTDESKCALL=1)") in new stack
-- Executing [s@macro-user-callerid:12] ExecIf("SIP/Adip1-00000025", "0?Set(CALLERID(name)=)") in new stack
-- Executing [s@macro-user-callerid:13] GotoIf("SIP/Adip1-00000025", "0?report") in new stack
-- Executing [s@macro-user-callerid:14] ExecIf("SIP/Adip1-00000025", "1?Set(REALCALLERIDNUM=555124680)") in new stack
-- Executing [s@macro-user-callerid:15] Set("SIP/Adip1-00000025", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:16] GotoIf("SIP/Adip1-00000025", "0?limit") in new stack
-- Executing [s@macro-user-callerid:17] Set("SIP/Adip1-00000025", "AMPUSERCIDNAME=") in new stack
-- Executing [s@macro-user-callerid:18] ExecIf("SIP/Adip1-00000025", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
-- Executing [s@macro-user-callerid:19] GotoIf("SIP/Adip1-00000025", "1?report") in new stack
-- Goto (macro-user-callerid,s,27)
-- Executing [s@macro-user-callerid:27] NoOp("SIP/Adip1-00000025", "Macro Depth is 1") in new stack
-- Executing [s@macro-user-callerid:28] GotoIf("SIP/Adip1-00000025", "1?report2:macroerror") in new stack
-- Goto (macro-user-callerid,s,29)
-- Executing [s@macro-user-callerid:29] GotoIf("SIP/Adip1-00000025", "0?continue") in new stack
-- Executing [s@macro-user-callerid:30] Set("SIP/Adip1-00000025", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:31] GotoIf("SIP/Adip1-00000025", "1?continue") in new stack
-- Goto (macro-user-callerid,s,47)
-- Executing [s@macro-user-callerid:47] Set("SIP/Adip1-00000025", "CALLERID(number)=555124680") in new stack
-- Executing [s@macro-user-callerid:48] Set("SIP/Adip1-00000025", "CALLERID(name)=555124680") in new stack
-- Executing [s@macro-user-callerid:49] GotoIf("SIP/Adip1-00000025", "0?cnum") in new stack
-- Executing [s@macro-user-callerid:50] Set("SIP/Adip1-00000025", "CDR(cnam)=555124680") in new stack
-- Executing [s@macro-user-callerid:51] Set("SIP/Adip1-00000025", "CDR(cnum)=555124680") in new stack
-- Executing [s@macro-user-callerid:52] Set("SIP/Adip1-00000025", "CHANNEL(language)=en_GB") in new stack
-- Executing [600@ext-group:5] Macro("SIP/Adip1-00000025", "blkvm-setifempty,") in new stack
-- Executing [s@macro-blkvm-setifempty:1] GotoIf("SIP/Adip1-00000025", "1?init") in new stack
-- Goto (macro-blkvm-setifempty,s,4)
-- Executing [s@macro-blkvm-setifempty:4] Set("SIP/Adip1-00000025", "__BLKVM_CHANNEL=SIP/Adip1-00000025") in new stack
-- Executing [s@macro-blkvm-setifempty:5] Set("SIP/Adip1-00000025", "SHARED(BLKVM,SIP/Adip1-00000025)=TRUE") in new stack
-- Executing [s@macro-blkvm-setifempty:6] Set("SIP/Adip1-00000025", "GOSUB_RETVAL=TRUE") in new stack
-- Executing [s@macro-blkvm-setifempty:7] MacroExit("SIP/Adip1-00000025", "") in new stack
-- Executing [600@ext-group:6] GotoIf("SIP/Adip1-00000025", "1?skipov") in new stack
-- Goto (ext-group,600,9)
-- Executing [600@ext-group:9] Set("SIP/Adip1-00000025", "RRNODEST=") in new stack
-- Executing [600@ext-group:10] Set("SIP/Adip1-00000025", "__NODEST=600") in new stack
-- Executing [600@ext-group:11] GosubIf("SIP/Adip1-00000025", "0?sub-rgsetcid,s,1()") in new stack
-- Executing [600@ext-group:12] Gosub("SIP/Adip1-00000025", "sub-record-check,s,1(rg,600,dontcare)") in new stack
-- Executing [s@sub-record-check:1] GotoIf("SIP/Adip1-00000025", "0?initialized") in new stack
-- Executing [s@sub-record-check:2] Set("SIP/Adip1-00000025", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s@sub-record-check:3] Set("SIP/Adip1-00000025", "NOW=1655455398") in new stack
-- Executing [s@sub-record-check:4] Set("SIP/Adip1-00000025", "__DAY=17") in new stack
-- Executing [s@sub-record-check:5] Set("SIP/Adip1-00000025", "__MONTH=06") in new stack
-- Executing [s@sub-record-check:6] Set("SIP/Adip1-00000025", "__YEAR=2022") in new stack
-- Executing [s@sub-record-check:7] Set("SIP/Adip1-00000025", "__TIMESTR=20220617-104318") in new stack
-- Executing [s@sub-record-check:8] Set("SIP/Adip1-00000025", "__FROMEXTEN=555124680") in new stack
-- Executing [s@sub-record-check:9] Set("SIP/Adip1-00000025", "__MON_FMT=wav") in new stack
-- Executing [s@sub-record-check:10] NoOp("SIP/Adip1-00000025", "Recordings initialized") in new stack
-- Executing [s@sub-record-check:11] ExecIf("SIP/Adip1-00000025", "0?Set(ARG3=dontcare)") in new stack
-- Executing [s@sub-record-check:12] Set("SIP/Adip1-00000025", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:13] ExecIf("SIP/Adip1-00000025", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [s@sub-record-check:14] GotoIf("SIP/Adip1-00000025", "2?checkaction") in new stack
-- Goto (sub-record-check,s,17)
-- Executing [s@sub-record-check:17] GotoIf("SIP/Adip1-00000025", "0?sub-record-check,rg,1") in new stack
-- Executing [s@sub-record-check:18] NoOp("SIP/Adip1-00000025", "Generic rg Recording Check - 555124680 600") in new stack
-- Executing [s@sub-record-check:19] Gosub("SIP/Adip1-00000025", "recordcheck,1(dontcare,rg,600)") in new stack
-- Executing [recordcheck@sub-record-check:1] NoOp("SIP/Adip1-00000025", "Starting recording check against dontcare") in new stack
-- Executing [recordcheck@sub-record-check:2] Goto("SIP/Adip1-00000025", "dontcare") in new stack
-- Goto (sub-record-check,recordcheck,3)
-- Executing [recordcheck@sub-record-check:3] Return("SIP/Adip1-00000025", "") in new stack
-- Executing [s@sub-record-check:20] Return("SIP/Adip1-00000025", "") in new stack
-- Executing [600@ext-group:13] Set("SIP/Adip1-00000025", "RingGroupMethod=firstnotonphone") in new stack
-- Executing [600@ext-group:14] Set("SIP/Adip1-00000025", "__ALT_CONFIRM_MSG=") in new stack
-- Executing [600@ext-group:15] GotoIf("SIP/Adip1-00000025", "0?RGVQANNOUNCE:NORGVQANNOUNCE") in new stack
-- Goto (ext-group,600,18)
-- Executing [600@ext-group:18] Macro("SIP/Adip1-00000025", "dial,300,HhTtrQ(NO_ANSWER),210-220") in new stack
-- Executing [s@macro-dial:1] NoOp("SIP/Adip1-00000025", "Blind Transfer: , Attended Transfer: , User: , Alert Info: ") in new stack
-- Executing [s@macro-dial:2] ExecIf("SIP/Adip1-00000025", "0?Set(ALERT_INFO=)") in new stack
-- Executing [s@macro-dial:3] ExecIf("SIP/Adip1-00000025", "0?Set(ALERT_INFO=)") in new stack
-- Executing [s@macro-dial:4] ExecIf("SIP/Adip1-00000025", "0?Set(ALERT_INFO=)") in new stack
-- Executing [s@macro-dial:5] ExecIf("SIP/Adip1-00000025", "0?Set(CHANNEL(musicclass)=)") in new stack
-- Executing [s@macro-dial:6] AGI("SIP/Adip1-00000025", "agi://127.0.0.1/dialparties.agi") in new stack
agi://127.0.0.1/dialparties.agi: Starting New Dialparties.agi
agi://127.0.0.1/dialparties.agi: Caller ID name is '555124680' number is '555124680'
agi://127.0.0.1/dialparties.agi: CW Ignore is:
agi://127.0.0.1/dialparties.agi: CF Ignore is:
agi://127.0.0.1/dialparties.agi: CW IN_USE/BUSY is: 1
agi://127.0.0.1/dialparties.agi: Ringgroup confirm is :
agi://127.0.0.1/dialparties.agi: Methodology of ring is 'firstnotonphone'
-- agi://127.0.0.1/dialparties.agi: Added extension 210 to extension map
-- agi://127.0.0.1/dialparties.agi: Added extension 220 to extension map
-- agi://127.0.0.1/dialparties.agi: Extension 210 cf is disabled
-- agi://127.0.0.1/dialparties.agi: Extension 220 cf is disabled
-- agi://127.0.0.1/dialparties.agi: Extension 210 do not disturb is disabled
-- agi://127.0.0.1/dialparties.agi: Extension 220 do not disturb is disabled
agi://127.0.0.1/dialparties.agi: Extension 210 has ExtensionState: 0
-- agi://127.0.0.1/dialparties.agi: Checking CW and CFB status for extension 210
agi://127.0.0.1/dialparties.agi: EXTENSION_STATE: 0 (NOT_INUSE)
agi://127.0.0.1/dialparties.agi: Extension 220 has ExtensionState: 0
-- agi://127.0.0.1/dialparties.agi: Checking CW and CFB status for extension 220
agi://127.0.0.1/dialparties.agi: EXTENSION_STATE: 0 (NOT_INUSE)
-- agi://127.0.0.1/dialparties.agi: ONLY available extensions Array
-- agi://127.0.0.1/dialparties.agi: (
-- agi://127.0.0.1/dialparties.agi: [0] => 210
-- agi://127.0.0.1/dialparties.agi: [1] => 220
-- agi://127.0.0.1/dialparties.agi: )
-- agi://127.0.0.1/dialparties.agi:
-- agi://127.0.0.1/dialparties.agi: Filtered ARG3: 210-220
agi://127.0.0.1/dialparties.agi: RVOL_MODE ''
agi://127.0.0.1/dialparties.agi: RVOL is:
agi://127.0.0.1/dialparties.agi: RVOLPARENT is:
-- <SIP/Adip1-00000025>AGI Script agi://127.0.0.1/dialparties.agi completed, returning 0
-- Executing [s@macro-dial:7] GotoIf("SIP/Adip1-00000025", "1?huntdial") in new stack
-- Goto (macro-dial,s,32)
-- Executing [s@macro-dial:32] NoOp("SIP/Adip1-00000025", "Returned from dialparties with 2 hunt members to dial") in new stack
-- Executing [s@macro-dial:33] Set("SIP/Adip1-00000025", "HuntLoop=0") in new stack
-- Executing [s@macro-dial:34] ExecIf("SIP/Adip1-00000025", "0?Set(HuntMembers=0)") in new stack
-- Executing [s@macro-dial:35] GotoIf("SIP/Adip1-00000025", "1?a30") in new stack
-- Goto (macro-dial,s,38)
-- Executing [s@macro-dial:38] Set("SIP/Adip1-00000025", "HuntMember=HuntMember0") in new stack
-- Executing [s@macro-dial:39] GotoIf("SIP/Adip1-00000025", "1?a32:a35") in new stack
-- Goto (macro-dial,s,40)
-- Executing [s@macro-dial:40] Set("SIP/Adip1-00000025", "CT_EXTEN=210") in new stack
-- Executing [s@macro-dial:41] Set("SIP/Adip1-00000025", "__EXTTOCALL=210") in new stack
-- Executing [s@macro-dial:42] Set("SIP/Adip1-00000025", "__PICKUPMARK=210") in new stack
-- Executing [s@macro-dial:43] Set("SIP/Adip1-00000025", "DB(CALLTRACE/210)=555124680") in new stack
-- Executing [s@macro-dial:44] Goto("SIP/Adip1-00000025", "s,huntstart") in new stack
-- Goto (macro-dial,s,53)
-- Executing [s@macro-dial:53] NoOp("SIP/Adip1-00000025", "Hunt Dial Start") in new stack
-- Executing [s@macro-dial:54] ExecIf("SIP/Adip1-00000025", "0?Set(HASH(__SIPHEADERS,Alert-Info)=Normal;volume=)") in new stack
-- Executing [s@macro-dial:55] ExecIf("SIP/Adip1-00000025", "0?Set(HASH(__SIPHEADERS,Alert-Info)=Normal;volume=)") in new stack
-- Executing [s@macro-dial:56] Macro("SIP/Adip1-00000025", "dial-hunt-predial-hook,") in new stack
-- Executing [s@macro-dial-hunt-predial-hook:1] MacroExit("SIP/Adip1-00000025", "") in new stack
-- Executing [s@macro-dial:57] ExecIf("SIP/Adip1-00000025", "0?Set(CWRING=r(callwaiting)):Set(CWRING=)") in new stack
-- Executing [s@macro-dial:58] Dial("SIP/Adip1-00000025", "SIP/210,300,HhtrQ(NO_ANSWER)M(auto-blkvm)b(func-apply-sipheaders^s^1),") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- SIP/210-00000026 Internal Gosub(func-apply-sipheaders,s,1) start
-- Executing [s@func-apply-sipheaders:1] NoOp("SIP/210-00000026", "Applying SIP Headers to channel SIP/210-00000026") in new stack
-- Executing [s@func-apply-sipheaders:2] Set("SIP/210-00000026", "TECH=SIP") in new stack
-- Executing [s@func-apply-sipheaders:3] Set("SIP/210-00000026", "SIPHEADERKEYS=") in new stack
-- Executing [s@func-apply-sipheaders:4] While("SIP/210-00000026", "0") in new stack
-- Jumping to priority 10
-- Executing [s@func-apply-sipheaders:11] Return("SIP/210-00000026", "") in new stack
== Spawn extension (from-internal, 600, 1) exited non-zero on 'SIP/210-00000026'
-- SIP/210-00000026 Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
-- Called SIP/210
-- SIP/210-00000026 is ringing
== Spawn extension (macro-dial, s, 58) exited non-zero on 'SIP/Adip1-00000025' in macro 'dial'
== Spawn extension (ext-group, 600, 18) exited non-zero on 'SIP/Adip1-00000025'
-- Executing [h@ext-group:1] Macro("SIP/Adip1-00000025", "hangupcall,") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/Adip1-00000025", "1?theend") in new stack
-- Goto (macro-hangupcall,s,3)
-- Executing [s@macro-hangupcall:3] ExecIf("SIP/Adip1-00000025", "0?Set(CDR(recordingfile)=)") in new stack
-- Executing [s@macro-hangupcall:4] Hangup("SIP/Adip1-00000025", "") in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/Adip1-00000025' in macro 'hangupcall'
== Spawn extension (ext-group, h, 1) exited non-zero on 'SIP/Adip1-00000025
From both above logs files, I can observe that the “from-trunk” is always correctly set to the trunk “username”, however the trunk “name” is always kept to “Adip1” in both above scenarios.
With the call completion abort in above first scenario, I see in its log the following line entry:
-- Auto fallthrough, channel 'SIP/Adip1-00000023' status is 'UNKNOWN'
Any other further observations on the above that I may have missed?
How do I come to such a situation of a call setup failure with an “UNKOWN” status when calling the trunk with the user name “555456789” (trunk name “Adip2”)?