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([email protected],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       [email protected]      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to