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