Outbound CID dahdi -> sip

Hello Everyone!

Config in this case:
Legacy('99)PBX_E1------E1(dahdi)FREEPBX_pjsip-trunk---------WORLD
sip_extension(no.55)
_______________|

PBX not send CID via E1 and we want use option like a “Force trunk CID”

When we call from ext55 - all CID options working fine, I mean:
outbound route CID with “override ext.”(%202),
trunk outbound CID with “force trunk CID”(%200),
App/Set CID option (%201)

CID from WORLD to PBX work ok.

When we call from PBX to WORLD - CID is unavailable.

In extension.conf, I cant find variable CALLERID in [globals], App/Set CID option use this variable.

exten => s,n,Set(__CALLINGNAMEPRES_SV=${CALLERID(name-pres)})
exten => s,n,Set(__CALLINGNUMPRES_SV=${CALLERID(num-pres)})

This is log - call from extension 55 and from dahdi trunk.

pbx.c: Executing [0%%%%%%%[email protected]:1] Macro(“PJSIP/55-00000c4a”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
pbx.c: Executing [[email protected]:1] Set(“PJSIP/55-00000c4a”, “TOUCH_MONITOR=1538514526.6271”) in new stack
pbx.c: Executing [[email protected]:2] Set(“PJSIP/55-00000c4a”, “AMPUSER=55”) in new stack
pbx.c: Executing [[email protected]:3] GotoIf(“PJSIP/55-00000c4a”, “0?report”) in new stack
pbx.c: Executing [[email protected]:4] ExecIf(“PJSIP/55-00000c4a”, “1?Set(REALCALLERIDNUM=55)”) in new stack
pbx.c: Executing [[email protected]:5] Set(“PJSIP/55-00000c4a”, “AMPUSER=55”) in new stack
pbx.c: Executing [[email protected]:6] GotoIf(“PJSIP/55-00000c4a”, “0?limit”) in new stack
pbx.c: Executing [[email protected]:7] Set(“PJSIP/55-00000c4a”, “AMPUSERCIDNAME=piec-piec”) in new stack
pbx.c: Executing [[email protected]:8] ExecIf(“PJSIP/55-00000c4a”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
pbx.c: Executing [[email protected]:9] GotoIf(“PJSIP/55-00000c4a”, “0?report”) in new stack
pbx.c: Executing [[email protected]:10] Set(“PJSIP/55-00000c4a”, “AMPUSERCID=55”) in new stack
pbx.c: Executing [[email protected]:11] Set(“PJSIP/55-00000c4a”, “__DIAL_OPTIONS=HhTtr”) in new stack
pbx.c: Executing [[email protected]:12] Set(“PJSIP/55-00000c4a”, “CALLERID(all)=“piec-piec” <55>”) in new stack
pbx.c: Executing [[email protected]:13] GotoIf(“PJSIP/55-00000c4a”, “0?limit”) in new stack
pbx.c: Executing [[email protected]:14] ExecIf(“PJSIP/55-00000c4a”, “1?Set(GROUP(concurrency_limit)=55)”) in new stack
pbx.c: Executing [[email protected]:15] ExecIf(“PJSIP/55-00000c4a”, “0?Set(CHANNEL(language)=)”) in new stack
pbx.c: Executing [[email protected]:16] NoOp(“PJSIP/55-00000c4a”, “Macro Depth is 1”) in new stack
pbx.c: Executing [[email protected]:17] GotoIf(“PJSIP/55-00000c4a”, “1?report2:macroerror”) in new stack
pbx_builtins.c: Goto (macro-user-callerid,s,18)
pbx.c: Executing [[email protected]:18] GotoIf(“PJSIP/55-00000c4a”, “1?continue”) in new stack
pbx_builtins.c: Goto (macro-user-callerid,s,37)
pbx.c: Executing [[email protected]:37] Set(“PJSIP/55-00000c4a”, “CALLERID(number)=55”) in new stack
pbx.c: Executing [[email protected]:38] Set(“PJSIP/55-00000c4a”, “CALLERID(name)=piec-piec”) in new stack
pbx.c: Executing [[email protected]:39] GotoIf(“PJSIP/55-00000c4a”, “0?cnum”) in new stack
pbx.c: Executing [[email protected]:40] Set(“PJSIP/55-00000c4a”, “CDR(cnam)=piec-piec”) in new stack
pbx.c: Executing [[email protected]:41] Set(“PJSIP/55-00000c4a”, “CDR(cnum)=55”) in new stack
pbx.c: Executing [[email protected]:42] Set(“PJSIP/55-00000c4a”, “CHANNEL(language)=pl”) in new stack
pbx.c: Executing [0%%%%%%%[email protected]:2] Gosub(“PJSIP/55-00000c4a”, “sub-record-check,s,1(out,0%%%%%%%26,never)”) in new stack
pbx.c: Executing [[email protected]:1] GotoIf(“PJSIP/55-00000c4a”, “0?initialized”) in new stack
pbx.c: Executing [[email protected]:2] Set(“PJSIP/55-00000c4a”, “__REC_STATUS=INITIALIZED”) in new stack
pbx.c: Executing [[email protected]:3] Set(“PJSIP/55-00000c4a”, “NOW=1538514526”) in new stack
pbx.c: Executing [[email protected]:4] Set(“PJSIP/55-00000c4a”, “__DAY=02”) in new stack
pbx.c: Executing [[email protected]:5] Set(“PJSIP/55-00000c4a”, “__MONTH=10”) in new stack
pbx.c: Executing [[email protected]:6] Set(“PJSIP/55-00000c4a”, “__YEAR=2018”) in new stack
pbx.c: Executing [[email protected]:7] Set(“PJSIP/55-00000c4a”, “__TIMESTR=20181002-230846”) in new stack
pbx.c: Executing [[email protected]:8] Set(“PJSIP/55-00000c4a”, “__FROMEXTEN=55”) in new stack
pbx.c: Executing [[email protected]:9] Set(“PJSIP/55-00000c4a”, “__MON_FMT=wav”) in new stack
pbx.c: Executing [[email protected]:10] NoOp(“PJSIP/55-00000c4a”, “Recordings initialized”) in new stack
pbx.c: Executing [[email protected]:11] ExecIf(“PJSIP/55-00000c4a”, “0?Set(ARG3=dontcare)”) in new stack
pbx.c: Executing [[email protected]:12] Set(“PJSIP/55-00000c4a”, “REC_POLICY_MODE_SAVE=”) in new stack
pbx.c: Executing [[email protected]:13] ExecIf(“PJSIP/55-00000c4a”, “0?Set(REC_STATUS=NO)”) in new stack
pbx.c: Executing [[email protected]:14] GotoIf(“PJSIP/55-00000c4a”, “3?checkaction”) in new stack
pbx_builtins.c: Goto (sub-record-check,s,17)
pbx.c: Executing [[email protected]:17] GotoIf(“PJSIP/55-00000c4a”, “1?sub-record-check,out,1”) in new stack
pbx_builtins.c: Goto (sub-record-check,out,1)
pbx.c: Executing [[email protected]:1] NoOp(“PJSIP/55-00000c4a”, “Outbound Recording Check from 55 to 0%%%%%%%26”) in new stack
pbx.c: Executing [[email protected]:2] Set(“PJSIP/55-00000c4a”, “RECMODE=dontcare”) in new stack
pbx.c: Executing [[email protected]:3] ExecIf(“PJSIP/55-00000c4a”, “1?Goto(routewins)”) in new stack
pbx_builtins.c: Goto (sub-record-check,out,7)
pbx.c: Executing [[email protected]:7] Gosub(“PJSIP/55-00000c4a”, “recordcheck,1(never,out,0%%%%%%%26)”) in new stack
pbx.c: Executing [[email protected]:1] NoOp(“PJSIP/55-00000c4a”, “Starting recording check against never”) in new stack
pbx.c: Executing [[email protected]:2] Goto(“PJSIP/55-00000c4a”, “never”) in new stack
pbx_builtins.c: Goto (sub-record-check,recordcheck,14)
pbx.c: Executing [[email protected]:14] Set(“PJSIP/55-00000c4a”, “__REC_POLICY_MODE=NEVER”) in new stack
pbx.c: Executing [[email protected]:15] Goto(“PJSIP/55-00000c4a”, “stoprec”) in new stack
pbx_builtins.c: Goto (sub-record-check,recordcheck,25)
pbx.c: Executing [[email protected]:25] NoOp(“PJSIP/55-00000c4a”, “Stopping recording: out, 0%%%%%%%26”) in new stack
pbx.c: Executing [[email protected]:26] Set(“PJSIP/55-00000c4a”, “__REC_STATUS=STOPPED”) in new stack
pbx.c: Executing [[email protected]:27] System(“PJSIP/55-00000c4a”, “/var/lib/asterisk/bin/stoprecording.php “PJSIP/55-00000c4a””) in new stack
pbx.c: Executing [[email protected]:28] Return(“PJSIP/55-00000c4a”, “”) in new stack
pbx.c: Executing [[email protected]:8] Return(“PJSIP/55-00000c4a”, “”) in new stack
pbx.c: Executing [0%%%%%%%[email protected]:3] ExecIf(“PJSIP/55-00000c4a”, “0 ?Set(CDR(accountcode)=)”) in new stack
pbx.c: Executing [0%%%%%%%[email protected]:4] Set(“PJSIP/55-00000c4a”, “MOHCLASS=default”) in new stack
pbx.c: Executing [0%%%%%%%[email protected]:5] ExecIf(“PJSIP/55-00000c4a”, “0?Set(TRUNKCIDOVERRIDE=<48%%%%%%202>)”) in new stack
pbx.c: Executing [0%%%%%%%[email protected]:6] Set(“PJSIP/55-00000c4a”, “_NODEST=”) in new stack
pbx.c: Executing [0%%%%%%%[email protected]:7] Macro(“PJSIP/55-00000c4a”, “dialout-trunk,1,%%%%%%%26,off”) in new stack
pbx.c: Executing [[email protected]:1] Set(“PJSIP/55-00000c4a”, “DIAL_TRUNK=1”) in new stack
pbx.c: Executing [[email protected]:2] ExecIf(“PJSIP/55-00000c4a”, “0?Set(DIAL_OPTIONS=Hhtr)”) in new stack
pbx.c: Executing [[email protected]:3] GosubIf(“PJSIP/55-00000c4a”, “0?sub-pincheck,s,1()”) in new stack
pbx.c: Executing [[email protected]:4] ExecIf(“PJSIP/55-00000c4a”, “0?Set(CALLERID(num)=55)”) in new stack
pbx.c: Executing [[email protected]:5] GotoIf(“PJSIP/55-00000c4a”, “0?disabletrunk,1”) in new stack
pbx.c: Executing [[email protected]:6] Set(“PJSIP/55-00000c4a”, “DIAL_NUMBER=%%%%%%%26”) in new stack
pbx.c: Executing [[email protected]:7] Set(“PJSIP/55-00000c4a”, “DIAL_TRUNK_OPTIONS=HhTtr”) in new stack
pbx.c: Executing [[email protected]:8] Set(“PJSIP/55-00000c4a”, “OUTBOUND_GROUP=OUT_1”) in new stack
pbx.c: Executing [[email protected]:9] Set(“PJSIP/55-00000c4a”, “DIAL_TRUNK_OPTIONS=T”) in new stack
pbx.c: Executing [[email protected]:10] GotoIf(“PJSIP/55-00000c4a”, “0?nomax”) in new stack
pbx.c: Executing [[email protected]:11] GotoIf(“PJSIP/55-00000c4a”, “0?chanfull”) in new stack
pbx.c: Executing [[email protected]:12] GotoIf(“PJSIP/55-00000c4a”, “0?skipoutcid”) in new stack
pbx.c: Executing [[email protected]:13] Macro(“PJSIP/55-00000c4a”, “outbound-callerid,1”) in new stack
pbx.c: Executing [[email protected]:1] NoOp(“PJSIP/55-00000c4a”, “55”) in new stack
pbx.c: Executing [[email protected]:2] NoOp(“PJSIP/55-00000c4a”, “”) in new stack
pbx.c: Executing [[email protected]:3] NoOp(“PJSIP/55-00000c4a”, “all”) in new stack
pbx.c: Executing [[email protected]:4] ExecIf(“PJSIP/55-00000c4a”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
pbx.c: Executing [[email protected]:5] ExecIf(“PJSIP/55-00000c4a”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
pbx.c: Executing [[email protected]:6] ExecIf(“PJSIP/55-00000c4a”, “0?Set(REALCALLERIDNUM=55)”) in new stack
pbx.c: Executing [[email protected]:7] ExecIf(“PJSIP/55-00000c4a”, “0?Set(AMPUSER=55)”) in new stack
pbx.c: Executing [[email protected]:8] GotoIf(“PJSIP/55-00000c4a”, “1?normcid”) in new stack
pbx_builtins.c: Goto (macro-outbound-callerid,s,12)
pbx.c: Executing [[email protected]:12] Set(“PJSIP/55-00000c4a”, “USEROUTCID=“test”<48%%%%%%201>”) in new stack
pbx.c: Executing [[email protected]:13] Set(“PJSIP/55-00000c4a”, “EMERGENCYCID=”) in new stack
pbx.c: Executing [[email protected]:14] Set(“PJSIP/55-00000c4a”, “TRUNKOUTCID=<48%%%%%%200>”) in new stack
pbx.c: Executing [[email protected]:15] GotoIf(“PJSIP/55-00000c4a”, “1?trunkcid”) in new stack
pbx_builtins.c: Goto (macro-outbound-callerid,s,20)
pbx.c: Executing [[email protected]:20] ExecIf(“PJSIP/55-00000c4a”, “1?Set(CALLERID(all)=<48%%%%%%200>)”) in new stack
pbx.c: Executing [[email protected]:21] ExecIf(“PJSIP/55-00000c4a”, “1?Set(CALLERID(all)=“test”<48%%%%%%201>)”) in new stack
pbx.c: Executing [[email protected]:22] ExecIf(“PJSIP/55-00000c4a”, “1?Set(CALLERID(all)=<48%%%%%%200>)”) in new stack
pbx.c: Executing [[email protected]:23] ExecIf(“PJSIP/55-00000c4a”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
pbx.c: Executing [[email protected]:24] ExecIf(“PJSIP/55-00000c4a”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
pbx.c: Executing [[email protected]:25] Set(“PJSIP/55-00000c4a”, “CDR(outbound_cnum)=48%%%%%%200”) in new stack
pbx.c: Executing [[email protected]:26] Set(“PJSIP/55-00000c4a”, “CDR(outbound_cnam)=”) in new stack
pbx.c: Executing [[email protected]:14] GosubIf(“PJSIP/55-00000c4a”, “0?sub-flp-1,s,1()”) in new stack
pbx.c: Executing [[email protected]:15] Set(“PJSIP/55-00000c4a”, “OUTNUM=%%%%%%%26”) in new stack
pbx.c: Executing [[email protected]:16] Set(“PJSIP/55-00000c4a”, “custom=PJSIP”) in new stack
pbx.c: Executing [[email protected]:17] ExecIf(“PJSIP/55-00000c4a”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)”) in new stack
pbx.c: Executing [[email protected]:18] ExecIf(“PJSIP/55-00000c4a”, “0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))”) in new stack
pbx.c: Executing [[email protected]:19] Macro(“PJSIP/55-00000c4a”, “dialout-trunk-predial-hook,”) in new stack
pbx.c: Executing [[email protected]:1] MacroExit(“PJSIP/55-00000c4a”, “”) in new stack
pbx.c: Executing [[email protected]:20] GotoIf(“PJSIP/55-00000c4a”, “0?bypass,1”) in new stack
pbx.c: Executing [[email protected]:21] ExecIf(“PJSIP/55-00000c4a”, “1?Set(CONNECTEDLINE(num,i)=%%%%%%%26)”) in new stack
pbx.c: Executing [[email protected]:22] ExecIf(“PJSIP/55-00000c4a”, “1?Set(CONNECTEDLINE(name,i)=CID:48%%%%%%200)”) in new stack
pbx.c: Executing [[email protected]:23] ExecIf(“PJSIP/55-00000c4a”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)48%%%%%%200)”) in new stack
pbx.c: Executing [[email protected]:24] GotoIf(“PJSIP/55-00000c4a”, “0?customtrunk”) in new stack
pbx.c: Executing [[email protected]:25] Dial(“PJSIP/55-00000c4a”, “PJSIP/%%%%%%%[email protected],300,Tb(func-apply-sipheaders^s^1)”) in new stack
app_stack.c: PJSIP/trunk.name-00000c4b Internal Gosub(func-apply-sipheaders,s,1) start
pbx.c: Executing [[email protected]:1] NoOp(“PJSIP/trunk.name-00000c4b”, “Applying SIP Headers to channel”) in new stack
pbx.c: Executing [[email protected]:2] Set(“PJSIP/trunk.name-00000c4b”, “SIPHEADERKEYS=”) in new stack
pbx.c: Executing [[email protected]:3] ExecIf(“PJSIP/trunk.name-00000c4b”, “0?Set(Rheader=1)”) in new stack
pbx.c: Executing [[email protected]:4] While(“PJSIP/trunk.name-00000c4b”, “0”) in new stack
app_while.c: Jumping to priority 7
pbx.c: Executing [[email protected]:8] ExecIf(“PJSIP/trunk.name-00000c4b”, “0?Set(PJSIP_HEADER(remove,Alert-Info)=)”) in new stack
pbx.c: Executing [[email protected]:9] Return(“PJSIP/trunk.name-00000c4b”, “”) in new stack
app_stack.c: Spawn extension (from-pstn, 0%%%%%%%26, 1) exited non-zero on ‘PJSIP/trunk.name-00000c4b’
app_stack.c: PJSIP/trunk.name-00000c4b Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
app_dial.c: Called PJSIP/%%%%%%%[email protected]
app_dial.c: PJSIP/trunk.name-00000c4b is making progress passing it to PJSIP/55-00000c4a
app_macro.c: Spawn extension (macro-dialout-trunk, s, 25) exited non-zero on ‘PJSIP/55-00000c4a’ in macro ‘dialout-trunk’
pbx.c: Spawn extension (from-internal, 0%%%%%%%26, 7) exited non-zero on ‘PJSIP/55-00000c4a’
pbx.c: Executing [[email protected]:1] Macro(“PJSIP/55-00000c4a”, “hangupcall”) in new stack
pbx.c: Executing [[email protected]:1] GotoIf(“PJSIP/55-00000c4a”, “1?theend”) in new stack
pbx_builtins.c: Goto (macro-hangupcall,s,3)
pbx.c: Executing [[email protected]:3] ExecIf(“PJSIP/55-00000c4a”, “0?Set(CDR(recordingfile)=)”) in new stack
pbx.c: Executing [[email protected]:4] NoOp(“PJSIP/55-00000c4a”, "PJSIP/trunk.name-00000c4b monior file= ") in new stack
pbx.c: Executing [[email protected]:5] AGI(“PJSIP/55-00000c4a”, “attendedtransfer-rec-restart.php,PJSIP/trunk.name-00000c4b,”) in new stack
res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
res_agi.c: <PJSIP/55-00000c4a>AGI Script attendedtransfer-rec-restart.php completed, returning 0
pbx.c: Executing [[email protected]:6] Hangup(“PJSIP/55-00000c4a”, “”) in new stack
app_macro.c: Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘PJSIP/55-00000c4a’ in macro ‘hangupcall’
pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/55-00000c4a’

EDIT: log from dahdi with options in dahdi config: “Use Caller ID:” and “Use Caller ID Presentation” set to Yes

pbx.c: Executing [%%%%%[email protected]:2] Log(“DAHDI/i1/-7”, "WARNING,Friendly Scanner from ") in new stack
Ext. %%%%%326: Friendly Scanner from
pbx.c: Executing [%%%%%[email protected]:3] Set(“DAHDI/i1/-7”, “__FROM_DID=%%%%%326”) in new stack
pbx.c: Executing [%%%%%[email protected]:4] Goto(“DAHDI/i1/-7”, “ext-did,s,1”) in new stack
pbx_builtins.c: Goto (ext-did,s,1)
pbx.c: Executing [[email protected]:1] Set(“DAHDI/i1/-7”, “__DIRECTION=INBOUND”) in new stack
pbx.c: Executing [[email protected]:2] Set(“DAHDI/i1/-7”, “CHANNEL(language)=pl”) in new stack
pbx.c: Executing [[email protected]:3] Gosub(“DAHDI/i1/-7”, “sub-record-check,s,1(in,s,never)”) in new stack
pbx.c: Executing [[email protected]:1] GotoIf(“DAHDI/i1/-7”, “0?initialized”) in new stack
pbx.c: Executing [[email protected]:2] Set(“DAHDI/i1/-7”, “__REC_STATUS=INITIALIZED”) in new stack
pbx.c: Executing [[email protected]:3] Set(“DAHDI/i1/-7”, “NOW=1538561299”) in new stack
pbx.c: Executing [[email protected]:4] Set(“DAHDI/i1/-7”, “__DAY=03”) in new stack
pbx.c: Executing [[email protected]:5] Set(“DAHDI/i1/-7”, “__MONTH=10”) in new stack
pbx.c: Executing [[email protected]:6] Set(“DAHDI/i1/-7”, “__YEAR=2018”) in new stack
pbx.c: Executing [[email protected]:7] Set(“DAHDI/i1/-7”, “__TIMESTR=20181003-120819”) in new stack
pbx.c: Executing [[email protected]:8] Set(“DAHDI/i1/-7”, “__FROMEXTEN=unknown”) in new stack
pbx.c: Executing [[email protected]eck:9] Set(“DAHDI/i1/-7”, “__MON_FMT=wav”) in new stack
pbx.c: Executing [[email protected]:10] NoOp(“DAHDI/i1/-7”, “Recordings initialized”) in new stack
pbx.c: Executing [[email protected]:11] ExecIf(“DAHDI/i1/-7”, “0?Set(ARG3=dontcare)”) in new stack
pbx.c: Executing [[email protected]:12] Set(“DAHDI/i1/-7”, “REC_POLICY_MODE_SAVE=”) in new stack
pbx.c: Executing [[email protected]:13] ExecIf(“DAHDI/i1/-7”, “0?Set(REC_STATUS=NO)”) in new stack
pbx.c: Executing [[email protected]:14] GotoIf(“DAHDI/i1/-7”, “2?checkaction”) in new stack
pbx_builtins.c: Goto (sub-record-check,s,17)
pbx.c: Executing [[email protected]:17] GotoIf(“DAHDI/i1/-7”, “1?sub-record-check,in,1”) in new stack
pbx_builtins.c: Goto (sub-record-check,in,1)
pbx.c: Executing [[email protected]:1] NoOp(“DAHDI/i1/-7”, “Inbound Recording Check to s”) in new stack
pbx.c: Executing [[email protected]:2] Set(“DAHDI/i1/-7”, “FROMEXTEN=unknown”) in new stack
pbx.c: Executing [[email protected]:3] ExecIf(“DAHDI/i1/-7”, “0?Set(FROMEXTEN=)”) in new stack
pbx.c: Executing [[email protected]:4] Gosub(“DAHDI/i1/-7”, “recordcheck,1(never,in,s)”) in new stack
pbx.c: Executing [[email protected]:1] NoOp(“DAHDI/i1/-7”, “Starting recording check against never”) in new stack
pbx.c: Executing [[email protected]:2] Goto(“DAHDI/i1/-7”, “never”) in new stack
pbx_builtins.c: Goto (sub-record-check,recordcheck,14)
pbx.c: Executing [[email protected]:14] Set(“DAHDI/i1/-7”, “__REC_POLICY_MODE=NEVER”) in new stack
pbx.c: Executing [[email protected]:15] Goto(“DAHDI/i1/-7”, “stoprec”) in new stack
pbx_builtins.c: Goto (sub-record-check,recordcheck,25)
pbx.c: Executing [[email protected]:25] NoOp(“DAHDI/i1/-7”, “Stopping recording: in, s”) in new stack
pbx.c: Executing [[email protected]:26] Set(“DAHDI/i1/-7”, “__REC_STATUS=STOPPED”) in new stack
pbx.c: Executing [[email protected]:27] System(“DAHDI/i1/-7”, "/var/lib/asterisk/bin/stoprecording.php “DAHDI/i1/-7"”) in new stack
pbx.c: Executing [[email protected]:28] Return(“DAHDI/i1/-7”, “”) in new stack
pbx.c: Executing [[email protected]:5] Return(“DAHDI/i1/-7”, “”) in new stack
pbx.c: Executing [[email protected]:4] Set(“DAHDI/i1/-7”, “CHANNEL(tonezone)=pl”) in new stack
pbx.c: Executing [[email protected]:5] ExecIf(“DAHDI/i1/-7”, “0?Set(__FROM_DID=s)”) in new stack
pbx.c: Executing [[email protected]:6] Set(“DAHDI/i1/-7”, “returnhere=1”) in new stack
pbx.c: Executing [[email protected]:7] Gosub(“DAHDI/i1/-7”, “app-blacklist-check,s,1()”) in new stack
pbx.c: Executing [[email protected]:1] GotoIf(“DAHDI/i1/-7”, “0?blacklisted”) in new stack
pbx.c: Executing [[email protected]:2] Set(“DAHDI/i1/-7”, “CALLED_BLACKLIST=1”) in new stack
pbx.c: Executing [[email protected]:3] Return(“DAHDI/i1/-7”, “”) in new stack
pbx.c: Executing [[email protected]:8] Set(“DAHDI/i1/-7”, “CDR(did)=%%%%%326”) in new stack
pbx.c: Executing [[email protected]:9] GotoIf(“DAHDI/i1/-7”, “0?”) in new stack
pbx.c: Executing [[email protected]:10] ExecIf(“DAHDI/i1/-7”, “1 ?Set(CALLERID(name)=)”) in new stack
pbx.c: Executing [[email protected]:11] Set(“DAHDI/i1/-7”, “__MOHCLASS=”) in new stack
pbx.c: Executing [[email protected]:12] Set(“DAHDI/i1/-7”, “__REVERSAL_REJECT=FALSE”) in new stack
pbx.c: Executing [[email protected]:13] GotoIf(“DAHDI/i1/-7”, “1?post-reverse-charge”) in new stack
pbx_builtins.c: Goto (ext-did,s,15)
pbx.c: Executing [[email protected]:15] NoOp(“DAHDI/i1/-7”, “”) in new stack
pbx.c: Executing [[email protected]:16] Set(“DAHDI/i1/-7”, “__CALLINGNAMEPRES_SV=unavailable”) in new stack
pbx.c: Executing [[email protected]:17] Set(“DAHDI/i1/-7”, “__CALLINGNUMPRES_SV=unavailable”) in new stack
pbx.c: Executing [[email protected]:18] Set(“DAHDI/i1/-7”, “CALLERID(name-pres)=allowed_not_screened”) in new stack
pbx.c: Executing [[email protected]:19] Set(“DAHDI/i1/-7”, “CALLERID(num-pres)=allowed_not_screened”) in new stack
pbx.c: Executing [[email protected]:20] NoOp(“DAHDI/i1/-7”, “CallerID Entry Point”) in new stack
pbx.c: Executing [[email protected]:21] Goto(“DAHDI/i1/-7”, “ext-trunk,1,1”) in new stack
pbx_builtins.c: Goto (ext-trunk,1,1)
pbx.c: Executing [[email protected]:1] Set(“DAHDI/i1/-7”, “[email protected]”) in new stack
pbx.c: Executing [[email protected]:2] Set(“DAHDI/i1/-7”, “TDIAL_STRING=PJSIP”) in new stack
pbx.c: Executing [[email protected]:3] Set(“DAHDI/i1/-7”, “DIAL_TRUNK=1”) in new stack
pbx.c: Executing [[email protected]:4] Goto(“DAHDI/i1/-7”, “ext-trunk,tdial,1”) in new stack
pbx_builtins.c: Goto (ext-trunk,tdial,1)
pbx.c: Executing [[email protected]:1] Set(“DAHDI/i1/-7”, “OUTBOUND_GROUP=OUT_1”) in new stack
pbx.c: Executing [[email protected]:2] GotoIf(“DAHDI/i1/-7”, “0?nomax”) in new stack
pbx.c: Executing [[email protected]:3] GotoIf(“DAHDI/i1/-7”, “0?hangit”) in new stack
pbx.c: Executing [[email protected]:4] ExecIf(“DAHDI/i1/-7”, “1?Set(CALLERPRES(name-pres)=unavailable)”) in new stack
pbx.c: Executing [[email protected]:5] ExecIf(“DAHDI/i1/-7”, “1?Set(CALLERPRES(num-pres)=unavailable)”) in new stack
pbx.c: Executing [[email protected]:6] Set(“DAHDI/i1/-7”, “DIAL_NUMBER=%%%%%326”) in new stack
pbx.c: Executing [[email protected]:7] GosubIf(“DAHDI/i1/-7”, “0?sub-flp-1,s,1()”) in new stack
pbx.c: Executing [[email protected]:8] Set(“DAHDI/i1/-7”, “OUTNUM=%%%%%326”) in new stack
pbx.c: Executing [[email protected]:9] Set(“DAHDI/i1/-7”, “DIAL_TRUNK_OPTIONS=T”) in new stack
pbx.c: Executing [[email protected]:10] Dial(“DAHDI/i1/-7”, “PJSIP/%%%%%[email protected],300,T”) in new stack
app_dial.c: Called PJSIP/%%%%%[email protected]
app_dial.c: PJSIP/TRUNK.NAME-00000006 is making progress passing it to DAHDI/i1/-7
sig_pri.c: Span 1: Channel 0/4 got hangup request, cause 31
bridge_channel.c: Channel DAHDI/i1/%%%%%%900-6 left ‘simple_bridge’ basic-bridge
chan_dahdi.c: Hungup ‘DAHDI/i1/%%%%%%900-6’
bridge_channel.c: Channel PJSIP/TRUNK.NAME-00000005 left ‘simple_bridge’ basic-bridge
pbx.c: Spawn extension (ext-trunk, tdial, 10) exited non-zero on ‘PJSIP/TRUNK.NAME-00000005’

What should i do?
Please help.

I’m a little confused by your description of what you are trying to do, but in general, DAHDI doesn’t do CID from the PBX.

So, if I’m reading your diagram correctly. you have a legacy PBX connected to your FreePBX system via an E1 (30-channel) card. The FreePBX system is your interface to the PSTN.

At this point, my confusion maximizes. You seem to be saying that the trunk CID setting is working for the SIP Extension but not the old PBX. If you only have the one trunk and it’s managed by the trunk in your FreePBX, then the trunk CID should be overriding everything, regardless of source.

Within FreePBX, you can set the Caller ID in at least three places:

  1. On the trunk
  2. On the Outbound Route.
  3. On the extension.
  4. (maybe) at your Internet Telephone Service Provider (ITSP).

A possibility is that your ITSP is not allowing the CID you want to send and they are over-riding it.

Another possibility is that the CID Name you are using is not allowed (or being accepted upstream) so the CID is being sent as “Unknown” to the rest of the world.

These two lines appear to be where the CID from the Legacy PBX would be getting processed, and it doesn’t look like it’s getting sent. If that’s the case, you might need to just override the CID on the outbound trunk.

Dave, I know (exactly I tried) everything what You wrote in you post.
Trunk should override - but not doing this. Sorry.

If that’s the case, the problem is probably outside your control. Check your logs and make sure the CID is getting set on the outbound leg of the call. After you’ve verified that, call your ITSP and ask them if they are doing anything to your CID. Many ITSPs will not allow you send “foreign” caller ID information, and others will simply override what you sent with either the CID of their idea of your trunk, or simply blank it (which is what it sounds like is happening with yours).

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.