Pass inPhonex PIN in dial string for ADI passthrough?

Hi,

I’ve been using FreePBX with Inphonex for a while at home with good results. I’d like to have outbound calls show a particular CID. Inphonex supports ANI passthrough and require I configure a PIN which I include on the invite I send for new outbound calls, with the syntax:

INVITE sip:xxxyyy*[email protected]

where xxx is my account id, yyy is the PIN, and zzz is the destination number.

Is there a way to do this in FreePBX without messing with the asterisk extensions*.conf files?

thank you

Kevin

Are the digits xxxyyy always the same, or will they change? If the same, configure the trunk dial pattern with a prepend of “xxxyyy*” and a pattern match of a “X.”

yep, xxxyyy will always be the same. That worked! Thanks.

1 Like

Okay, it worked in that I saw it in the dial string, but my outbound CID still isn’t working.

According to the trunk provider:

“Ani-passthrough allows whatever you place in the FROM field to represent your caller ID Name and Number. This can be controlled entirely from your pbx configuration.”

So I’ve tried configuring it in extension -> Outbound CID, and also in Trunk -> Outbound CID. No luck.

And (sorry to reply to my reply to my reply) the provider confirms that the account info + PIN is not being received though I’ve set “xxxyyy” as the prepend and “X” under pattern match in trunk -> Dialed Number Manipulation Rules.

Is “X” supposed to be a literal “X”?

Thinking you missed an important part, the pattern match should be “X.” (X dot)

Thank you, that got the proper string sent to my provider. And I am reading the O’Reily book so I can understand why.

So the provider has confirmed that it’s using the right PIN authentication but doesn’t see the CID information I’m trying to use for outbound calls.

I tried setting it in the trunk config, in the outbound route config, and in the extension config. And I can see it assigning the CID to different variables in the log.

This shows the extension

-- Executing [s@macro-user-callerid:11] Set("SIP/100-00000d49", "CALLERID(all)="desk1" <100>") in new stack`

This shows the outbound CID in the extension’s config (9732222222, I changed them to easy-to-spot numbers):

-- Executing [s@macro-outbound-callerid:6] Set("SIP/100-00000d49", "USEROUTCID=9732222222") in new stack
-- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/100-00000d49", "1?Set(CALLERID(all)=9732222222)") in new stack
-- Executing [s@macro-outbound-callerid:18] Set("SIP/100-00000d49", "CDR(outbound_cnum)=9732222222") in new stack
-- Executing [s@macro-dialout-trunk:20] ExecIf("SIP/100-00000d49", "1?Set(CONNECTEDLINE(name,i)=CID:9732222222)") in new stack

This shows the outbound route CID (trunk override not selected)

-- Executing [9732900020@from-internal:5] ExecIf("SIP/103-00000d44", "1?Set(TRUNKCIDOVERRIDE=3333333)") in new stack
-- Executing [s@macro-outbound-callerid:16] ExecIf("SIP/103-00000d44", "1?Set(CALLERID(all)=3333333)") in new stack
-- Executing [s@macro-outbound-callerid:18] Set("SIP/103-00000d44", "CDR(outbound_cnum)=3333333") in new stack
-- Executing [s@macro-dialout-trunk:20] ExecIf("SIP/103-00000d44", "1?Set(CONNECTEDLINE(name,i)=CID:3333333)") in new stack

and finally the trunk outbound CID:

-- Executing [s@macro-outbound-callerid:8] Set("SIP/103-00000d44", "TRUNKOUTCID="KHI" <4444444>") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/103-00000d44", "1?Set(CALLERID(all)="KHI" <4444444>)") in new stack

… I see this a few lines before the call is placed, after the other CID variable assignments. Does it look funny?

 -- Executing [s@macro-outbound-callerid:16] ExecIf("SIP/100-00000d49", "0?Set(CALLERID(all)=)") in new stack`

and then the call (with XXX YYY and ZZZ as above)

-- Executing [s@macro-dialout-trunk:22] Dial("SIP/100-00000d49", "SIP/Inphonex2/XXXYYY*ZZZZZZZZZZ,300,Tt") in new stack`

No. If you examine the line you will see the application is ExecIF which evaluates to 0 (zero) so it is ignored. It looks clean to me, but to be definitive you need to enable sip debug for the trunk peer, and note the exact CID string used in the SIP header.

1 Like

Ok, here’s the whole call - I hung up without answering the dialed number.

Same as before, XXXXXXX = account#, YYYYY=PIN, ZZZZZZZZZZ=dialed number.

Thanks again for all the help!

[2017-03-08 20:09:50] VERBOSE[1717][C-00000f4e] netsock2.c:   == Using SIP RTP TOS bits 184
[2017-03-08 20:09:50] VERBOSE[1717][C-00000f4e] netsock2.c:   == Using SIP RTP CoS mark 5
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [ZZZZZZZZZZ@from-internal:1] Macro("SIP/100-00000dcb", "user-callerid,LIMIT,EXTERNAL,") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:1] Set("SIP/100-00000dcb", "TOUCH_MONITOR=1489021790.3531") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:2] Set("SIP/100-00000dcb", "AMPUSER=100") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:3] GotoIf("SIP/100-00000dcb", "0?report") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:4] ExecIf("SIP/100-00000dcb", "1?Set(REALCALLERIDNUM=100)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:5] Set("SIP/100-00000dcb", "AMPUSER=100") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:6] GotoIf("SIP/100-00000dcb", "0?limit") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:7] Set("SIP/100-00000dcb", "AMPUSERCIDNAME=desk1") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:8] GotoIf("SIP/100-00000dcb", "0?report") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:9] Set("SIP/100-00000dcb", "AMPUSERCID=100") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:10] Set("SIP/100-00000dcb", "__DIAL_OPTIONS=Ttr") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:11] Set("SIP/100-00000dcb", "CALLERID(all)="desk1" <100>") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:12] GotoIf("SIP/100-00000dcb", "0?limit") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:13] ExecIf("SIP/100-00000dcb", "1?Set(GROUP(concurrency_limit)=100)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:14] GosubIf("SIP/100-00000dcb", "7?sub-ccss,s,1(from-internal,ZZZZZZZZZZ)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-ccss:1] ExecIf("SIP/100-00000dcb", "0?Return()") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-ccss:2] Set("SIP/100-00000dcb", "CCSS_SETUP=TRUE") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-ccss:3] GosubIf("SIP/100-00000dcb", "0?monitor_config,1(from-internal,ZZZZZZZZZZ):monitor_default,1(from-internal,ZZZZZZZZZZ)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [monitor_default@sub-ccss:1] GotoIf("SIP/100-00000dcb", "0?is_exten") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [monitor_default@sub-ccss:2] StackPop("SIP/100-00000dcb", "") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [monitor_default@sub-ccss:3] Return("SIP/100-00000dcb", "FALSE") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:15] ExecIf("SIP/100-00000dcb", "0?Set(CHANNEL(language)=)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:16] GotoIf("SIP/100-00000dcb", "1?continue") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Goto (macro-user-callerid,s,30)
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:30] Set("SIP/100-00000dcb", "CALLERID(number)=100") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:31] Set("SIP/100-00000dcb", "CALLERID(name)=desk1") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:32] Set("SIP/100-00000dcb", "CDR(cnum)=100") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:33] Set("SIP/100-00000dcb", "CDR(cnam)=desk1") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-user-callerid:34] Set("SIP/100-00000dcb", "CHANNEL(language)=en") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [ZZZZZZZZZZ@from-internal:2] Gosub("SIP/100-00000dcb", "sub-record-check,s,1(out,ZZZZZZZZZZ,dontcare)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-record-check:1] GotoIf("SIP/100-00000dcb", "0?initialized") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-record-check:2] Set("SIP/100-00000dcb", "__REC_STATUS=INITIALIZED") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-record-check:3] Set("SIP/100-00000dcb", "NOW=1489021790") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-record-check:4] Set("SIP/100-00000dcb", "__DAY=08") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-record-check:5] Set("SIP/100-00000dcb", "__MONTH=03") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-record-check:6] Set("SIP/100-00000dcb", "__YEAR=2017") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-record-check:7] Set("SIP/100-00000dcb", "__TIMESTR=20170308-200950") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-record-check:8] Set("SIP/100-00000dcb", "__FROMEXTEN=100") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-record-check:9] Set("SIP/100-00000dcb", "__MON_FMT=wav") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-record-check:10] NoOp("SIP/100-00000dcb", "Recordings initialized") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-record-check:11] ExecIf("SIP/100-00000dcb", "0?Set(ARG3=dontcare)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-record-check:12] Set("SIP/100-00000dcb", "REC_POLICY_MODE_SAVE=") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-record-check:13] ExecIf("SIP/100-00000dcb", "0?Set(REC_STATUS=NO)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-record-check:14] GotoIf("SIP/100-00000dcb", "3?checkaction") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Goto (sub-record-check,s,17)
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-record-check:17] GotoIf("SIP/100-00000dcb", "1?sub-record-check,out,1") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Goto (sub-record-check,out,1)
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [out@sub-record-check:1] NoOp("SIP/100-00000dcb", "Outbound Recording Check from 100 to ZZZZZZZZZZ") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [out@sub-record-check:2] Set("SIP/100-00000dcb", "RECMODE=dontcare") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [out@sub-record-check:3] ExecIf("SIP/100-00000dcb", "1?Goto(routewins)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Goto (sub-record-check,out,7)
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [out@sub-record-check:7] Gosub("SIP/100-00000dcb", "recordcheck,1(dontcare,out,ZZZZZZZZZZ)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [recordcheck@sub-record-check:1] NoOp("SIP/100-00000dcb", "Starting recording check against dontcare") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [recordcheck@sub-record-check:2] Goto("SIP/100-00000dcb", "dontcare") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Goto (sub-record-check,recordcheck,3)
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [recordcheck@sub-record-check:3] Return("SIP/100-00000dcb", "") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [out@sub-record-check:8] Return("SIP/100-00000dcb", "") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [ZZZZZZZZZZ@from-internal:3] ExecIf("SIP/100-00000dcb", "0 ?Set(CDR(accountcode)=)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [ZZZZZZZZZZ@from-internal:4] Set("SIP/100-00000dcb", "MOHCLASS=default") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [ZZZZZZZZZZ@from-internal:5] ExecIf("SIP/100-00000dcb", "0?Set(TRUNKCIDOVERRIDE=3333333)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [ZZZZZZZZZZ@from-internal:6] Set("SIP/100-00000dcb", "_NODEST=") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [ZZZZZZZZZZ@from-internal:7] Macro("SIP/100-00000dcb", "dialout-trunk,4,ZZZZZZZZZZ,,off") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:1] Set("SIP/100-00000dcb", "DIAL_TRUNK=4") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/100-00000dcb", "0?sub-pincheck,s,1()") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/100-00000dcb", "0?disabletrunk,1") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:4] Set("SIP/100-00000dcb", "DIAL_NUMBER=ZZZZZZZZZZ") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:5] Set("SIP/100-00000dcb", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:6] Set("SIP/100-00000dcb", "OUTBOUND_GROUP=OUT_4") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/100-00000dcb", "1?nomax") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Goto (macro-dialout-trunk,s,9)
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/100-00000dcb", "0?skipoutcid") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:10] Set("SIP/100-00000dcb", "DIAL_TRUNK_OPTIONS=Tt") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:11] Macro("SIP/100-00000dcb", "outbound-callerid,4") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/100-00000dcb", "0?Set(CALLERPRES()=)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/100-00000dcb", "0?Set(REALCALLERIDNUM=100)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/100-00000dcb", "1?normcid") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Goto (macro-outbound-callerid,s,6)
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-outbound-callerid:6] Set("SIP/100-00000dcb", "USEROUTCID=9732222222") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-outbound-callerid:7] Set("SIP/100-00000dcb", "EMERGENCYCID=") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-outbound-callerid:8] Set("SIP/100-00000dcb", "TRUNKOUTCID="KHI" <4444444>") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/100-00000dcb", "1?trunkcid") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Goto (macro-outbound-callerid,s,14)
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/100-00000dcb", "1?Set(CALLERID(all)="KHI" <4444444>)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/100-00000dcb", "1?Set(CALLERID(all)=9732222222)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-outbound-callerid:16] ExecIf("SIP/100-00000dcb", "0?Set(CALLERID(all)=)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-outbound-callerid:17] ExecIf("SIP/100-00000dcb", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-outbound-callerid:18] Set("SIP/100-00000dcb", "CDR(outbound_cnum)=9732222222") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-outbound-callerid:19] Set("SIP/100-00000dcb", "CDR(outbound_cnam)=") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:12] GosubIf("SIP/100-00000dcb", "1?sub-flp-4,s,1()") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-flp-4:1] ExecIf("SIP/100-00000dcb", "1?Set(TARGET_FLP_4=XXXXXXXYYYYY*ZZZZZZZZZZ)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-flp-4:2] GotoIf("SIP/100-00000dcb", "1?match") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Goto (sub-flp-4,s,4)
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-flp-4:4] Set("SIP/100-00000dcb", "DIAL_NUMBER=XXXXXXXYYYYY*ZZZZZZZZZZ") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@sub-flp-4:5] Return("SIP/100-00000dcb", "") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:13] Set("SIP/100-00000dcb", "OUTNUM=XXXXXXXYYYYY*ZZZZZZZZZZ") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:14] Set("SIP/100-00000dcb", "custom=SIP/Inphonex2") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/100-00000dcb", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:16] ExecIf("SIP/100-00000dcb", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:17] Macro("SIP/100-00000dcb", "dialout-trunk-predial-hook,") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/100-00000dcb", "") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/100-00000dcb", "0?bypass,1") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:19] ExecIf("SIP/100-00000dcb", "1?Set(CONNECTEDLINE(num,i)=XXXXXXXYYYYY*ZZZZZZZZZZ)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:20] ExecIf("SIP/100-00000dcb", "1?Set(CONNECTEDLINE(name,i)=CID:9732222222)") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:21] GotoIf("SIP/100-00000dcb", "0?customtrunk") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [s@macro-dialout-trunk:22] Dial("SIP/100-00000dcb", "SIP/Inphonex2/XXXXXXXYYYYY*ZZZZZZZZZZ,300,Tt") in new stack
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] netsock2.c:   == Using SIP RTP TOS bits 184
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] netsock2.c:   == Using SIP RTP CoS mark 5
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] chan_sip.c: Audio is at 13382
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] chan_sip.c: Adding codec 100003 (ulaw) to SDP
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] chan_sip.c: Adding codec 100004 (alaw) to SDP
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] chan_sip.c: Adding codec 100002 (gsm) to SDP
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] chan_sip.c: Reliably Transmitting (NAT) to 208.239.76.134:5060:
▒INVITE sip:XXXXXXXYYYYY*[email protected] SIP/2.0
▒Via: SIP/2.0/UDP 172.19.1.9:5060;branch=z9hG4bK79b652ec;rport
▒Max-Forwards: 70
▒From: <sip:[email protected]>;tag=as0d7e4008
▒To: <sip:XXXXXXXYYYYY*[email protected]>
▒Contact: <sip:[email protected]:5060>
▒Call-ID: [email protected]
▒CSeq: 102 INVITE
▒User-Agent: FPBX-12.0.76.4(11.10.0)
▒Date: Thu, 09 Mar 2017 01:09:50 GMT
▒Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
▒Supported: replaces, timer
▒Content-Type: application/sdp
▒Content-Length: 277
▒
▒v=0
▒o=root 740856246 740856246 IN IP4 172.19.1.9
▒s=Asterisk PBX 11.10.0
▒c=IN IP4 172.19.1.9
▒t=0 0
▒m=audio 13382 RTP/AVP 0 8 3 101
▒a=rtpmap:0 PCMU/8000
▒a=rtpmap:8 PCMA/8000
▒a=rtpmap:3 GSM/8000
▒a=rtpmap:101 telephone-event/8000
▒a=fmtp:101 0-16
▒a=ptime:20
▒a=sendrecv
▒
▒---
[2017-03-08 20:09:50] VERBOSE[31173][C-00000f4e] app_dial.c:     -- Called SIP/Inphonex2/XXXXXXXYYYYY*ZZZZZZZZZZ
[2017-03-08 20:09:50] VERBOSE[1717] chan_sip.c:
▒<--- SIP read from UDP:208.239.76.134:5060 --->
▒SIP/2.0 100 Trying
▒Via: SIP/2.0/UDP 172.19.1.9:5060;received=67.85.24.244;branch=z9hG4bK79b652ec;rport=5060
▒From: <sip:[email protected]>;tag=as0d7e4008
▒To: <sip:XXXXXXXYYYYY*[email protected]>
▒Call-ID: [email protected]
▒CSeq: 102 INVITE
▒Content-Length: 0
▒
▒<------------->
[2017-03-08 20:09:50] VERBOSE[1717] chan_sip.c: --- (7 headers 0 lines) ---
[2017-03-08 20:09:51] VERBOSE[1717] chan_sip.c:
▒<--- SIP read from UDP:208.239.76.134:5060 --->
▒SIP/2.0 183 Session Progress
▒Via: SIP/2.0/UDP 172.19.1.9:5060;received=67.85.24.244;branch=z9hG4bK79b652ec;rport=5060
▒From: <sip:[email protected]>;tag=as0d7e4008
▒To: <sip:XXXXXXXYYYYY*[email protected]>;tag=SDff99e99-20709671_8cce6d4f_5e1a4617-6cf6-4011-a435-6ff753297da1
▒Call-ID: [email protected]
▒CSeq: 102 INVITE
▒Contact: <sip:208.239.76.134:5060;transport=udp>
▒Allow: INVITE
▒Content-Disposition: session;handling=required
▒X-UUID: d749d439ec7e49149ab439563569fc5d
▒Content-Type: application/sdp
▒Content-Length: 233
▒
▒v=0
▒o=Sonus_UAC 3375 27489 IN IP4 23.29.27.42
▒s=SIP Media Capabilities
▒c=IN IP4 23.29.27.42
▒t=0 0
▒m=audio 27882 RTP/AVP 0 101
▒a=rtpmap:0 PCMU/8000
▒a=rtpmap:101 telephone-event/8000
▒a=fmtp:101 0-15
▒a=sendrecv
▒a=maxptime:20
▒<------------->
[2017-03-08 20:09:51] VERBOSE[1717] chan_sip.c: --- (12 headers 11 lines) ---
[2017-03-08 20:09:51] VERBOSE[1717][C-00000f4e] chan_sip.c: list_route: hop: <sip:208.239.76.134:5060;transport=udp>
[2017-03-08 20:09:51] VERBOSE[1717][C-00000f4e] chan_sip.c: Found RTP audio format 0
[2017-03-08 20:09:51] VERBOSE[1717][C-00000f4e] chan_sip.c: Found RTP audio format 101
[2017-03-08 20:09:51] VERBOSE[1717][C-00000f4e] chan_sip.c: Found audio description format PCMU for ID 0
[2017-03-08 20:09:51] VERBOSE[1717][C-00000f4e] chan_sip.c: Found audio description format telephone-event for ID 101
[2017-03-08 20:09:51] VERBOSE[1717][C-00000f4e] chan_sip.c: Capabilities: us - (gsm|ulaw|alaw), peer - audio=(ulaw)/video=(nothing)/text=(nothing), combined - (ulaw)
[2017-03-08 20:09:51] VERBOSE[1717][C-00000f4e] chan_sip.c: Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
[2017-03-08 20:09:51] VERBOSE[1717][C-00000f4e] chan_sip.c: Peer audio RTP is at port 23.29.27.42:27882
[2017-03-08 20:09:51] VERBOSE[31173][C-00000f4e] app_dial.c:     -- SIP/Inphonex2-00000dcc is making progress passing it to SIP/100-00000dcb
[2017-03-08 20:09:57] VERBOSE[31173][C-00000f4e] chan_sip.c: Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: INVITE)
[2017-03-08 20:09:57] VERBOSE[31173][C-00000f4e] chan_sip.c: Reliably Transmitting (NAT) to 208.239.76.134:5060:
▒CANCEL sip:XXXXXXXYYYYY*[email protected] SIP/2.0
▒Via: SIP/2.0/UDP 172.19.1.9:5060;branch=z9hG4bK79b652ec;rport
▒Max-Forwards: 70
▒From: <sip:[email protected]>;tag=as0d7e4008
▒To: <sip:XXXXXXXYYYYY*[email protected]>
▒Call-ID: [email protected]
▒CSeq: 102 CANCEL
▒User-Agent: FPBX-12.0.76.4(11.10.0)
▒Content-Length: 0
▒
▒
▒---
[2017-03-08 20:09:57] VERBOSE[31173][C-00000f4e] chan_sip.c: Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: INVITE)
[2017-03-08 20:09:57] VERBOSE[31173][C-00000f4e] app_macro.c:   == Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on 'SIP/100-00000dcb' in macro 'dialout-trunk'
[2017-03-08 20:09:57] VERBOSE[31173][C-00000f4e] pbx.c:   == Spawn extension (from-internal, ZZZZZZZZZZ, 7) exited non-zero on 'SIP/100-00000dcb'
[2017-03-08 20:09:57] VERBOSE[31173][C-00000f4e] pbx.c:     -- Executing [h@from-internal:1] Hangup("SIP/100-00000dcb", "") in new stack
[2017-03-08 20:09:57] VERBOSE[31173][C-00000f4e] pbx.c:   == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/100-00000dcb'
[2017-03-08 20:09:57] VERBOSE[1717] chan_sip.c:
▒<--- SIP read from UDP:208.239.76.134:5060 --->
▒SIP/2.0 200 OK
▒Via: SIP/2.0/UDP 172.19.1.9:5060;received=67.85.24.244;branch=z9hG4bK79b652ec;rport=5060
▒From: <sip:[email protected]>;tag=as0d7e4008
▒To: <sip:XXXXXXXYYYYY*[email protected]>;tag=SDff99e99-20709671_8cce6d4f_5e1a4617-6cf6-4011-a435-6ff753297da1
▒Call-ID: [email protected]
▒CSeq: 102 CANCEL
▒Content-Length: 0
▒
▒<------------->
[2017-03-08 20:09:57] VERBOSE[1717] chan_sip.c: --- (7 headers 0 lines) ---
[2017-03-08 20:09:57] VERBOSE[1717] chan_sip.c:
▒<--- SIP read from UDP:208.239.76.134:5060 --->
▒SIP/2.0 487 Request Terminated
▒Via: SIP/2.0/UDP 172.19.1.9:5060;received=67.85.24.244;branch=z9hG4bK79b652ec;rport=5060
▒From: <sip:[email protected]>;tag=as0d7e4008
▒To: <sip:XXXXXXXYYYYY*[email protected]>;tag=SDff99e99-20709671_8cce6d4f_5e1a4617-6cf6-4011-a435-6ff753297da1
▒Call-ID: [email protected]
▒CSeq: 102 INVITE
▒Contact: <sip:208.239.76.134:5060;transport=udp>
▒Content-Length: 0
▒
▒<------------->
[2017-03-08 20:09:57] VERBOSE[1717] chan_sip.c: --- (8 headers 0 lines) ---
[2017-03-08 20:09:57] VERBOSE[1717][C-00000f4e] chan_sip.c: Transmitting (NAT) to 208.239.76.134:5060:
▒ACK sip:208.239.76.134:5060;transport=udp SIP/2.0
▒Via: SIP/2.0/UDP 172.19.1.9:5060;branch=z9hG4bK79b652ec;rport
▒Max-Forwards: 70
▒From: <sip:[email protected]>;tag=as0d7e4008
▒To: <sip:XXXXXXXYYYYY*[email protected]>;tag=SDff99e99-20709671_8cce6d4f_5e1a4617-6cf6-4011-a435-6ff753297da1
▒Contact: <sip:[email protected]:5060>
▒Call-ID: [email protected]
▒CSeq: 102 ACK
▒User-Agent: FPBX-12.0.76.4(11.10.0)
▒Content-Length: 0
▒
▒
▒---
[2017-03-08 20:09:57] VERBOSE[1717][C-00000f4e] chan_sip.c: Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: INVITE)
[2017-03-08 20:10:29] VERBOSE[1717] chan_sip.c: Really destroying SIP dialog '[email protected]' Method: INVITE

The SIP invite being sent to your provier is using this callerID:

Call-ID: [email protected]

A more conventional CID in a SIP header would take this format:

Call-ID: 18005551212@my_pbx_domain.com

What would make FreePBX send in that format? Is there a way (at least for testing) I can explicitly set that?

This has become a different question, I’ll start a new topic. Thanks again for your help!