[Freeswitch-users] An easy way to test a list of numbers in condition?

Michael Collins msc at freeswitch.org
Wed Jul 13 03:39:37 MSD 2011


Well, the good news is that mod_lua comes pre-built, so you can always just
use it. :)
-MC

On Tue, Jul 12, 2011 at 3:40 PM, Mario G <mario_fs at mgtech.com> wrote:

> I was trying to avoid adding more software to OS X and having to learn new
> stuff just for a couple of groups of numbers... I tried many things and the
> best I could do was put them all on on line with a comment below for each
> name. Thanks.
>
> On Jul 12, 2011, at 3:12 PM, Avi Marcus wrote:
>
> A simple array check with lua, or a sql lookup with lua or mod_odbc_query
> from the git contrib would probably make this easy.
> -Avi
>
> On Wed, Jul 13, 2011 at 12:35 AM, Michael Collins <msc at freeswitch.org>wrote:
>
>> If you need to test this many numbers then you are better of with
>> something other than regular expressions. I would investigate mod_xml_curl
>> or mod_lcr. An alternative would be to write a small Lua script that checks
>> the destination_number against a list.
>>
>> -MC
>>
>> On Tue, Jul 12, 2011 at 12:31 PM, Mario G <mario_fs at mgtech.com> wrote:
>>
>>> I am trying to find an easy way to test multiple numbers in a condition
>>> without putting all the numbers on one line. There can be 25 numbers or
>>> more. Preferably have comments. I looked at many web sites on XML, etc. but
>>> could not find a way to continue lines. Freeswitch treats everything in the
>>> expression including all spaces as part of the expression. Anyone know of a
>>> good way to do this? Thanks,
>>> Mario G
>>>
>>>   <extension name="out.group1">
>>>     <condition field="${destination_number_w}" expression="^1111111111|
>>>             <!-- joe -->
>>>
>>> 2222222222|3333333333|  <!-- jon -->
>>>
>>> 4444444444|5555555555   <!-- pam -->
>>>
>>> $">
>>>       <action application="set" data="destination_number_w=1$1"/>
>>>       <action application="bridge" data="sofia/gateway/group1/1$1"/>
>>>     </condition>
>>>   </extension>
>>>
>>>
>>> _______________________________________________
>>> Join us at ClueCon 2011, Aug 9-11, Chicago
>>> http://www.cluecon.com 877-7-4ACLUE
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>>
>>
>> _______________________________________________
>> Join us at ClueCon 2011, Aug 9-11, Chicago
>> http://www.cluecon.com 877-7-4ACLUE
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110712/5e772b5a/attachment.html 


More information about the FreeSWITCH-users mailing list