Problem with CID when transferring calls

Hi guys,

Using FreePBX 13.0.192.19

When receiving calls with IP phones connected to FreePBX, we have no problem whatsoever with Called ID display.

However, for some people on the road, I set up the IVR to connect their extension number to a custom destination instead of an extension number (and IP phone).

For exemple, if you press 200 on the IVR, then it is sent to a custom destination which is a cell phone number.

It works well EXCEPT for the fact that the CID doesn’t work, and I can’t figure out why!

This is extremely annoying because the number displayed is the on from the trunk (the DID)… therefore it always appear to be a call coming from the office.

Any idea how to fix this?

Thanks!

1 Like

There are a few places that could be messing you up.

  • If you force the outbound trunk CID to your CID, the forwarded calls will honor that.
  • Some providers do not allow “foreign” CID on outbound calls, and may be over-writing the CID for you rather than block the call.
  • On my system, I have to run the call through the “Set Caller ID” function to get the CID to work right every time. Are you doing that on the way out?
  • Do you have the Caller ID getting forced at the outbound route level?

Check those and let us know when you get it fixed.

I do specify an Outbound CallerID but the CID Option is set to Allow Any CID.

My provider allows any CID, so there’s no problem on that side.

I’ve never heard of that feature, can you let me know how I can set it up or point me to documentation?

[quote=“cynjut, post:2, topic:45815”]Do you have the Caller ID getting forced at the outbound route level?
[/quote]

No. None of my Outbound Routes have CID.

Thanks!!

Look under Applications…

Then how do you push CID? On the Trunk Level?

For testing, i would try sending the calls to the cellphone using Follow Me (i always do it this way so i can force call confirm)

P.S. I always set no CID on the Trunk level, i set it on the Outbound Route Level and allow any CID. and i can confirm that this way it works when sending to Misc Destinations.

The CID is set at Trunk level, but some extensions have specific CID too.

The outbound routes allow any CID.

Can you confirm this? by calling your cellphone from an extension that has a different caller ID than set on the Trunk.
I’m afraid your trunk forces a CID.

Too much guessing going on. Get a call trace. It will tell you what CID is set to just before the dial.
https://wiki.freepbx.org/display/SUP/Providing+Great+Debug#ProvidingGreatDebug-UploadingLogs

I didn’t find much documentation so I did the following:

Set up an new “Set CID” with the defaults for name and number:
${CALLERID(name)}
${CALLERID(num)}
Destination is IVR

Inbound route: Instead of sending to IVR, I now send to the Set CID I just created.

Apply config.

Sadly, same result, the CID still does not display :frowning:

No I’m 100% positive the Trunk is set to “Allow Any CID”

Then either provide logs, or your is provider restricting CID.

I found where it’s setting up the CID as the trunk CID again, but I really don’t understand why:

[2017-11-27 14:41:21] VERBOSE[13854][C-000067b4] pbx.c: Executing [[email protected]:20] Set("SIP/ngpbx_orig_1-000078f0", "CDR(outbound_cnum)=XXXXXXXXXXX") in new stack

There is also this line I’m very curious about:

[2017-11-27 14:41:21] VERBOSE[13854][C-000067b4] pbx.c: Executing [[email protected]:10] GotoIf("SIP/ngpbx_orig_1-000078f0", "1?trunkcid") in new stack

NGPBX is my server so it seems to be setting the CID as the trunk CID for some reason… I’m not too sure.

No one knows ?

:sweat:

two arbitrary lines of a call trace does “not a call trace make” show is yours whole banana and maybe we will be able to help.

1 Like

Fair enough, sorry for that.

Here we go:

Connected to Asterisk 13.17.1 currently running on freepbx (pid = 2307)
[2017-12-12 15:29:43] ERROR[2407][C-00000a00]: netsock2.c:305 ast_sockaddr_resolve: getaddrinfo("freepbx.NGPBX.ca", "(null)", ...): Name or service not known
[2017-12-12 15:29:43] WARNING[2407][C-00000a00]: acl.c:800 resolve_first: Unable to lookup 'freepbx.NGPBX.ca'
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Executing [[email protected]_orig_1:1] Set("SIP/NGPBX_orig_1-00000b6b", "GROUP()=OUT_2") in new stack
    -- Executing [[email protected]_orig_1:2] Goto("SIP/NGPBX_orig_1-00000b6b", "from-trunk,DIDXXX,1") in new stack
    -- Goto (from-trunk,DIDXXX,1)
    -- Executing [[email protected]:1] Set("SIP/NGPBX_orig_1-00000b6b", "__DIRECTION=INBOUND") in new stack
    -- Executing [[email protected]:2] Set("SIP/NGPBX_orig_1-00000b6b", "CHANNEL(language)=fr") in new stack
    -- Executing [[email protected]:3] Gosub("SIP/NGPBX_orig_1-00000b6b", "sub-record-check,s,1(in,DIDXXX,dontcare)") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/NGPBX_orig_1-00000b6b", "0?initialized") in new stack
    -- Executing [[email protected]:2] Set("SIP/NGPBX_orig_1-00000b6b", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [[email protected]:3] Set("SIP/NGPBX_orig_1-00000b6b", "NOW=1513110583") in new stack
    -- Executing [[email protected]:4] Set("SIP/NGPBX_orig_1-00000b6b", "__DAY=12") in new stack
    -- Executing [[email protected]:5] Set("SIP/NGPBX_orig_1-00000b6b", "__MONTH=12") in new stack
    -- Executing [[email protected]:6] Set("SIP/NGPBX_orig_1-00000b6b", "__YEAR=2017") in new stack
    -- Executing [[email protected]:7] Set("SIP/NGPBX_orig_1-00000b6b", "__TIMESTR=20171212-152943") in new stack
    -- Executing [[email protected]:8] Set("SIP/NGPBX_orig_1-00000b6b", "__FROMEXTEN=unknown") in new stack
    -- Executing [[email protected]:9] Set("SIP/NGPBX_orig_1-00000b6b", "__MON_FMT=wav") in new stack
    -- Executing [[email protected]:10] NoOp("SIP/NGPBX_orig_1-00000b6b", "Recordings initialized") in new stack
    -- Executing [[email protected]:11] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [[email protected]:12] Set("SIP/NGPBX_orig_1-00000b6b", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [[email protected]:13] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [[email protected]:14] GotoIf("SIP/NGPBX_orig_1-00000b6b", "2?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [[email protected]:17] GotoIf("SIP/NGPBX_orig_1-00000b6b", "1?sub-record-check,in,1") in new stack
    -- Goto (sub-record-check,in,1)
    -- Executing [[email protected]:1] NoOp("SIP/NGPBX_orig_1-00000b6b", "Inbound Recording Check to DIDXXX") in new stack
    -- Executing [[email protected]:2] Set("SIP/NGPBX_orig_1-00000b6b", "FROMEXTEN=unknown") in new stack
    -- Executing [[email protected]:3] ExecIf("SIP/NGPBX_orig_1-00000b6b", "10?Set(FROMEXTEN=CIDXXX)") in new stack
    -- Executing [[email protected]ord-check:4] Gosub("SIP/NGPBX_orig_1-00000b6b", "recordcheck,1(dontcare,in,DIDXXX)") in new stack
    -- Executing [[email protected]:1] NoOp("SIP/NGPBX_orig_1-00000b6b", "Starting recording check against dontcare") in new stack
    -- Executing [[email protected]:2] Goto("SIP/NGPBX_orig_1-00000b6b", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [[email protected]:3] Return("SIP/NGPBX_orig_1-00000b6b", "") in new stack
    -- Executing [[email protected]:5] Return("SIP/NGPBX_orig_1-00000b6b", "") in new stack
    -- Executing [[email protected]:4] Gosub("SIP/NGPBX_orig_1-00000b6b", "app-blacklist-check,s,1()") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/NGPBX_orig_1-00000b6b", "0?blacklisted") in new stack
    -- Executing [[email protected]:2] Set("SIP/NGPBX_orig_1-00000b6b", "CALLED_BLACKLIST=1") in new stack
    -- Executing [[email protected]:3] Return("SIP/NGPBX_orig_1-00000b6b", "") in new stack
    -- Executing [[email protected]:5] Set("SIP/NGPBX_orig_1-00000b6b", "__FROM_DID=DIDXXX") in new stack
    -- Executing [[email protected]:6] Set("SIP/NGPBX_orig_1-00000b6b", "CDR(did)=DIDXXX") in new stack
    -- Executing [[email protected]:7] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0 ?Set(CALLERID(name)=CIDXXX)") in new stack
    -- Executing [[email protected]:8] Set("SIP/NGPBX_orig_1-00000b6b", "__MOHCLASS=") in new stack
    -- Executing [[email protected]:9] Set("SIP/NGPBX_orig_1-00000b6b", "__REVERSAL_REJECT=FALSE") in new stack
    -- Executing [[email protected]:10] GotoIf("SIP/NGPBX_orig_1-00000b6b", "1?post-reverse-charge") in new stack
    -- Goto (from-trunk,DIDXXX,12)
    -- Executing [[email protected]:12] NoOp("SIP/NGPBX_orig_1-00000b6b", "") in new stack
    -- Executing [[email protected]:13] Set("SIP/NGPBX_orig_1-00000b6b", "__CALLINGNAMEPRES_SV=allowed_not_screened") in new stack
    -- Executing [[email protected]:14] Set("SIP/NGPBX_orig_1-00000b6b", "__CALLINGNUMPRES_SV=allowed_not_screened") in new stack
    -- Executing [[email protected]:15] Set("SIP/NGPBX_orig_1-00000b6b", "CALLERID(name-pres)=allowed_not_screened") in new stack
    -- Executing [[email protected]:16] Set("SIP/NGPBX_orig_1-00000b6b", "CALLERID(num-pres)=allowed_not_screened") in new stack
    -- Executing [[email protected]:17] NoOp("SIP/NGPBX_orig_1-00000b6b", "CallerID Entry Point") in new stack
    -- Executing [[email protected]:18] Set("SIP/NGPBX_orig_1-00000b6b", "__CRM_DIRECTION=INBOUND") in new stack
    -- Executing [[email protected]:19] Set("SIP/NGPBX_orig_1-00000b6b", "__CRM_SOURCE=CIDXXX") in new stack
    -- Executing [[email protected]:20] Set("SIP/NGPBX_orig_1-00000b6b", "__CRM_LINKEDID=1513110583.20885") in new stack
    -- Executing [[email protected]:21] ExecIf("SIP/NGPBX_orig_1-00000b6b", "1?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
    -- Executing [[email protected]:22] Goto("SIP/NGPBX_orig_1-00000b6b", "app-setcid,1,1") in new stack
    -- Goto (app-setcid,1,1)
    -- Executing [[email protected]:1] NoOp("SIP/NGPBX_orig_1-00000b6b", "(CGC-SetCID) Changing cid to NAME <CIDXXX>") in new stack
    -- Executing [[email protected]:2] Set("SIP/NGPBX_orig_1-00000b6b", "CALLERID(name)=NAME") in new stack
    -- Executing [[email protected]:3] Set("SIP/NGPBX_orig_1-00000b6b", "CALLERID(num)=CIDXXX") in new stack
    -- Executing [[email protected]:4] Goto("SIP/NGPBX_orig_1-00000b6b", "ivr-8,s,1") in new stack
    -- Goto (ivr-8,s,1)
    -- Executing [[email protected]:1] Set("SIP/NGPBX_orig_1-00000b6b", "TIMEOUT_LOOPCOUNT=0") in new stack
    -- Executing [[email protected]:2] Set("SIP/NGPBX_orig_1-00000b6b", "INVALID_LOOPCOUNT=0") in new stack
    -- Executing [[email protected]:3] Set("SIP/NGPBX_orig_1-00000b6b", "_IVR_CONTEXT_ivr-8=") in new stack
    -- Executing [[email protected]:4] Set("SIP/NGPBX_orig_1-00000b6b", "_IVR_CONTEXT=ivr-8") in new stack
    -- Executing [[email protected]:5] Set("SIP/NGPBX_orig_1-00000b6b", "__IVR_RETVM=") in new stack
    -- Executing [[email protected]:6] GotoIf("SIP/NGPBX_orig_1-00000b6b", "0?skip") in new stack
    -- Executing [[email protected]:7] Answer("SIP/NGPBX_orig_1-00000b6b", "") in new stack
       > 0x7fc8d01bdae0 -- Probation passed - setting RTP source address to 75.98.128.39:12566
    -- Executing [[email protected]:8] Wait("SIP/NGPBX_orig_1-00000b6b", "1") in new stack
    -- Executing [[email protected]:9] Set("SIP/NGPBX_orig_1-00000b6b", "IVR_MSG=custom/CGC") in new stack
    -- Executing [[email protected]:10] Set("SIP/NGPBX_orig_1-00000b6b", "TIMEOUT(digit)=3") in new stack
    -- Digit timeout set to 3.000
    -- Executing [[email protected]:11] ExecIf("SIP/NGPBX_orig_1-00000b6b", "1?Background(custom/CGC)") in new stack
    -- <SIP/NGPBX_orig_1-00000b6b> Playing 'custom/CGC.slin' (language 'fr')
    -- Executing [[email protected]:1] Goto("SIP/NGPBX_orig_1-00000b6b", "ext-miscdests,2,1") in new stack
    -- Goto (ext-miscdests,2,1)
    -- Executing [[email protected]:1] NoOp("SIP/NGPBX_orig_1-00000b6b", "MiscDest: NAME - Cell") in new stack
    -- Executing [[email protected]:2] Goto("SIP/NGPBX_orig_1-00000b6b", "from-internal,CIDXXX,1") in new stack
    -- Goto (from-internal,CIDXXX,1)
    -- Executing [[email protected]:1] Macro("SIP/NGPBX_orig_1-00000b6b", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [[email protected]:1] Set("SIP/NGPBX_orig_1-00000b6b", "TOUCH_MONITOR=1513110583.20885") in new stack
    -- Executing [[email protected]:2] Set("SIP/NGPBX_orig_1-00000b6b", "AMPUSER=CIDXXX") in new stack
    -- Executing [[email protected]:3] GotoIf("SIP/NGPBX_orig_1-00000b6b", "0?report") in new stack
    -- Executing [[email protected]:4] ExecIf("SIP/NGPBX_orig_1-00000b6b", "1?Set(REALCALLERIDNUM=CIDXXX)") in new stack
    -- Executing [[email protected]:5] Set("SIP/NGPBX_orig_1-00000b6b", "AMPUSER=") in new stack
    -- Executing [[email protected]:6] GotoIf("SIP/NGPBX_orig_1-00000b6b", "0?limit") in new stack
    -- Executing [[email protected]:7] Set("SIP/NGPBX_orig_1-00000b6b", "AMPUSERCIDNAME=") in new stack
    -- Executing [[email protected]:8] GotoIf("SIP/NGPBX_orig_1-00000b6b", "1?report") in new stack
    -- Goto (macro-user-callerid,s,15)
    -- Executing [[email protected]:15] NoOp("SIP/NGPBX_orig_1-00000b6b", "Macro Depth is 1") in new stack
    -- Executing [[email protected]:16] GotoIf("SIP/NGPBX_orig_1-00000b6b", "1?report2:macroerror") in new stack
    -- Goto (macro-user-callerid,s,18)
    -- Executing [[email protected]:18] GotoIf("SIP/NGPBX_orig_1-00000b6b", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,36)
    -- Executing [[email protected]:36] Set("SIP/NGPBX_orig_1-00000b6b", "CALLERID(number)=CIDXXX") in new stack
    -- Executing [[email protected]:37] Set("SIP/NGPBX_orig_1-00000b6b", "CALLERID(name)=NAME") in new stack
    -- Executing [[email protected]:38] GotoIf("SIP/NGPBX_orig_1-00000b6b", "0?cnum") in new stack
    -- Executing [[email protected]:39] Set("SIP/NGPBX_orig_1-00000b6b", "CDR(cnam)=NAME") in new stack
    -- Executing [[email protected]:40] Set("SIP/NGPBX_orig_1-00000b6b", "CDR(cnum)=CIDXXX") in new stack
    -- Executing [[email protected]:41] Set("SIP/NGPBX_orig_1-00000b6b", "CHANNEL(language)=fr") in new stack
    -- Executing [[email protected]:2] Gosub("SIP/NGPBX_orig_1-00000b6b", "sub-record-check,s,1(out,CIDXXX,dontcare)") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/NGPBX_orig_1-00000b6b", "10?initialized") in new stack
    -- Goto (sub-record-check,s,10)
    -- Executing [[email protected]:10] NoOp("SIP/NGPBX_orig_1-00000b6b", "Recordings initialized") in new stack
    -- Executing [[email protected]:11] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [[email protected]:12] Set("SIP/NGPBX_orig_1-00000b6b", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [[email protected]:13] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [[email protected]:14] GotoIf("SIP/NGPBX_orig_1-00000b6b", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [[email protected]:17] GotoIf("SIP/NGPBX_orig_1-00000b6b", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [[email protected]:1] NoOp("SIP/NGPBX_orig_1-00000b6b", "Outbound Recording Check from CIDXXX to CIDXXX") in new stack
    -- Executing [[email protected]:2] Set("SIP/NGPBX_orig_1-00000b6b", "RECMODE=") in new stack
    -- Executing [[email protected]:3] ExecIf("SIP/NGPBX_orig_1-00000b6b", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [[email protected]:7] Gosub("SIP/NGPBX_orig_1-00000b6b", "recordcheck,1(dontcare,out,CIDXXX)") in new stack
    -- Executing [[email protected]:1] NoOp("SIP/NGPBX_orig_1-00000b6b", "Starting recording check against dontcare") in new stack
    -- Executing [[email protected]:2] Goto("SIP/NGPBX_orig_1-00000b6b", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [[email protected]:3] Return("SIP/NGPBX_orig_1-00000b6b", "") in new stack
    -- Executing [[email protected]:8] Return("SIP/NGPBX_orig_1-00000b6b", "") in new stack
    -- Executing [[email protected]:3] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [[email protected]:4] Set("SIP/NGPBX_orig_1-00000b6b", "MOHCLASS=default") in new stack
    -- Executing [[email protected]:5] Set("SIP/NGPBX_orig_1-00000b6b", "_NODEST=") in new stack
    -- Executing [[email protected]:6] Macro("SIP/NGPBX_orig_1-00000b6b", "dialout-trunk,4,CIDXXX,,on") in new stack
    -- Executing [[email protected]:1] Set("SIP/NGPBX_orig_1-00000b6b", "DIAL_TRUNK=4") in new stack
    -- Executing [[email protected]:2] GosubIf("SIP/NGPBX_orig_1-00000b6b", "0?sub-pincheck,s,1()") in new stack
    -- Executing [[email protected]:3] GotoIf("SIP/NGPBX_orig_1-00000b6b", "0?disabletrunk,1") in new stack
    -- Executing [[email protected]:4] Set("SIP/NGPBX_orig_1-00000b6b", "DIAL_NUMBER=CIDXXX") in new stack
    -- Executing [[email protected]:5] Set("SIP/NGPBX_orig_1-00000b6b", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [[email protected]:6] Set("SIP/NGPBX_orig_1-00000b6b", "OUTBOUND_GROUP=OUT_4") in new stack
    -- Executing [[email protected]:7] Set("SIP/NGPBX_orig_1-00000b6b", "DIAL_TRUNK_OPTIONS=Tt") in new stack
    -- Executing [[email protected]:8] GotoIf("SIP/NGPBX_orig_1-00000b6b", "0?nomax") in new stack
    -- Executing [[email protected]:9] GotoIf("SIP/NGPBX_orig_1-00000b6b", "0?chanfull") in new stack
    -- Executing [[email protected]:10] GotoIf("SIP/NGPBX_orig_1-00000b6b", "0?skipoutcid") in new stack
    -- Executing [[email protected]:11] Macro("SIP/NGPBX_orig_1-00000b6b", "outbound-callerid,4") in new stack
    -- Executing [[email protected]:1] ExecIf("SIP/NGPBX_orig_1-00000b6b", "1?Set(CALLERPRES(name-pres)=allowed_not_screened)") in new stack
    -- Executing [[email protected]:2] ExecIf("SIP/NGPBX_orig_1-00000b6b", "1?Set(CALLERPRES(num-pres)=allowed_not_screened)") in new stack
    -- Executing [[email protected]:3] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(REALCALLERIDNUM=CIDXXX)") in new stack
    -- Executing [[email protected]:4] GotoIf("SIP/NGPBX_orig_1-00000b6b", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,7)
    -- Executing [[email protected]:7] Set("SIP/NGPBX_orig_1-00000b6b", "USEROUTCID=") in new stack
    -- Executing [[email protected]:8] Set("SIP/NGPBX_orig_1-00000b6b", "EMERGENCYCID=") in new stack
    -- Executing [[email protected]:9] Set("SIP/NGPBX_orig_1-00000b6b", "TRUNKOUTCID=DIDXXX") in new stack
    -- Executing [[email protected]:10] GotoIf("SIP/NGPBX_orig_1-00000b6b", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,15)
    -- Executing [[email protected]:15] ExecIf("SIP/NGPBX_orig_1-00000b6b", "1?Set(CALLERID(all)=DIDXXX)") in new stack
    -- Executing [[email protected]:16] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [[email protected]:17] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [[email protected]:18] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [[email protected]:19] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [[email protected]:20] Set("SIP/NGPBX_orig_1-00000b6b", "CDR(outbound_cnum)=DIDXXX") in new stack
    -- Executing [[email protected]:21] Set("SIP/NGPBX_orig_1-00000b6b", "CDR(outbound_cnam)=") in new stack
    -- Executing [[email protected]:12] GosubIf("SIP/NGPBX_orig_1-00000b6b", "0?sub-flp-4,s,1()") in new stack
    -- Executing [[email protected]:13] Set("SIP/NGPBX_orig_1-00000b6b", "OUTNUM=CIDXXX") in new stack
    -- Executing [[email protected]:14] Set("SIP/NGPBX_orig_1-00000b6b", "custom=SIP/Sortant 2") in new stack
    -- Executing [[email protected]:15] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
    -- Executing [[email protected]:16] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
    -- Executing [[email protected]:17] Macro("SIP/NGPBX_orig_1-00000b6b", "dialout-trunk-predial-hook,") in new stack
    -- Executing [[email protected]:1] MacroExit("SIP/NGPBX_orig_1-00000b6b", "") in new stack
    -- Executing [[email protected]:18] GotoIf("SIP/NGPBX_orig_1-00000b6b", "1?skipcrm") in new stack
    -- Goto (macro-dialout-trunk,s,24)
    -- Executing [[email protected]:24] NoOp("SIP/NGPBX_orig_1-00000b6b", "CRM Finished") in new stack
    -- Executing [[email protected]:25] GotoIf("SIP/NGPBX_orig_1-00000b6b", "0?bypass,1") in new stack
    -- Executing [[email protected]:26] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(CONNECTEDLINE(num,i)=CIDXXX)") in new stack
    -- Executing [[email protected]:27] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(CONNECTEDLINE(name,i)=CID:DIDXXX)") in new stack
    -- Executing [[email protected]:28] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)DIDXXX)") in new stack
    -- Executing [[email protected]:29] GotoIf("SIP/NGPBX_orig_1-00000b6b", "0?customtrunk") in new stack
    -- Executing [[email protected]:30] Dial("SIP/NGPBX_orig_1-00000b6b", "SIP/Sortant 2/CIDXXX,300,Tt") in new stack
[2017-12-12 15:29:50] ERROR[31301][C-00000a00]: netsock2.c:305 ast_sockaddr_resolve: getaddrinfo("freepbx.NGPBX.ca", "(null)", ...): Name or service not known
[2017-12-12 15:29:50] WARNING[31301][C-00000a00]: acl.c:800 resolve_first: Unable to lookup 'freepbx.NGPBX.ca'
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Called SIP/Sortant 2/CIDXXX
    -- SIP/Sortant 2-00000b6c is making progress passing it to SIP/NGPBX_orig_1-00000b6b
       > 0x7fc8d804fea0 -- Probation passed - setting RTP source address to 198.38.7.34:14324
    -- Channel SIP/943-00000b69 left 'simple_bridge' basic-bridge <33ed2e5f-c84d-4bd1-84f5-f54385c5daeb>
  == Spawn extension (macro-dialout-trunk, s, 30) exited non-zero on 'SIP/943-00000b69' in macro 'dialout-trunk'
  == Spawn extension (from-internal, XXX, 6) exited non-zero on 'SIP/943-00000b69'
    -- Executing [[email protected]:1] Macro("SIP/943-00000b69", "hangupcall") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/943-00000b69", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Channel SIP/Sortant 2-00000b6a left 'simple_bridge' basic-bridge <33ed2e5f-c84d-4bd1-84f5-f54385c5daeb>
    -- Executing [[email protected]:3] ExecIf("SIP/943-00000b69", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [[email protected]:4] Hangup("SIP/943-00000b69", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/943-00000b69' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/943-00000b69'
    -- SIP/943-00000b69 Internal Gosub(crm-hangup,s,1) start
    -- Executing [[email protected]:1] NoOp("SIP/943-00000b69", "Sending Hangup to CRM") in new stack
    -- Executing [[email protected]:2] NoOp("SIP/943-00000b69", "HANGUP CAUSE: 16") in new stack
    -- Executing [[email protected]:3] ExecIf("SIP/943-00000b69", "0?Set(__CRM_VOICEMAIL=)") in new stack
    -- Executing [[email protected]:4] NoOp("SIP/943-00000b69", "MASTER CHANNEL: 1513110516.20877 = 1513110516.20877") in new stack
    -- Executing [[email protected]:5] GotoIf("SIP/943-00000b69", "0?return") in new stack
    -- Executing [[email protected]:6] Set("SIP/943-00000b69", "__CRM_HANGUP=1") in new stack
    -- Executing [[email protected]:7] AGI("SIP/943-00000b69", "sangomacrm.agi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
    -- <SIP/943-00000b69>AGI Script sangomacrm.agi completed, returning 0
    -- Executing [[email protected]:8] Return("SIP/943-00000b69", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/943-00000b69'
    -- SIP/943-00000b69 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
[2017-12-12 15:29:58] NOTICE[2407]: chan_sip.c:28409 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 9123
  == Spawn extension (macro-dialout-trunk, s, 30) exited non-zero on 'SIP/NGPBX_orig_1-00000b6b' in macro 'dialout-trunk'
  == Spawn extension (from-internal, CIDXXX, 6) exited non-zero on 'SIP/NGPBX_orig_1-00000b6b'
    -- Executing [[email protected]:1] Macro("SIP/NGPBX_orig_1-00000b6b", "hangupcall") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/NGPBX_orig_1-00000b6b", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [[email protected]:3] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [[email protected]:4] Hangup("SIP/NGPBX_orig_1-00000b6b", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/NGPBX_orig_1-00000b6b' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/NGPBX_orig_1-00000b6b'
    -- SIP/NGPBX_orig_1-00000b6b Internal Gosub(crm-hangup,s,1) start
    -- Executing [[email protected]:1] NoOp("SIP/NGPBX_orig_1-00000b6b", "Sending Hangup to CRM") in new stack
    -- Executing [[email protected]:2] NoOp("SIP/NGPBX_orig_1-00000b6b", "HANGUP CAUSE: 16") in new stack
    -- Executing [[email protected]:3] ExecIf("SIP/NGPBX_orig_1-00000b6b", "0?Set(__CRM_VOICEMAIL=)") in new stack
    -- Executing [[email protected]:4] NoOp("SIP/NGPBX_orig_1-00000b6b", "MASTER CHANNEL: 1513110583.20885 = 1513110583.20885") in new stack
    -- Executing [[email protected]:5] GotoIf("SIP/NGPBX_orig_1-00000b6b", "0?return") in new stack
    -- Executing [[email protected]:6] Set("SIP/NGPBX_orig_1-00000b6b", "__CRM_HANGUP=1") in new stack
    -- Executing [[email protected]:7] AGI("SIP/NGPBX_orig_1-00000b6b", "sangomacrm.agi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
    -- <SIP/NGPBX_orig_1-00000b6b>AGI Script sangomacrm.agi completed, returning 0
    -- Executing [[email protected]:8] Return("SIP/NGPBX_orig_1-00000b6b", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/NGPBX_orig_1-00000b6b'
    -- SIP/NGPBX_orig_1-00000b6b Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

How about you resolve your noticeable errors first

freepbx.NGPBX.ca

apparently does not exist in the innertubes.

So I fixed the domain name error.

Still doesn’t help with my CID problem :frowning:

Does anyone have an idea?

According to this, your TrunkCID (DIDXXX) looks like it’s overriding the CIDXXX you have set up until this point.

In the trunk, the CID option is set to Allow Any CID.

In the Outbound Route, there’s no CID set, and override extension is set to NO.

I don’t understand why the TrunkCID is overriding the CID!

Any idea where to look?

Hey guys, I’m about to give up on this… any one with a kind heart could provide assistance please??

Thanks :wink: