[OpenSIPS-Users] Dialplan module and matching numbers

SamyGo govoiper at gmail.com
Thu Apr 5 07:25:29 CEST 2012


Hey,

I think using this would help

if( $tU =~ "1234567890")
{
   $avp(gid) = 1;
}else if( $tU =~ " 9876543210  "){
    $avp(gid) = 2;
}
if (!load_balance("$avp(gid)","transc;pstn")) {
     sl_send_reply("500","Service full");
     exit;
}

engage load-balancer<http://www.opensips.org/Resources/DocsTutLoadbalancing>to
use $avp(gid) where group_id=1/2 contains pool of servers serving your
required destination number!

I hope this helped.


BR,
Sammy.


On Thu, Apr 5, 2012 at 12:02 AM, Ali Pey <alipey at gmail.com> wrote:

> Hello,
>
> I need to match some destination numbers to specific servers. For instance
> if the call is to 1234567890 go to server 1 and if it is to 9876543210 go
> to server 2, etc.
>
> The purpose is to look up some numbers or patterns and then route to
> specific servers and use the load balancer module for any other numbers.
>
> Can I use the dial plan module to lookup the destinations?
>
> I don't understand the dpid. Do I need a dpid for each number? Can all my
> rows have the same dpid?
> How can I do one look up to see if the dialed number is in the dialplan
> table? It can be hundreds of numbers.
>
> Regards,
> Ali
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120405/fcfc24e3/attachment.htm>


More information about the Users mailing list