Outbound CNAM not showing on FreePBX Trunk to Cisco CME

I’m using an AsteriskNOW distribution with FreePBX v12.x. My goal is to use Asterisk as a gateway to receive and process calls and then forward the calls to my Cisco CME. CID is working perfectly but CNAM for call originated from the PSTN strips the CNAM when forward the call to the Cisco CME. Does anyone know why this isn’t working and how to fix it?

PSTN - > Vestalink TRNK - > FreePBX -> Caller ID Superfecta Module -> CME TRNK = <1112223333>

Asteriks Verbose Logging:
– Executing [s@macro-outbound-callerid:1] ExecIf(“Local/60@from-internal-00000001;2”, “1?Set(CALLERPRES()=allowed_not_screened)”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“Local/60@from-internal-00000001;2”, “0?Set(REALCALLERIDNUM=111222333)”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“Local/60@from-internal-00000001;2”, “0?normcid”) in new stack
– Executing [s@macro-outbound-callerid:4] Set(“Local/60@from-internal-00000001;2”, “USEROUTCID=111222333”) in new stack
– Executing [s@macro-outbound-callerid:5] GotoIf(“Local/60@from-internal-00000001;2”, “1?bypass”) in new stack
– Goto (macro-outbound-callerid,s,7)
– Executing [s@macro-outbound-callerid:7] Set(“Local/60@from-internal-00000001;2”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“Local/60@from-internal-00000001;2”, “TRUNKOUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“Local/60@from-internal-00000001;2”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,14)
– Executing [s@macro-outbound-callerid:14] ExecIf(“Local/60@from-internal-00000001;2”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:15] ExecIf(“Local/60@from-internal-00000001;2”, “1?Set(CALLERID(all)=111222333)”) in new stack
– Executing [s@macro-outbound-callerid:16] ExecIf(“Local/60@from-internal-00000001;2”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:17] ExecIf(“Local/60@from-internal-00000001;2”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [s@macro-outbound-callerid:18] Set(“Local/60@from-internal-00000001;2”, “CDR(outbound_cnum)=111222333”) in new stack
– Executing [s@macro-outbound-callerid:19] Set(“Local/60@from-internal-00000001;2”, “CDR(outbound_cnam)=”) in new stack

Cisco Debug CCSIP Message:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.0.2:5060;branch=z9hG4bK2bc10d76
Max-Forwards: 70
From: sip:[email protected];tag=as4950b223
To: sip:[email protected]
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 INVITE
User-Agent: FPBX-AsteriskNOW-12.0.1rc35(11.13.0)
Date: Sun, 19 Oct 2014 18:34:38 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 232

FreePBX IAX Ext -> FreePBX -> CME TRNK = “Name” <100>

Asteriks Verbose Logging:
– Executing [s@macro-outbound-callerid:1] ExecIf(“Local/60@from-internal-00000000;2”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“Local/60@from-internal-00000000;2”, “0?Set(REALCALLERIDNUM=100)”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“Local/60@from-internal-00000000;2”, “0?normcid”) in new stack
– Executing [s@macro-outbound-callerid:4] Set(“Local/60@from-internal-00000000;2”, “USEROUTCID=100”) in new stack
– Executing [s@macro-outbound-callerid:5] GotoIf(“Local/60@from-internal-00000000;2”, “0?bypass”) in new stack
– Executing [s@macro-outbound-callerid:6] Set(“Local/60@from-internal-00000000;2”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“Local/60@from-internal-00000000;2”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“Local/60@from-internal-00000000;2”, “TRUNKOUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“Local/60@from-internal-00000000;2”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,14)
– Executing [s@macro-outbound-callerid:14] ExecIf(“Local/60@from-internal-00000000;2”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:15] ExecIf(“Local/60@from-internal-00000000;2”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:16] ExecIf(“Local/60@from-internal-00000000;2”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:17] ExecIf(“Local/60@from-internal-00000000;2”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [s@macro-outbound-callerid:18] Set(“Local/60@from-internal-00000000;2”, “CDR(outbound_cnum)=100”) in new stack
– Executing [s@macro-outbound-callerid:19] Set(“Local/60@from-internal-00000000;2”, “CDR(outbound_cnam)=Jeff Samsung S5”) in new stack

Cisco Debug CCSIP Message:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.0.2:5060;branch=z9hG4bK4546fa39
Max-Forwards: 70
From: “Jeff Samsung S5” sip:[email protected];tag=as7d752c84
To: sip:[email protected]
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 INVITE
User-Agent: FPBX-AsteriskNOW-12.0.1rc35(11.13.0)
Date: Sun, 19 Oct 2014 18:23:23 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 234

I should have also added:

Settings / Advanced Settings / Dialplan and Operational / Block CNAM on External Trunks is False

and

Connectivity / Trunks / TRNK-CME / CID Options is “Allow Any CID”

I had the exact same problem when I was fronting Samsung boxes with an Asterisk using a PRI as the connector between the boxes - are you feeding SIP or PRI (or POTS?)?

If it’s SIP, you need to set the routes that feed the Cisco as Intra-Company (Under the Trunk Settings) or you won’t get much of anything.

Greg