Hello All!,
I was having problems with the option Never Override CallerID, and some extensions where I’ve set the Outbound CID option. I’ve one SIP Trunk, with the Nerver Override CallerID option set with a defined Outbound Caller ID, but when I try to call out through one of the extensions with an Outbound CID set, this CID is set over the trunk one, and the call is rejected. I have done a change in the “macro-outbound-callerid” to make this work:
exten => s,1,GotoIf($["${REALCALLERIDNUM:1:2}" != “”]?start)
exten => s,n,Set(REALCALLERIDNUM=${CALLERID(number)})
exten => s,n(start),Noop(REALCALLERIDNUM is ${REALCALLERIDNUM})
exten => s,n,GotoIf($[“x${OUTKEEPCID_${ARG1}}” = “xon”]?lineacid)
exten => s,n,GotoIf($["${KEEPCID}" != “TRUE”]?normcid)
exten => s,n,GotoIf($[“foo${REALCALLERIDNUM}” = “foo”]?normcid)
exten => s,n,Set(USEROUTCID=${REALCALLERIDNUM})
exten => s,n,GotoIf($[“foo${DB(AMPUSER/${REALCALLERIDNUM}/device)}” = “foo”]?bypass:normcid)
exten => s,n(normcid),Set(USEROUTCID=${DB(AMPUSER/${REALCALLERIDNUM}/outboundcid)})
exten => s,n(bypass),Set(EMERGENCYCID=${DB(DEVICE/${REALCALLERIDNUM}/emergency_cid)})
exten => s,n(lineacid),Set(TRUNKOUTCID=${OUTCID_${ARG1}})
exten => s,n,GotoIf($["${EMERGENCYROUTE:1:2}" = “”]?trunkcid)
exten => s,n,GotoIf($["${EMERGENCYCID:1:2}" = “”]?trunkcid)
exten => s,n,Set(CALLERID(all)=${EMERGENCYCID})
exten => s,n,Goto(report)
exten => s,n(trunkcid),GotoIf($["${TRUNKOUTCID:1:2}" = “”]?usercid)
exten => s,n,Set(CALLERID(all)=${TRUNKOUTCID})
exten => s,n(usercid),GotoIf($["${USEROUTCID:1:2}" = “”]?report)
exten => s,n,Set(CALLERID(all)=${USEROUTCID})
exten => s,n,GotoIf($[“x${CALLERID(name)}”!=“xhidden”]?report:hidecid)
exten => s,n(hidecid),SetCallerPres(prohib_passed_screen)
exten => s,n(report),Noop(CallerID set to ${CALLERID(all)})
(lines 4 and 11)
And now it’s working. Is this a bug, or is something I’m doing wrong?
Thanks,
Luis