[OpenSIPS-Users] Dispatcher module with multiple groups

Diego Barberio diego.barberio at redmondsoftware.com
Thu May 31 20:59:05 CEST 2012


Hi All,

 

I'm using dispatcher module to forward incoming INVITEs to two destination
groups.

I have a set of 8 telephone numbers, if the call goes or comes from any of
that numbers I have to send the call to a group otherwise to the other.
Right now I'm doing this to select the group:

 

if($rU=~ '^*40109615*' || $rU=~ '^*40109541*' || $rU=~ '^*40285849*' ||
$rU=~ '^*40284592*' || $rU=~ '^*40117817*' || $rU=~ '^*40117830*' || $rU=~
'^*40489340*' || $rU=~ '^*40489455*' || $fU= ~ '^*40109615*' || $fU=~
'^*40109541*' || $fU=~ '^*40285849*' || $fU=~ '^*40284592*' || $fU=~
'^*40117817*' || $fU=~ '^*40117830*' || $fU=~ '^*40489340*' || $fU=~
'^*40489455*' ){

ds_select_dst("2", "4");

}else{

               ds_select_dst("1", "4");

}

 

Is there any better way to do this, I mean something like:

if(is_in_file($fU, 'numbers.txt') || is_in_file($rU, 'numbers.txt'))

 

Of course any option will be welcome, however it would be very nice if
there's an option which allows me to modify the numbers list without
restarting opensips.

 

Thanks a lot

Diego

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120531/96cb64de/attachment.htm>


More information about the Users mailing list