I am attempting to modify the Outbound CallerID based on the prefix of the number dialed. (We need a central call center to place calls for remote branch offices)
I added the following to the extensions_custom.conf and it works file up to a point.
[from-bxxx]
exten => _15XXXX.,1(CLEARCID),Set(CALLERID(num)=8300000000)
exten => _20XXXX.,n(CLEARCID),Set(CALLERID(num)=8000000000)
exten => _22XXXX.,n(CLEARCID),Set(CALLERID(num)=7100000000)
exten => _25XXXX.,n(CLEARCID),Set(CALLERID(num)=7100000000)
;exten => _30XXXX.,n(CLEARCID),Set(CALLERID(num)=7100000000)
;exten => _40XXXX.,n(CLEARCID),Set(CALLERID(num)=7100000000)
;exten => _50XXXX.,n(CLEARCID),Set(CALLERID(num)=2100000000)
;exten => _55XXXX.,n(CLEARCID),Set(CALLERID(num)=8100000000)
exten => _XXXXXX.,n,Dial(zap/g0/${EXTEN:2},40)
exten => _XXXXXX.,n,Hangup(zap/g0/${EXTEN:2},40)
I can uncomment the 4 of the lines and calls work fine. When I uncomment the 5th line the user gets a message that the call can’t be completed as dialed. However after the message is played, the call goes gets placed anyway.
I am open to suggestions and am not locked into using this method to accomplish this task.
Alternative, Can anyone tell me how to change the CallerID and let the normal dial plan place the call??? As in set the CallerID as I have above and then strip the prefix off of the number to dial.
Thanks for the help.
BB