Dial Plan Assistance

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.

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.


Try removing the (CLEARCID) from each of the lines above, or at least all but one. That’s a label and it is supposed to be unique, only used once. Maybe you’re messing up a memory stack or something by doing this.

If that has no effect, see this thread for another thought that may or may not be helpful:

And if you still can’t get it to work, feel free to post a followup message. It CAN be done, I’m fairly certain of that, but it might take some head scratching and trying a few things to figure out what works.

Damn, now I know who to call the next time I get a call from 7100000000. :slight_smile:

rbamburg, I hate to tell you, but I blacklisted that number.