-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: No Feedback
-
Affects Version/s: 14.0.16
-
Fix Version/s: None
-
Component/s: Core - Trunks/Routing
-
Labels:None
-
Asterisk Version:13.38.3
-
Distro Version:14.0.16.11
-
Distro:FreePBX Distro
Scenario:
- FreePBX has PJSIP trunks to other PBX and to PSTN.
- "Main" Outbound Route to PSTN has Route CID Set, and Override Extension set to yes
- Global Setting "User and Device Mode" set to Extension
- Calls from extensions to PSTN correctly gets the Outbound route CID set
- Calls from another PBX to PSTN is routed properly, but CID is NOT set properly
What happens:
- in macro-outbound-callerid this line logic is true and it sets the right caller ID
- exten => s,n,ExecIf($[${LEN(${TRUNKCIDOVERRIDE})} != 0 | ${LEN(${FORCEDOUTCID_${ARG1}})} != 0]?Set(CALLERID(all)=${IF($[${LEN(${FORCEDOUTCID_${ARG1}})}=0]?${TRUNKCIDOVERRIDE}:${FORCEDOUTCID_${ARG1}})}))
- then this, 2 lines later in the macro, sets it back to the original cid from the incoming trunk, which i do not think it should, basically it overrules what was already set
-
- exten => s,n,ExecIf($[${LEN(${AMPUSER})} = 0 & ${LEN(${USEROUTCID})} = 0 & "${OUTKEEPCID_${ARG1}}" ="off" & ${LEN(${REALCALLERIDNUM})} != 0 ]?Set(CALLERID(all)=${REALCALLERIDNUM}))
Looking in modules/core/functions.inc.php i see an if statement that checks the "user and device mode" for wether or not that last ExecIF should be there - so my workaround for now is to change mode to deviceanduser, but this to me should not really be a setting that affects trunk calling caller id?
My guess would be that the last ExecIF there should be inserted much earlier in the macro, before force trunk CID and force Emergency CID and such, but i do not know enough to create a PR.