Issue with CID when forwarding

Asterisk 11.13.1-1
E-Metrotel UCx 4.0

We have a DAHDI trunk for a PRI, whose service provider does not allow outgoing calls with anonymous CID. Normally this is fine; I just have the trunk set to send the CID that the service provider expects. No problem. Where it becomes a problem is when somebody with an anonymous CID calls in and then hits a destination that forwards them back out the PRI (e.g. call forward, follow me, etc.). When this happens, the call gets denied by the carrier because the empty CID is preserved. Under the DAHDI trunk settings, I tried changing the “CID Options” field to “Force Trunk CID”, but this doesn’t seem to do anything? Or do I need to restart Asterisk or reboot the system for this to take effect? I need to have a way to force the CID for all outgoing calls, including call forwarding an incoming call, follow me, conferencing, etc.

Here is my chan_dahdi.conf file:

; Auto-generated by /usr/sbin/hardware_detector
[trunkgroups]

[channels]
context=from-pstn
signalling=fxs_ks
rxwink=300 ; Atlas seems to use long (250ms) winks
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
faxdetect=incoming
echotraining=800
rxgain=0.0
txgain=0.0
callgroup=1
pickupgroup=1
toneduration=300
relaxdtmf=no

;Uncomment these lines if you have problems with the disconection of your analog lines
;busydetect=yes
;busycount=3

immediate=no

#include dahdi-channels.conf
#include chan_dahdi_additional.conf

If you have complete control of the dialplan, simply set the caller id if it was empty. If this is a FreePBX dialplan, I can’t help.

@david55, can you give me an example of how I would do that?

Also, what if I set restrictcid=yes in chan_dahdi.conf?

Also, saw these suggestions on other forums. Leaving them here so I can take a look these later:

Suggestion 1:
“Capture the incoming CID information into a channel variable when the call first comes in:
exten => foo,1,Set(ORIG_CID=${CALLERID(all)})
… then set the CID just before you dial to be the contents of the channel variable.”

Suggestion 2:
“First I had to modify the function sip_sipredirect(…) which is in channels/chan_sip.c
” add_diversion(&p->initreq, p); " (see diff patch below)
this function appends the correct headers (which it doesn’t do by default because its an “unofficial” standard)


diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 15a887f…0f7ab44 100644
— a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -32770,6 +32770,7 @@ static int sip_sipredirect(struct sip_pvt *p, const char *dest)
domain = ast_strdupa(ldomain);
}
}

  •   add_diversion(&p->initreq, p);
    
      ast_string_field_build(p, our_contact, "Transfer <sip:%s@%s>", extension, domain);
      transmit_response_reliable(p, "302 Moved Temporarily", &p->initreq);
    

Then I simply used the Transfer() command in my dialplan

[incoming]
exten => ${VFXNUMBER},1,Transfer(${MOBILENUM})
exten => ${VFXNUMBER},n,Hangup()

Also note: I found that if you Transfer() but don’t Hangup() it doesn’t work

You can also Answer(), Play(Please wait while I transfer you), Transfer(), Hangup() and it still works."

Transfer completely cuts you out of the loop, so the ITSP gets the caller ID from themself.

As hinted, Transfer is not well tested, as few people use it.

For your first question, type:

core show application set
core show function CALLERID
and
core show application execif

at the command line prompt, and act accordingly.

Thanks, David.

N.b. Phone numbers have been changed to protect the innocent.

So, turns out that it’s not actually the carrier who is prohibiting forwarding of calls with blank CID. I called the carrier and we did a test call to verify that the call never reaches them. Asterisk is actually preventing the call from being forwarded out. I have verbose logs that show this. First is a log with a call with anonymous CID, where the call is denied when it tries to forward out:

[2014-12-22 10:24:11] VERBOSE[3340][C-00000202] sig_pri.c: – Accepting call from ‘’ to ‘5555555555’ on channel 0/1, span 1
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [5555555555@from-pstn:1] Set(“DAHDI/i1/-1e9”, “__FROM_DID=5555555555”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [5555555555@from-pstn:2] Gosub(“DAHDI/i1/-1e9”, “app-blacklist-check,s,1()”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@app-blacklist-check:1] GotoIf(“DAHDI/i1/-1e9”, “0?blacklisted”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@app-blacklist-check:2] Set(“DAHDI/i1/-1e9”, “CALLED_BLACKLIST=1”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@app-blacklist-check:3] Return(“DAHDI/i1/-1e9”, “”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [5555555555@from-pstn:3] Set(“DAHDI/i1/-1e9”, “CDR(did)=5555555555”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [5555555555@from-pstn:4] ExecIf(“DAHDI/i1/-1e9”, “1 ?Set(CALLERID(name)=)”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [5555555555@from-pstn:5] Set(“DAHDI/i1/-1e9”, “CHANNEL(musicclass)=default”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [5555555555@from-pstn:6] Set(“DAHDI/i1/-1e9”, “__MOHCLASS=default”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [5555555555@from-pstn:7] Set(“DAHDI/i1/-1e9”, “__CALLINGPRES_SV=prohib_not_screened”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [5555555555@from-pstn:8] Set(“DAHDI/i1/-1e9”, “CALLERPRES()=allowed_not_screened”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Goto (ivr-12,s,1)
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@ivr-12:1] Set(“DAHDI/i1/-1e9”, “INVALID_LOOPCOUNT=0”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@ivr-12:2] Set(“DAHDI/i1/-1e9”, “_IVR_CONTEXT_ivr-12=”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@ivr-12:3] Set(“DAHDI/i1/-1e9”, “_IVR_CONTEXT=ivr-12”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@ivr-12:4] Set(“DAHDI/i1/-1e9”, “__IVR_RETVM=RETURN”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@ivr-12:5] GotoIf(“DAHDI/i1/-1e9”, “0?skip”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@ivr-12:6] Answer(“DAHDI/i1/-1e9”, “”) in new stack
[2014-12-22 10:24:11] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@ivr-12:7] Wait(“DAHDI/i1/-1e9”, “1”) in new stack
[2014-12-22 10:24:12] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@ivr-12:8] Set(“DAHDI/i1/-1e9”, “IVR_MSG=custom/12-5-14_OpenGreeting&custom/12-10-14OpenMenu”) in new stack
[2014-12-22 10:24:12] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@ivr-12:9] Set(“DAHDI/i1/-1e9”, “TIMEOUT(digit)=3”) in new stack
[2014-12-22 10:24:12] VERBOSE[4926][C-00000202] func_timeout.c: – Digit timeout set to 3.000
[2014-12-22 10:24:12] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@ivr-12:10] ExecIf(“DAHDI/i1/-1e9”, "1?Background(custom/12-5-14_OpenGreeting&custom/12-10-14OpenMenu) stack
[2014-12-22 10:24:12] VERBOSE[4926][C-00000202] file.c: – <DAHDI/i1/-1e9> Playing ‘custom/12-5-14_OpenGreeting.slin’ (language ‘en’)
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [4@ivr-12:1] Goto(“DAHDI/i1/-1e9”, “ext-miscdests,3,1”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Goto (ext-miscdests,3,1)
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [3@ext-miscdests:1] NoOp(“DAHDI/i1/-1e9”, “MiscDest: Tel400-Offsite”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [3@ext-miscdests:2] Goto(“DAHDI/i1/-1e9”, “from-internal,96666666666,1”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Goto (from-internal,96666666666,1)
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [96666666666@from-internal:1] Macro(“DAHDI/i1/-1e9”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-user-callerid:1] Set(“DAHDI/i1/-1e9”, “TOUCH_MONITOR=1419261851.1511”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-user-callerid:2] Set(“DAHDI/i1/-1e9”, “AMPUSER=9”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-user-callerid:3] GotoIf(“DAHDI/i1/-1e9”, “0?report”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-user-callerid:4] ExecIf(“DAHDI/i1/-1e9”, “1?Set(REALCALLERIDNUM=9)”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-user-callerid:5] Set(“DAHDI/i1/-1e9”, “AMPUSER=”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-user-callerid:6] GotoIf(“DAHDI/i1/-1e9”, “0?limit”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-user-callerid:7] Set(“DAHDI/i1/-1e9”, “AMPUSERCIDNAME=”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-user-callerid:8] GotoIf(“DAHDI/i1/-1e9”, “1?report”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Goto (macro-user-callerid,s,15)
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-user-callerid:15] GotoIf(“DAHDI/i1/-1e9”, “1?continue”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Goto (macro-user-callerid,s,28)
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-user-callerid:28] Set(“DAHDI/i1/-1e9”, “CALLERID(number)=9”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-user-callerid:29] Set(“DAHDI/i1/-1e9”, “CALLERID(name)=”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-user-callerid:30] Set(“DAHDI/i1/-1e9”, “CDR(cnum)=9”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-user-callerid:31] Set(“DAHDI/i1/-1e9”, “CDR(cnam)=”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-user-callerid:32] Set(“DAHDI/i1/-1e9”, “CHANNEL(language)=en”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [96666666666@from-internal:2] Set(“DAHDI/i1/-1e9”, “ROUTE_ID=1”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [96666666666@from-internal:3] Set(“DAHDI/i1/-1e9”, “MOHCLASS=default”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [96666666666@from-internal:4] ExecIf(“DAHDI/i1/-1e9”, “1?Set(TRUNKCIDOVERRIDE=5555555555)”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [96666666666@from-internal:5] Set(“DAHDI/i1/-1e9”, “_NODEST=”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [96666666666@from-internal:6] Gosub(“DAHDI/i1/-1e9”, “sub-record-check,s,1(out,96666666666,)”) in new st$
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:1] Set(“DAHDI/i1/-1e9”, “REC_POLICY_MODE_SAVE=”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:2] GotoIf(“DAHDI/i1/-1e9”, “1?check”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Goto (sub-record-check,s,7)
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:7] Set(“DAHDI/i1/-1e9”, “__MON_FMT=WAV”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:8] GotoIf(“DAHDI/i1/-1e9”, “1?next”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Goto (sub-record-check,s,11)
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:11] ExecIf(“DAHDI/i1/-1e9”, “0?Return()”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:12] ExecIf(“DAHDI/i1/-1e9”, “0?Set(__REC_POLICY_MODE=)”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:13] GotoIf(“DAHDI/i1/-1e9”, “0?out,1”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:14] Set(“DAHDI/i1/-1e9”, “__REC_STATUS=INITIALIZED”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:15] Set(“DAHDI/i1/-1e9”, “NOW=1419261861”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:16] Set(“DAHDI/i1/-1e9”, “__DAY=22”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:17] Set(“DAHDI/i1/-1e9”, “__MONTH=12”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:18] Set(“DAHDI/i1/-1e9”, “__YEAR=2014”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:19] Set(“DAHDI/i1/-1e9”, “__TIMESTR=20141222-102421”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:20] Set(“DAHDI/i1/-1e9”, “__FROMEXTEN=9”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:21] Set(“DAHDI/i1/-1e9”, "__CALLFILENAME=out-96666666666-9-20141222-102421-141926185$
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@sub-record-check:22] Goto(“DAHDI/i1/-1e9”, “out,1”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Goto (sub-record-check,out,1)
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [out@sub-record-check:1] ExecIf(“DAHDI/i1/-1e9”, “1?Set(__REC_POLICY_MODE=)”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [out@sub-record-check:2] GosubIf(“DAHDI/i1/-1e9”, “0?record,1(exten,96666666666,9)”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [out@sub-record-check:3] Return(“DAHDI/i1/-1e9”, “”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [96666666666@from-internal:7] Macro(“DAHDI/i1/-1e9”, “dialout-trunk,1,6666666666,off”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:1] Set(“DAHDI/i1/-1e9”, “DIAL_TRUNK=1”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:2] GosubIf(“DAHDI/i1/-1e9”, “0?sub-pincheck,s,1()”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:3] GotoIf(“DAHDI/i1/-1e9”, “0?disabletrunk,1”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:4] Set(“DAHDI/i1/-1e9”, “DIAL_NUMBER=6666666666”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:5] Set(“DAHDI/i1/-1e9”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:6] Set(“DAHDI/i1/-1e9”, “OUTBOUND_GROUP=OUT_1”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:7] Set(“DAHDI/i1/-1e9”, “SCA_TAG=”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:8] GotoIf(“DAHDI/i1/-1e9”, “0?nomax”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:9] GotoIf(“DAHDI/i1/-1e9”, “0?chanfull”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:10] GotoIf(“DAHDI/i1/-1e9”, “0?skipoutcid”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:11] Set(“DAHDI/i1/-1e9”, “DIAL_TRUNK_OPTIONS=”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:12] Macro(“DAHDI/i1/-1e9”, “outbound-callerid,1”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-outbound-callerid:1] ExecIf(“DAHDI/i1/-1e9”, “1?Set(CALLERPRES()=prohib_not_screened)”) in new $
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-outbound-callerid:2] ExecIf(“DAHDI/i1/-1e9”, “1?Set(REALCALLERIDNUM=9)”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-outbound-callerid:3] GotoIf(“DAHDI/i1/-1e9”, “1?normcid”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Goto (macro-outbound-callerid,s,6)
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-outbound-callerid:6] Set(“DAHDI/i1/-1e9”, “USEROUTCID=”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-outbound-callerid:7] Set(“DAHDI/i1/-1e9”, “EMERGENCYCID=”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-outbound-callerid:8] Set(“DAHDI/i1/-1e9”, “TRUNKOUTCID=5555555555”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-outbound-callerid:9] GotoIf(“DAHDI/i1/-1e9”, “1?trunkcid”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Goto (macro-outbound-callerid,s,14)
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-outbound-callerid:14] ExecIf(“DAHDI/i1/-1e9”, “1?Set(CALLERID(all)=5555555555)”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-outbound-callerid:15] ExecIf(“DAHDI/i1/-1e9”, “0?Set(CALLERID(all)=)”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-outbound-callerid:16] ExecIf(“DAHDI/i1/-1e9”, “1?Set(CALLERID(all)=5555555555)”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-outbound-callerid:17] ExecIf(“DAHDI/i1/-1e9”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in ne$
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-outbound-callerid:18] Set(“DAHDI/i1/-1e9”, “CDR(outbound_cnum)=5555555555”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-outbound-callerid:19] Set(“DAHDI/i1/-1e9”, “CDR(outbound_cnam)=”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:13] GosubIf(“DAHDI/i1/-1e9”, “0?sub-flp-1,s,1()”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:14] Set(“DAHDI/i1/-1e9”, “OUTNUM=6666666666”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:15] Set(“DAHDI/i1/-1e9”, “custom=DAHDI/g0”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:16] ExecIf(“DAHDI/i1/-1e9”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))”) in n$
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:17] ExecIf(“DAHDI/i1/-1e9”, “0?Set(DIAL_TRUNK_OPTIONS=M(confirm))”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:18] Macro(“DAHDI/i1/-1e9”, “dialout-trunk-predial-hook,”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“DAHDI/i1/-1e9”, “”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:19] GotoIf(“DAHDI/i1/-1e9”, “0?bypass,1”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:20] ExecIf(“DAHDI/i1/-1e9”, “0?Set(CONNECTEDLINE(num,i)=6666666666)”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:21] GotoIf(“DAHDI/i1/-1e9”, “0?customtrunk”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:22] Dial(“DAHDI/i1/-1e9”, “DAHDI/g0/6666666666,300,”) in new stack
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] sig_pri.c: – Requested transfer capability: 0x00 - SPEECH
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] app_dial.c: – Called DAHDI/g0/6666666666
[2014-12-22 10:24:21] VERBOSE[4926][C-00000202] app_dial.c: – DAHDI/i1/6666666666-1ea is proceeding passing it to DAHDI/i1/-1e9
[2014-12-22 10:24:22] VERBOSE[3340][C-00000202] sig_pri.c: – Span 1: Channel 0/2 got hangup request, cause 1
[2014-12-22 10:24:22] VERBOSE[4926][C-00000202] chan_dahdi.c: – Hungup ‘DAHDI/i1/6666666666-1ea’
[2014-12-22 10:24:22] VERBOSE[4926][C-00000202] app_dial.c: == Everyone is busy/congested at this time (1:0/0/1)
[2014-12-22 10:24:22] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:23] NoOp(“DAHDI/i1/-1e9”, “Dial failed for some reason with DIALSTATUS = CHANUVNUNAVAIL and HANGUPCAUSE = 1”) in new stack
[2014-12-22 10:24:22] VERBOSE[4926][C-00000202] pbx.c: – Executing [s@macro-dialout-trunk:24] GotoIf(“DAHDI/i1/-1e9”, “0?continue,1:s-CHANUNAVAIL,1”) in new stack
[2014-12-22 10:24:22] VERBOSE[4926][C-00000202] pbx.c: – Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
[2014-12-22 10:24:22] VERBOSE[4926][C-00000202] pbx.c: – Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set(“DAHDI/i1/-1e9”, “RC=1”) in new stack
[2014-12-22 10:24:22] VERBOSE[4926][C-00000202] pbx.c: – Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto(“DAHDI/i1/-1e9”, “1,1”) in new stack
[2014-12-22 10:24:22] VERBOSE[4926][C-00000202] pbx.c: – Goto (macro-dialout-trunk,1,1)
[2014-12-22 10:24:22] VERBOSE[4926][C-00000202] pbx.c: – Executing [1@macro-dialout-trunk:1] Goto(“DAHDI/i1/-1e9”, “s-INVALIDNMBR,1”) in new stack
[2014-12-22 10:24:22] VERBOSE[4926][C-00000202] pbx.c: – Goto (macro-dialout-trunk,s-INVALIDNMBR,1)
[2014-12-22 10:24:22] VERBOSE[4926][C-00000202] pbx.c: – Executing [s-INVALIDNMBR@macro-dialout-trunk:1] NoOp(“DAHDI/i1/-1e9”, “Dial failed due to trunk reporting Address Incomplete - giving up”) in new stack
[2014-12-22 10:24:22] VERBOSE[4926][C-00000202] pbx.c: – Executing [s-INVALIDNMBR@macro-dialout-trunk:2] Progress(“DAHDI/i1/-1e9”, “”) in new stack
[2014-12-22 10:24:22] VERBOSE[4926][C-00000202] pbx.c: – Executing [s-INVALIDNMBR@macro-dialout-trunk:3] Playback(“DAHDI/i1/-1e9”, “ss-noservice,noanswer”) in new stack
[2014-12-22 10:24:22] VERBOSE[4926][C-00000202] file.c: – <DAHDI/i1/-1e9> Playing ‘ss-noservice.slin’ (language ‘en’)
[2014-12-22 10:24:26] VERBOSE[4926][C-00000202] pbx.c: – Executing [s-INVALIDNMBR@macro-dialout-trunk:4] Busy(“DAHDI/i1/-1e9”, “20”) in new stack
[2014-12-22 10:24:45] VERBOSE[4926][C-00000202] app_macro.c: == Spawn extension (macro-dialout-trunk, s-INVALIDNMBR, 4) exited non-zero on ‘DAHDI/i1/-1e9’ in macro ‘dialout-trunk’
[2014-12-22 10:24:45] VERBOSE[4926][C-00000202] pbx.c: == Spawn extension (from-internal, 96666666666, 7) exited non-zero on ‘DAHDI/i1/-1e9’
[2014-12-22 10:24:45] VERBOSE[4926][C-00000202] pbx.c: – Executing [h@from-internal:1] Hangup(“DAHDI/i1/-1e9”, “”) in new stack
[2014-12-22 10:24:45] VERBOSE[4926][C-00000202] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on ‘DAHDI/i1/-1e9’
[2014-12-22 10:24:45] VERBOSE[4926][C-00000202] chan_dahdi.c: – Hungup ‘DAHDI/i1/-1e9’

And second is a log with a call with valid CID, where the call is denied when it tries to forward out:

[2014-12-22 13:38:59] VERBOSE[3340][C-00000533] sig_pri.c: – Accepting call from ‘4444444444’ to ‘5555555555’ on channel 0/6, span 1
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [5555555555@from-pstn:1] Set(“DAHDI/i1/4444444444-4d1”, “__FROM_DID=5555555555”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [5555555555@from-pstn:2] Gosub(“DAHDI/i1/4444444444-4d1”, “app-blacklist-check,s,1()”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@app-blacklist-check:1] GotoIf(“DAHDI/i1/4444444444-4d1”, “0?blacklisted”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@app-blacklist-check:2] Set(“DAHDI/i1/4444444444-4d1”, “CALLED_BLACKLIST=1”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@app-blacklist-check:3] Return(“DAHDI/i1/4444444444-4d1”, “”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [5555555555@from-pstn:3] Set(“DAHDI/i1/4444444444-4d1”, “CDR(did)=5555555555”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [5555555555@from-pstn:4] ExecIf(“DAHDI/i1/4444444444-4d1”, “0 ?Set(CALLERID(name)=4444444444)”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [5555555555@from-pstn:5] Set(“DAHDI/i1/4444444444-4d1”, “CHANNEL(musicclass)=default”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [5555555555@from-pstn:6] Set(“DAHDI/i1/4444444444-4d1”, “__MOHCLASS=default”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [5555555555@from-pstn:7] Set(“DAHDI/i1/4444444444-4d1”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [5555555555@from-pstn:8] Set(“DAHDI/i1/4444444444-4d1”, “CALLERPRES()=allowed_not_screened”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Goto (ivr-12,s,1)
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@ivr-12:1] Set(“DAHDI/i1/4444444444-4d1”, “INVALID_LOOPCOUNT=0”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@ivr-12:2] Set(“DAHDI/i1/4444444444-4d1”, “_IVR_CONTEXT_ivr-12=”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@ivr-12:3] Set(“DAHDI/i1/4444444444-4d1”, “_IVR_CONTEXT=ivr-12”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@ivr-12:4] Set(“DAHDI/i1/4444444444-4d1”, “__IVR_RETVM=RETURN”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@ivr-12:5] GotoIf(“DAHDI/i1/4444444444-4d1”, “0?skip”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@ivr-12:6] Answer(“DAHDI/i1/4444444444-4d1”, “”) in new stack
[2014-12-22 13:38:59] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@ivr-12:7] Wait(“DAHDI/i1/4444444444-4d1”, “1”) in new stack
[2014-12-22 13:39:00] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@ivr-12:8] Set(“DAHDI/i1/4444444444-4d1”, “IVR_MSG=custom/12-5-14_OpenGreeting&custom/12-10-14OpenMenu”) in new stack
[2014-12-22 13:39:00] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@ivr-12:9] Set(“DAHDI/i1/4444444444-4d1”, “TIMEOUT(digit)=3”) in new stack
[2014-12-22 13:39:00] VERBOSE[7341][C-00000533] func_timeout.c: – Digit timeout set to 3.000
[2014-12-22 13:39:00] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@ivr-12:10] ExecIf(“DAHDI/i1/4444444444-4d1”, “1?Background(custom/12-5-14_OpenGreeting&custom/12-10-14OpenMenu)”) in new stack
[2014-12-22 13:39:00] VERBOSE[7341][C-00000533] file.c: – <DAHDI/i1/4444444444-4d1> Playing ‘custom/12-5-14_OpenGreeting.slin’ (language ‘en’)
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: == CDR updated on DAHDI/i1/4444444444-4d1
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [4@ivr-12:1] Goto(“DAHDI/i1/4444444444-4d1”, “ext-miscdests,3,1”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Goto (ext-miscdests,3,1)
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [3@ext-miscdests:1] NoOp(“DAHDI/i1/4444444444-4d1”, “MiscDest: Tel400-Offsite”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [3@ext-miscdests:2] Goto(“DAHDI/i1/4444444444-4d1”, “from-internal,96666666666,1”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Goto (from-internal,96666666666,1)
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [96666666666@from-internal:1] Macro(“DAHDI/i1/4444444444-4d1”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-user-callerid:1] Set(“DAHDI/i1/4444444444-4d1”, “TOUCH_MONITOR=1419273539.4616”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-user-callerid:2] Set(“DAHDI/i1/4444444444-4d1”, “AMPUSER=94444444444”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-user-callerid:3] GotoIf(“DAHDI/i1/4444444444-4d1”, “0?report”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-user-callerid:4] ExecIf(“DAHDI/i1/4444444444-4d1”, “1?Set(REALCALLERIDNUM=94444444444)”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-user-callerid:5] Set(“DAHDI/i1/4444444444-4d1”, “AMPUSER=”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-user-callerid:6] GotoIf(“DAHDI/i1/4444444444-4d1”, “0?limit”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-user-callerid:7] Set(“DAHDI/i1/4444444444-4d1”, “AMPUSERCIDNAME=”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-user-callerid:8] GotoIf(“DAHDI/i1/4444444444-4d1”, “1?report”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Goto (macro-user-callerid,s,15)
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-user-callerid:15] GotoIf(“DAHDI/i1/4444444444-4d1”, “1?continue”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Goto (macro-user-callerid,s,28)
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-user-callerid:28] Set(“DAHDI/i1/4444444444-4d1”, “CALLERID(number)=94444444444”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-user-callerid:29] Set(“DAHDI/i1/4444444444-4d1”, “CALLERID(name)=IT2 RESOURCE”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-user-callerid:30] Set(“DAHDI/i1/4444444444-4d1”, “CDR(cnum)=94444444444”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-user-callerid:31] Set(“DAHDI/i1/4444444444-4d1”, “CDR(cnam)=IT2 RESOURCE”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-user-callerid:32] Set(“DAHDI/i1/4444444444-4d1”, “CHANNEL(language)=en”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [96666666666@from-internal:2] Set(“DAHDI/i1/4444444444-4d1”, “ROUTE_ID=1”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [96666666666@from-internal:3] Set(“DAHDI/i1/4444444444-4d1”, “MOHCLASS=default”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [96666666666@from-internal:4] ExecIf(“DAHDI/i1/4444444444-4d1”, “1?Set(TRUNKCIDOVERRIDE=5555555555)”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [96666666666@from-internal:5] Set(“DAHDI/i1/4444444444-4d1”, “_NODEST=”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [96666666666@from-internal:6] Gosub(“DAHDI/i1/4444444444-4d1”, “sub-record-check,s,1(out,96666666666,)”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:1] Set(“DAHDI/i1/4444444444-4d1”, “REC_POLICY_MODE_SAVE=”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:2] GotoIf(“DAHDI/i1/4444444444-4d1”, “1?check”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Goto (sub-record-check,s,7)
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:7] Set(“DAHDI/i1/4444444444-4d1”, “__MON_FMT=WAV”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:8] GotoIf(“DAHDI/i1/4444444444-4d1”, “1?next”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Goto (sub-record-check,s,11)
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:11] ExecIf(“DAHDI/i1/4444444444-4d1”, “0?Return()”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:12] ExecIf(“DAHDI/i1/4444444444-4d1”, “0?Set(__REC_POLICY_MODE=)”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:13] GotoIf(“DAHDI/i1/4444444444-4d1”, “0?out,1”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:14] Set(“DAHDI/i1/4444444444-4d1”, “__REC_STATUS=INITIALIZED”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:15] Set(“DAHDI/i1/4444444444-4d1”, “NOW=1419273548”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:16] Set(“DAHDI/i1/4444444444-4d1”, “__DAY=22”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:17] Set(“DAHDI/i1/4444444444-4d1”, “__MONTH=12”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:18] Set(“DAHDI/i1/4444444444-4d1”, “__YEAR=2014”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:19] Set(“DAHDI/i1/4444444444-4d1”, “__TIMESTR=20141222-133908”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:20] Set(“DAHDI/i1/4444444444-4d1”, “__FROMEXTEN=94444444444”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:21] Set(“DAHDI/i1/4444444444-4d1”, “__CALLFILENAME=out-96666666666-94444444444-20141222-133908-1419273539.4616”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@sub-record-check:22] Goto(“DAHDI/i1/4444444444-4d1”, “out,1”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Goto (sub-record-check,out,1)
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [out@sub-record-check:1] ExecIf(“DAHDI/i1/4444444444-4d1”, “1?Set(__REC_POLICY_MODE=)”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [out@sub-record-check:2] GosubIf(“DAHDI/i1/4444444444-4d1”, “0?record,1(exten,96666666666,94444444444)”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [out@sub-record-check:3] Return(“DAHDI/i1/4444444444-4d1”, “”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [96666666666@from-internal:7] Macro(“DAHDI/i1/4444444444-4d1”, “dialout-trunk,1,6666666666,off”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:1] Set(“DAHDI/i1/4444444444-4d1”, “DIAL_TRUNK=1”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:2] GosubIf(“DAHDI/i1/4444444444-4d1”, “0?sub-pincheck,s,1()”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:3] GotoIf(“DAHDI/i1/4444444444-4d1”, “0?disabletrunk,1”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:4] Set(“DAHDI/i1/4444444444-4d1”, “DIAL_NUMBER=6666666666”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:5] Set(“DAHDI/i1/4444444444-4d1”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:6] Set(“DAHDI/i1/4444444444-4d1”, “OUTBOUND_GROUP=OUT_1”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:7] Set(“DAHDI/i1/4444444444-4d1”, “SCA_TAG=”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:8] GotoIf(“DAHDI/i1/4444444444-4d1”, “0?nomax”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:9] GotoIf(“DAHDI/i1/4444444444-4d1”, “0?chanfull”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:10] GotoIf(“DAHDI/i1/4444444444-4d1”, “0?skipoutcid”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:11] Set(“DAHDI/i1/4444444444-4d1”, “DIAL_TRUNK_OPTIONS=”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:12] Macro(“DAHDI/i1/4444444444-4d1”, “outbound-callerid,1”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-outbound-callerid:1] ExecIf(“DAHDI/i1/4444444444-4d1”, “1?Set(CALLERPRES()=allowed_not_screened)”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-outbound-callerid:2] ExecIf(“DAHDI/i1/4444444444-4d1”, “0?Set(REALCALLERIDNUM=94444444444)”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-outbound-callerid:3] GotoIf(“DAHDI/i1/4444444444-4d1”, “1?normcid”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Goto (macro-outbound-callerid,s,6)
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-outbound-callerid:6] Set(“DAHDI/i1/4444444444-4d1”, “USEROUTCID=”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-outbound-callerid:7] Set(“DAHDI/i1/4444444444-4d1”, “EMERGENCYCID=”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-outbound-callerid:8] Set(“DAHDI/i1/4444444444-4d1”, “TRUNKOUTCID=5555555555”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-outbound-callerid:9] GotoIf(“DAHDI/i1/4444444444-4d1”, “1?trunkcid”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Goto (macro-outbound-callerid,s,14)
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-outbound-callerid:14] ExecIf(“DAHDI/i1/4444444444-4d1”, “1?Set(CALLERID(all)=5555555555)”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-outbound-callerid:15] ExecIf(“DAHDI/i1/4444444444-4d1”, “0?Set(CALLERID(all)=)”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-outbound-callerid:16] ExecIf(“DAHDI/i1/4444444444-4d1”, “1?Set(CALLERID(all)=5555555555)”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-outbound-callerid:17] ExecIf(“DAHDI/i1/4444444444-4d1”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-outbound-callerid:18] Set(“DAHDI/i1/4444444444-4d1”, “CDR(outbound_cnum)=5555555555”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-outbound-callerid:19] Set(“DAHDI/i1/4444444444-4d1”, “CDR(outbound_cnam)=”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:13] GosubIf(“DAHDI/i1/4444444444-4d1”, “0?sub-flp-1,s,1()”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:14] Set(“DAHDI/i1/4444444444-4d1”, “OUTNUM=6666666666”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:15] Set(“DAHDI/i1/4444444444-4d1”, “custom=DAHDI/g0”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:16] ExecIf(“DAHDI/i1/4444444444-4d1”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:17] ExecIf(“DAHDI/i1/4444444444-4d1”, “0?Set(DIAL_TRUNK_OPTIONS=M(confirm))”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:18] Macro(“DAHDI/i1/4444444444-4d1”, “dialout-trunk-predial-hook,”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“DAHDI/i1/4444444444-4d1”, “”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:19] GotoIf(“DAHDI/i1/4444444444-4d1”, “0?bypass,1”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:20] ExecIf(“DAHDI/i1/4444444444-4d1”, “0?Set(CONNECTEDLINE(num,i)=6666666666)”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:21] GotoIf(“DAHDI/i1/4444444444-4d1”, “0?customtrunk”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-dialout-trunk:22] Dial(“DAHDI/i1/4444444444-4d1”, “DAHDI/g0/6666666666,300,”) in new stack
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] sig_pri.c: – Requested transfer capability: 0x00 - SPEECH
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] app_dial.c: – Called DAHDI/g0/6666666666
[2014-12-22 13:39:08] VERBOSE[7341][C-00000533] app_dial.c: – DAHDI/i1/6666666666-4d2 is proceeding passing it to DAHDI/i1/4444444444-4d1
[2014-12-22 13:39:09] VERBOSE[7341][C-00000533] app_dial.c: – DAHDI/i1/6666666666-4d2 is making progress passing it to DAHDI/i1/4444444444-4d1
[2014-12-22 13:39:10] VERBOSE[7341][C-00000533] app_dial.c: – DAHDI/i1/6666666666-4d2 answered DAHDI/i1/4444444444-4d1
[2014-12-22 13:39:25] VERBOSE[7341][C-00000533] pbx.c: – Executing [h@macro-dialout-trunk:1] Macro(“DAHDI/i1/4444444444-4d1”, “hangupcall,”) in new stack
[2014-12-22 13:39:25] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-hangupcall:1] GotoIf(“DAHDI/i1/4444444444-4d1”, “1?theend”) in new stack
[2014-12-22 13:39:25] VERBOSE[7341][C-00000533] pbx.c: – Goto (macro-hangupcall,s,3)
[2014-12-22 13:39:25] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-hangupcall:3] ExecIf(“DAHDI/i1/4444444444-4d1”, “0?Set(CDR(recordingfile)=)”) in new stack
[2014-12-22 13:39:25] VERBOSE[7341][C-00000533] pbx.c: – Executing [s@macro-hangupcall:4] Hangup(“DAHDI/i1/4444444444-4d1”, “”) in new stack
[2014-12-22 13:39:25] VERBOSE[7341][C-00000533] app_macro.c: == Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘DAHDI/i1/4444444444-4d1’ in macro ‘hangupcall’
[2014-12-22 13:39:25] VERBOSE[7341][C-00000533] pbx.c: == Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on ‘DAHDI/i1/4444444444-4d1’
[2014-12-22 13:39:25] VERBOSE[7341][C-00000533] chan_dahdi.c: – Hungup ‘DAHDI/i1/6666666666-4d2’
[2014-12-22 13:39:25] VERBOSE[7341][C-00000533] app_macro.c: == Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on ‘DAHDI/i1/4444444444-4d1’ in macro ‘dialout-trunk’
[2014-12-22 13:39:25] VERBOSE[7341][C-00000533] pbx.c: == Spawn extension (from-internal, 96666666666, 7) exited non-zero on ‘DAHDI/i1/4444444444-4d1’
[2014-12-22 13:39:25] VERBOSE[7341][C-00000533] chan_dahdi.c: – Hungup ‘DAHDI/i1/4444444444-4d1’
[2014-12-22 13:39:25] VERBOSE[7341][C-00000533] chan_dahdi.c: – Hungup ‘DAHDI/i1/4444444444-4d1’

The ISDN provider is rejecting the call with cause code 1 (unassigned number).

Also note that this appears to be a FreePBX dialplan. We do not support FreePBX here.