Recently, I’ve been trying to selectively block outbound caller id whenever a user inputs *67.
According to our Provider, we have the ability to override the outbound caller id info.
I’ve tried two methods of blocking. First by using the SetCallerPres function and then by using Set CallerID function. Neither seem to work.
On the Asterisk console I see the Caller ID number set to whatever I input. However, the receiving phone (my cell phone in my tests) still shows the main did as the Caller ID number.
Here’s how I have it programmed:
exten => _*67.,1,SetCallerPres(unavailable)
exten => _*67.,2,Macro(star67,${TRUNK1},${EXTEN:3})
exten => s,1,Noop(OutGoingCall,${UNIQUEID},${DATETIME},CID: ${CALLERID(all)} TRUNK:${ARG1} CALLING: ${ARG2})
exten => s,n,Set(CALLFILENAME=${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${MACRO_EXTEN}-${CALLERID(num)})
exten => s,n,Set(CALLERID(number)="")
exten => s,n,Set(CALLERID(name)=“unavailable”
This is what the console spits out:
Executing [*6715551234567@group1:1] SetCallerPres(“SIP/6154-b432e768”, “unavailable”) in new stack
– Executing [*6715551234567@group1:2] Macro(“SIP/6154-b432e768”, “star67|SIP/mg1|15551234567”) in new stack
– Executing [s@macro-star67:1] NoOp(“SIP/6154-b432e768”, “OutGoingCall|reg1-1204134953.20129||CID: “User’s Name” <6154> TRUNK:SIP/mg1 CALLING: 15551234567”) in new stack
– Executing [s@macro-star67:2] Set(“SIP/6154-b432e768”, “CALLFILENAME=20080227-115553-*6715551234567-6154”) in new stack
– Executing [s@macro-star67:3] Set(“SIP/6154-b432e768”, “CALLERID(number)=”"") in new stack
– Executing [s@macro-star67:4] Set(“SIP/6154-b432e768”, “CALLERID(name)=“unavailable””) in new stack
– Executing [s@macro-star67:5] Dial(“SIP/6154-b432e768”, “SIP/mg1/15551234567|60”) in new stack
– Called mg1/15551234567
Don’t know if this helps (since it’s commented out) but here’s my sip.conf:
;[mg1]
;type=friend
;username=mg1
;host=dynamic
;secret=mg1dc1234
;context=group1
;disallow=all
;allow=ulaw
;canreinvite=yes
;qualify=10000
Any ideas on what might be going on here are greatly appreciated.
Thanks