On Wed, 2006-02-08 at 14:37 +0100, Arne Morten Johansen wrote:
>         Hi there.
>         
>          
>         
>         I currently have a GotoIf statement that goes to a special
>         extension priority if the CID match with one of the numbers in
>         my “list” of CIDs. The way I’ve done it now is by multiple OR
>         operators. There must be a better way. Anyone got some
>         suggestions? 
>         
>          
>         
>         This is basicly what I want.  “If CID Exists in $File, goto
>         s,10”. So when I want to add a new CID I just add a new line
>         in a txt file. 
>         
>          
>         
Or, maybe you can use the existence of a file rather then the content of
it?

exten => s,1,System(test -e /var/lib/asterisk/callerids/${CALLERID})
exten => s,2,NoOp("Normal caller")
exten => s,102,NoOp("special caller")

this way you can add callerids by simply
touch /var/lib/asterisk/callerids/<phonenumber>

does that help?

Conrad

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

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

Reply via email to