[asterisk-users] Changing callerID in a context

Kevin P. Fleming kpfleming at digium.com
Fri Aug 22 08:17:05 CDT 2008


Atis Lezdins wrote:

> [clid-mangle]
> exten => 70[01],1,Set(CALLERID(num)=581557)
> exten => 70[01],2,Return()
> exten => 10[01],1,Set(CALLERID(num)=581500)
> exten => 10[01],2,Return()
> ; and so on, just better reorganize your extensions so that this can
> match patterns better.
> 
> [dial-out]
> exten => _9.,1,GoSub(clid-mangle,${CALLERID(num)},1)
> exten => _9.,2,Dial(SIP/provider)

Actually, this can be even easier (although you didn't use the actual
CLID matching style):

[dial-out]
exten => _9./70[01],1,Set(CALLERID(num)=581557)
exten => _9./10[01],1,Set(CALLERID(num)=581500)
... more of the same 'priority 1' steps
exten => _9.,2,Dial(SIP/provider)

-- 
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)



More information about the asterisk-users mailing list