drounting

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

drounting

David Villasmil
Hello,

     I've been testing drouting, and as always with "new" modules, it works great. I've got a question: dr_groups has a "username" and "domain" field, it is my understanding that if I leave username blank and put something on domain, everything directed to that domain will be routed using the group id.

Now, lets say I want to route based on a source IP instead of username? Say the source IP is NOT registered... what then?

Cheers to all

David

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Fwd: drounting

David Villasmil

sorry to repeat myself, but anyone on this?
 
d
---------- Forwarded message ----------
From: David Villasmil <[hidden email]>
Date: Fri, Nov 14, 2008 at 12:29 AM
Subject: drounting
To: "[hidden email]" <[hidden email]>


Hello,

     I've been testing drouting, and as always with "new" modules, it works great. I've got a question: dr_groups has a "username" and "domain" field, it is my understanding that if I leave username blank and put something on domain, everything directed to that domain will be routed using the group id.

Now, lets say I want to route based on a source IP instead of username? Say the source IP is NOT registered... what then?

Cheers to all

David


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: drounting

Jesus Rodriguez
In reply to this post by David Villasmil
Hello,



>      I've been testing drouting, and as always with "new" modules,  
> it works great. I've got a question: dr_groups has a "username" and  
> "domain" field, it is my understanding that if I leave username  
> blank and put something on domain, everything directed to that  
> domain will be routed using the group id.


Never tried.



> Now, lets say I want to route based on a source IP instead of  
> username? Say the source IP is NOT registered... what then?


Use an AVP... but what means that source ip is not registered?.


Saludos
JesusR.

------------------------------------
Jesus Rodriguez
VozTelecom Sistemas, S.L.
[hidden email]
http://www.voztele.com
Tel. 902360305
-------------------------------------





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: drounting

David Villasmil
THanks for answering, what do you mean an AVP?

THe caller is not registered on opensips, so I want to authorized based on IP.

david

On Fri, Nov 14, 2008 at 8:22 PM, Jesus Rodriguez <[hidden email]> wrote:
Hello,



    I've been testing drouting, and as always with "new" modules, it works great. I've got a question: dr_groups has a "username" and "domain" field, it is my understanding that if I leave username blank and put something on domain, everything directed to that domain will be routed using the group id.


Never tried.




Now, lets say I want to route based on a source IP instead of username? Say the source IP is NOT registered... what then?


Use an AVP... but what means that source ip is not registered?.


Saludos
JesusR.

------------------------------------
Jesus Rodriguez
VozTelecom Sistemas, S.L.
[hidden email]
http://www.voztele.com
Tel. 902360305
-------------------------------------






_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: drounting

Bogdan-Andrei Iancu
In reply to this post by David Villasmil
Hi David,

David Villasmil wrote:
> Hello,
>
>      I've been testing drouting, and as always with "new" modules, it
> works great. I've got a question: dr_groups has a "username" and
> "domain" field, it is my understanding that if I leave username blank
> and put something on domain, everything directed to that domain will
> be routed using the group id.
No, the username cannot mis - The table is to be used when you want to
do a per user mapping of group ids.

For you case (per domain mapping), you can do it without the table,
directly from script:
    if ($rd=="my_domain")
       $avp(i:10) = "1";  #use group 1
    else ......
    ......
    do_routing("$avp(i:10)");
>
> Now, lets say I want to route based on a source IP instead of
> username? Say the source IP is NOT registered... what then?
you can compute the group id based on whatever information you need,
from the script, and than pass it directly to the DR routing function.

Regards,
bogdan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: drounting

David Villasmil
Thank Bogdan,

     I did it with an avp query :S

     When routing is done, it seems to that routing ro the gwlist (comma separated) is done as load balance... is this correct?
     On the other hand, I tried creating two rules, one higher than the other. The first rule went to a failing GW... failover was not being done. I'm sure I've done something wrong. I have no failover routes as on the doc it says it is done automatically... Is this right?


thanks

David




On Mon, Nov 17, 2008 at 9:49 AM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi David,


David Villasmil wrote:
Hello,

    I've been testing drouting, and as always with "new" modules, it works great. I've got a question: dr_groups has a "username" and "domain" field, it is my understanding that if I leave username blank and put something on domain, everything directed to that domain will be routed using the group id.
No, the username cannot mis - The table is to be used when you want to do a per user mapping of group ids.

For you case (per domain mapping), you can do it without the table, directly from script:
  if ($rd=="my_domain")
     $avp(i:10) = "1";  #use group 1
  else ......
  ......
  do_routing("$avp(i:10)");


Now, lets say I want to route based on a source IP instead of username? Say the source IP is NOT registered... what then?
you can compute the group id based on whatever information you need, from the script, and than pass it directly to the DR routing function.

Regards,
bogdan


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users