[OpenSER-Users] About openser redirect - forward
Daniel-Constantin Mierla
miconda at gmail.com
Fri Jul 25 09:52:40 CEST 2008
$ru takes an URI as value, try:
$ru = "sip:IP_OF_NEW_SERVER";
Then, as you can see, the redirect from openser happens, there is a 302
sent to the network. It is the job of uac to handle the sip reply
properly and send to the new address.
Cheers,
Daniel
On 07/25/08 10:43, David Villasmil wrote:
> Anyone on this?
>
> thnx
>
> ---------- Forwarded message ----------
> From: *David Villasmil* <david.villasmil.work at gmail.com
> <mailto:david.villasmil.work at gmail.com>>
> Date: Thu, Jul 24, 2008 at 4:36 PM
> Subject: Re: [OpenSER-Users] About openser redirect - forward
> To:
> Cc: openser users <users at lists.openser.org
> <mailto:users at lists.openser.org>>
>
>
> Thanks for replying, I still can't get it to work, my routing says:
>
> if($au=~"^5.*"){
> $ru = "IP_OF_NEW_SERVER";
> sl_send_reply("302", "Redirect to SIP provider");
> exit;
> }
>
> I want all customers with numbers starting with 5 to register and call
> through another server completely... I see this in my box:
>
> 18.965383 10.0.1.2 <http://10.0.1.2> -> SERVER_1_IP SIP Request:
> REGISTER sip:sip99.yip.com <http://sip99.yip.com>
> 19.139214 SERVER_1_IP -> 10.0.1.2 <http://10.0.1.2> SIP Status:
> 100 Trying (0 bindings)
> 19.140477 SERVER_1_IP -> 10.0.1.2 <http://10.0.1.2> SIP Status:
> 401 Unauthorized (0 bindings)
> 19.142207 10.0.1.2 <http://10.0.1.2> -> SERVER_1_IP SIP Request:
> REGISTER sip:sip99.yip.com <http://sip99.yip.com>
> 19.321262 SERVER_1_IP -> 10.0.1.2 <http://10.0.1.2> SIP Status:
> 302 Redirect to SIP provider (0 bindings)
>
> But I never see a REGISTER on my other box. I've tried with Twinkle,
> SJPhone and Eyebeam... all of them show "redirect" when trying to
> register but I don't see them trying to register on the other box
> (NEW_SERVER)
>
> thanks a lot!
>
> David
>
>
> On Thu, Jul 24, 2008 at 3:29 PM, Daniel-Constantin Mierla
> <miconda at gmail.com <mailto:miconda at gmail.com>> wrote:
>
> There is a typo with reply function -- the name is
> sl_send_reply(...) in the sl module.
>
> Cheers,
> Daniel
>
>
>
> On 07/24/08 22:23, David Villasmil wrote:
>
> Iñaki,
>
> I tried redirecting with your syntax
>
> $ru = "sip.voipstunt.com <http://sip.voipstunt.com>
> <http://sip.voipstunt.com/>";
>
> send_reply("302", "Redirect to SIP provider");
> exit;
>
> but i get an erro
> "unknown command, missing loadmodule?"
>
> I can't figure out what module I should load, I tried
> uac_redirect but that's not it.
>
> thanks
>
> David
>
>
>
> On Fri, Jun 20, 2008 at 6:00 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 Viernes, 20 de Junio de 2008, Valerio Di Marino escribió:
> > Thanks for your answer.
>
> Ok, but next time continue the thread in the maillist ;)
>
>
> > 2008/6/20 Iñaki Baz Castillo ibc at aliax.net
> <mailto:ibc at aliax.net> <mailto:ibc at aliax.net
> <mailto:ibc at aliax.net>>:
>
> > > AFAIK if a UAC is redirected it will not include the
> already used
> > > credentials
> > > in the new request to the new destination (maybe I'm
> wrong).
> >
> > Do you think is possible to force using the pseudovariables ?
>
> No, it's not possible. When a UAAC receives a 302 it
> generates a
> completely
> new request with destination the URI of the "Contact" in
> the 302.
>
>
> > > If you need solving NAT in your OpenSer then you need to
> forward the
> > > request
> > > in it after make fix NAT.
> >
> > How ? Can explain better ?
>
> If a UAC receives a 302 it will generate a new INVITE. If
> the UAC
> has not
> configured your OpenSer as outbound proxy, the new INVITE it
> generates will
> go directly to the SIP provider, so it's not possible your
> OpenSer
> makes fix
> the NAT (fix "Contact" and so).
> But maybe your SIP provider makes fix the NAT by itself, or you
> can try STUN
> in your UAC's.
>
>
> > > If not you could use forwarding or redirect.
> >
> > With redirect, openser will send an address and the uer will
> contact the
> > new address: is it correct ? (I am not shure).
>
> Yes, OpenSer replies a 302 with the new URI in the
> "Contact" header.
>
>
> > > In OpenSer to get a redirection you must set the RURI
> ($ru =
> ...) and
> > > reply a
> > > 302 to the user.
> >
> > Can you send ma a routine syntax ?
> > For example, I would redirect to sip.voipstunt.com
> <http://sip.voipstunt.com>
> <http://sip.voipstunt.com>
>
> Something like:
>
> $ru = "sip.voipstunt.com <http://sip.voipstunt.com>
> <http://sip.voipstunt.com>";
>
> send_reply("302", "Redirect to SIP provider");
> exit;
>
>
>
>
> --
> 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
>
>
>
> --
> Daniel-Constantin Mierla
> http://www.asipto.com
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>
--
Daniel-Constantin Mierla
http://www.asipto.com
More information about the sr-users
mailing list