[Users] Forward requests based on userid

Ovidiu Sas osas at somanetworks.com
Wed Feb 1 20:02:06 CET 2006


Hi Ben,

You can use the lcr module.


regards,
-ovi

On Wed, 1 Feb 2006, Mouncif Benziane wrote:

> Hi folks,
>
>
> I wanted to route sip requests based on user id with
> it's appropriate Gateway IP address which is stored in
> Mysql database , is this possible?
>
> Database structure:
>
> userid,gateway
> 617978XXX  64.80.XXX.XXX
> 78189XXXX  64.100.XXX.XXXX
>
>
> example: if someone call 617978XXX he will be routed
> to  it's approriate gateway
>
>
> at present I am using static route like:
>
>   if (uri=~"^sip:617978XXX@") {
> rewritehost("64.80.XXX.XXX");
> }
>
>  if (uri=~"^sip:78189XXXX@") {
> rewritehost("664.100.XXX.XXXX");
> }
>
> etc,....
>
>
>
> I am afraid the config file gonna get larger if I add
> more than 500 users(DIDs), I am looking for an
> alternative to store DID numbers in database (Mysql or
> text) and
> route them accordingly with the appropriate Gateway
> address.
>
>
> Thank you so much and I will appreciate if you can
> help me out!
>
> Ben
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
>




More information about the sr-users mailing list