Greetings all,
I’m hoping someone can help me out troubleshooting a rather perplexing problem.
I’ve just configured a new Asterisk/FreePBX/chan-sccp-manager system from scratch using the latest FreePBX Distro. (12.7.8-2107-3.sng7)
This installs:
Asterisk: 16.9.0
PBX: 15.0.17.48
To which I installed chan-sccp: 4.3.4 develop -b0b3cdb and chan-sccp-manager: 14.2.0.11
Everything appears to be working well, with the sole exception that the CID_Number is missing from internal calls originated on an sccp extension (it works just fine on SIP extensions).
Calls are routed just fine, and the cid_name is present & correctly displayed on the destination device, just without a number
Checking the sccpline table the necessary data appears to be there: ’name’ contains the extension (line) number (eg. 101), ‘label’ the name (Cashwrap), ‘description’ the name & number (Cashwrap <101>), ‘cid_name’ contains the correct name (Cashwrap), and ‘cid_num’ is empty - as this is where an outbound caller ID would be passed to a trunk (if required)
Checking the Asteriskdb, it does appear that required fields are correctly populated (/AMPUSER/101/cidname: Cashwrap, /AMPUSER/101/cidnum: 101)
Doing a complete ‘database show’ also lists just the sccp extensions at the end of the listing (/cidname/101: Cashwrap), although it’s quite possible that I may have created those by messing around with CIDSuperfecta/Asterisk PhoneBook (which can cache to the Asteriskdb).
I’m not sure what’s causing the problem, but running a call trace reveals that [macro-user-callerid] is not returning the CALLERID(number) although it does return the correct CALLERID(name). See trace below:
== Using SCCP RTP TOS bits 184
== Using SCCP RTP CoS mark 6
-- Executing [601@from-internal:1] GotoIf("SCCP/301-000000DC", "1?ext-local,601,1:followme-check,601,1") in new stack
-- Goto (ext-local,601,1)
-- Executing [601@ext-local:1] Set("SCCP/301-000000DC", "__RINGTIMER=15") in new stack
-- Executing [601@ext-local:2] ExecIf("SCCP/301-000000DC", "0?Set(__CWIGNORE=)") in new stack
-- Executing [601@ext-local:3] Macro("SCCP/301-000000DC", "exten-vm,601,601,0,0,0") in new stack
-- Executing [s@macro-exten-vm:1] Macro("SCCP/301-000000DC", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SCCP/301-000000DC", "TOUCH_MONITOR=1630457047.313") in new stack
-- Executing [s@macro-user-callerid:2] Set("SCCP/301-000000DC", "CHANCONTEXT=") in new stack
-- Executing [s@macro-user-callerid:3] Set("SCCP/301-000000DC", "CHANCONTEXT=") in new stack
-- Executing [s@macro-user-callerid:4] Set("SCCP/301-000000DC", "CHANEXTENCONTEXT=301-000000DC") in new stack
-- Executing [s@macro-user-callerid:5] Set("SCCP/301-000000DC", "CHANEXTEN=301-000000DC") in new stack
-- Executing [s@macro-user-callerid:6] Set("SCCP/301-000000DC", "CALLERID(number)=") in new stack
-- Executing [s@macro-user-callerid:7] Set("SCCP/301-000000DC", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:8] Set("SCCP/301-000000DC", "HOTDESCKCHAN=301-000000DC") in new stack
-- Executing [s@macro-user-callerid:9] Set("SCCP/301-000000DC", "HOTDESKEXTEN=301") in new stack
-- Executing [s@macro-user-callerid:10] Set("SCCP/301-000000DC", "HOTDESKCALL=0") in new stack
-- Executing [s@macro-user-callerid:11] ExecIf("SCCP/301-000000DC", "0?Set(HOTDESKCALL=1)") in new stack
-- Executing [s@macro-user-callerid:12] ExecIf("SCCP/301-000000DC", "0?Set(CALLERID(name)=)") in new stack
-- Executing [s@macro-user-callerid:13] GotoIf("SCCP/301-000000DC", "0?report") in new stack
-- Executing [s@macro-user-callerid:14] ExecIf("SCCP/301-000000DC", "1?Set(REALCALLERIDNUM=)") in new stack
-- Executing [s@macro-user-callerid:15] Set("SCCP/301-000000DC", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:16] GotoIf("SCCP/301-000000DC", "0?limit") in new stack
-- Executing [s@macro-user-callerid:17] Set("SCCP/301-000000DC", "AMPUSERCIDNAME=") in new stack
-- Executing [s@macro-user-callerid:18] ExecIf("SCCP/301-000000DC", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
-- Executing [s@macro-user-callerid:19] GotoIf("SCCP/301-000000DC", "1?report") in new stack
-- Goto (macro-user-callerid,s,28)
-- Executing [s@macro-user-callerid:28] NoOp("SCCP/301-000000DC", "Macro Depth is 2") in new stack
-- Executing [s@macro-user-callerid:29] GotoIf("SCCP/301-000000DC", "1?report2:macroerror") in new stack
-- Goto (macro-user-callerid,s,30)
-- Executing [s@macro-user-callerid:30] GotoIf("SCCP/301-000000DC", "0?continue") in new stack
-- Executing [s@macro-user-callerid:31] ExecIf("SCCP/301-000000DC", "1?Set(__CALLEE_ACCOUNCODE=)") in new stack
-- Executing [s@macro-user-callerid:32] Set("SCCP/301-000000DC", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:33] GotoIf("SCCP/301-000000DC", "1?continue") in new stack
-- Goto (macro-user-callerid,s,49)
-- Executing [s@macro-user-callerid:49] Set("SCCP/301-000000DC", "CALLERID(number)=") in new stack
-- Executing [s@macro-user-callerid:50] Set("SCCP/301-000000DC", "CALLERID(name)=Cabin Private Line") in new stack
-- Executing [s@macro-user-callerid:51] GotoIf("SCCP/301-000000DC", "0?cnum") in new stack
-- Executing [s@macro-user-callerid:52] Set("SCCP/301-000000DC", "CDR(cnam)=Cabin Private Line") in new stack
-- Executing [s@macro-user-callerid:53] Set("SCCP/301-000000DC", "CDR(cnum)=") in new stack
-- Executing [s@macro-user-callerid:54] Set("SCCP/301-000000DC", "CHANNEL(language)=en") in new stack
I’ve been bashing my head against the wall for a few days trying to sort this out, as it’s screwing up the cdr and makes it impossible to go directly to the correct VM box by pressing the VM softkey (*97 invokes comedian mail).
So if anyone can help me out, I’d be hugely grateful.
Best - Anton