[OpenSER-Users] Relaying to outbound proxy
Andreas Granig
agranig at sipwise.com
Mon Mar 17 21:40:50 CET 2008
Adrian,
I see. So on the proxy where you call add_path_received(), you don't
send out the request again but just call save() then? For such a
scenario it unfortunately doesn't work.
Andreas
Adrian A wrote:
> Hi Andreas,
>
> I have set the configuration as you mentioned below but it does not seem
> to help. Let me give you some more details about what I'm trying to
> accomplish.
>
> In my setup, there are 2 proxies: Proxy A and Proxy B. Depending on the
> physical location, some users register to Proxy A and some to Proxy B.
> The openser database is shared between the two proxies.
>
> Here is the call scenario that I'm looking to get working:
>
> 1. User Bob registers to Proxy A with a particular NAT binding
> 2. External call comes in to Proxy B for user Bob.
> 3. Proxy B tries to contact Bob at the location from the usrloc table
> but because the NAT binding does not know anything about Proxy B's IP,
> the request is not passed trough.
>
> What I need is for Proxy B to send the request to Proxy A so this can
> then relay to client.
>
> I have added the modparam settings on both proxies (since both can act
> as both outbound proxies and registrar for different users) and added
> inside the route:
>
> ...
> If (uri == myself) {
> ...
> If (is_method("REGISTER")) {
> add_path_received();
> ...
>
> I would have expected that this would add something to the 'path' value
> in the location table, but this is still NULL after user registers.
>
> Thanks,
> Adrian
>
>
> On Mon, Mar 17, 2008 at 7:57 AM, Andreas Granig <agranig at sipwise.com
> <mailto:agranig at sipwise.com>> wrote:
>
> Hi Adrian,
>
> I wrote the path module for exactly the scenario you describe here, so
> it should work for you as well :)
>
> So, on your outbound proxy you have to set:
>
> loadmodule "path.so"
> modparam("path", "use_received", 1)
>
> As well as something like the following in your routes:
>
> if(method=="REGISTER") { add_path_received(); }
>
> An on your registrar/proxy, you have to set:
>
> modparam("registrar", "use_path", 1)
> modparam("registrar", "path_mode", 0)
> modparam("registrar", "path_use_received", 1)
>
> Cheers,
> Andreas
>
>
>
> Adrian A wrote:
> > Does anyone know how to use the Path functions or has an alternative
> > method of solving this issue with multiple proxies?
> >
> > Thanks in advance.
> >
> >
> > On Sat, Mar 15, 2008 at 7:45 PM, Iñaki Baz Castillo
> <ibc at aliax.net <mailto:ibc at aliax.net>
> > <mailto:ibc at aliax.net <mailto:ibc at aliax.net>>> wrote:
> >
> > El Domingo, 16 de Marzo de 2008, Adrian A escribió:
> > > I've looked over the RFC and the module and while they
> describe a
> > slightly
> > > different scenario (with a load balancer and separate
> > registrars), it seems
> > > like it should work.
> > >
> > > I've added the required parameters to the config:
> > >
> > > modparam("registrar", "use_path", 1)
> > > modparam("registrar", "path_mode", 0)
> > > modparam("registrar", "path_use_received", 1)
> > > modparam("path", "use_received", 1)
> > >
> > > Then, in my auth section, I store the path:
> > >
> > > if (is_method("REGISTER")) {
> > > add_path();
> > >
> > > This does not seem to do anything however, the proxy still
> forwards
> > > directly to the client instead of sending it to the proper
> > outbound proxy.
> > > I looked in the location table and I see path is set to
> NULL so
> > unless this
> > > is stored in some other place, the proxy would not know
> where to
> > send it
> > > anyway.
> > >
> > > Have you used this? Am I doing something wrong? I could
> not find
> > on this
> > > list or anywhere a sample openser config that uses it...
> >
> > Sorry, I've not used it, but I'm 100% sure that it's what you
> need.
> >
> >
> > --
> > Iñaki Baz Castillo
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.openser.org <mailto:Users at lists.openser.org>
> <mailto:Users at lists.openser.org <mailto:Users at lists.openser.org>>
> > http://lists.openser.org/cgi-bin/mailman/listinfo/users
> >
> >
> >
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.openser.org <mailto:Users at lists.openser.org>
> > http://lists.openser.org/cgi-bin/mailman/listinfo/users
>
>
More information about the Users
mailing list