[asterisk-users] A way to check against a list of numbers?

Faisal Hanif faisal at vopium.com
Sat Sep 11 07:06:05 CDT 2010


  Hi,

An intelligent way is to maintain numbers list in any Database (could be 
SQlite if you don't want to use proper DB engine) then use ODBC-Function 
if the number is there and decide routing.

2nd option is to use Perl AGI with DBI::CSV and manage numbers list in a 
CSV file.

Regards,

Faisal Hanif

On 9/11/2010 4:47 PM, Olivier wrote:
>
>
> 2010/9/10 Hose <hose+asterisk at bluemaggottowel.com 
> <mailto:hose%2Basterisk at bluemaggottowel.com>>
>
>     Does anyone have a suggestion on how to handle this?  For example,
>     if I
>     have a list of numbers that I want to go out a certain sip channel and
>     another that I want to go out the dahdi device, is there a way to do
>     this?  None of the numbers will fit into a pattern, so just plain
>     pattern matching won't do.
>
>     The most straightforward way would be to just define explicit
>     patterns.
>     Obviously that works, but doesn't seem scalable in terms of
>     maintenance.
>     Ideally there should be a variable or list of numbers, 
>
>
> How many numbers do you plan ?
>
>     and the dialplan
>     logic jumps into a subroutine that checks if the dialed number is
>     on the
>     list, then routes accordingly.  Does anyone have any suggestions as to
>     how to approach that, or if they have a entirely different way in
>     mind?
>
>     hose
>
>     --
>     _____________________________________________________________________
>     -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>     New to Asterisk? Join us for a live introductory webinar every Thurs:
>     http://www.asterisk.org/hello
>
>     asterisk-users mailing list
>     To UNSUBSCRIBE or update options visit:
>     http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100911/04326b1a/attachment.htm 


More information about the asterisk-users mailing list