[asterisk-users] Rewrite of calling number for all extensions

Steve Edwards asterisk.org at sedwards.com
Sun Dec 20 10:40:06 CST 2009


On Sun, 20 Dec 2009, Magnus Benngård wrote:

> Did found a way to do it:
>
> exten => 975,1,ExecIf($[${DB_EXISTS(CFIM/0317998975)}]?Goto(${DB(CFIM/0317998975)},1)
> exten => 975,2,Goto(set-caller-id,s,1)
> exten => 975,3,Goto(975-${DEVICE_STATE(SIP/0317998975)},1)
> exten => 975-INUSE,1,VoiceMail(0317998975 at inputinterior.se,bs)

Not really paying attention to what you are doing, but hitting the 
database 3 times for the exact same query could probably be cleaned up 
with a channel variable.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000


More information about the asterisk-users mailing list