<div dir="ltr">Anyone on this?<br><br>thnx<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">David Villasmil</b> <<a href="mailto:david.villasmil.work@gmail.com">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>Cc: openser users <<a href="mailto:users@lists.openser.org">users@lists.openser.org</a>><br><br><br><div dir="ltr">
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> 18.965383 <a href="http://10.0.1.2" target="_blank">10.0.1.2</a> -> SERVER_1_IP SIP Request: REGISTER sip:<a href="http://sip99.yip.com" target="_blank">sip99.yip.com</a><br>
19.139214 SERVER_1_IP -> <a href="http://10.0.1.2" target="_blank">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> SIP Status: 401 Unauthorized (0 bindings)<br>
19.142207 <a href="http://10.0.1.2" target="_blank">10.0.1.2</a> -> SERVER_1_IP SIP Request: REGISTER sip:<a href="http://sip99.yip.com" target="_blank">sip99.yip.com</a><br> 19.321262 SERVER_1_IP -> <a href="http://10.0.1.2" target="_blank">10.0.1.2</a> SIP Status: 302 Redirect to SIP provider (0 bindings)<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><font color="#888888"><br>David</font><div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Thu, Jul 24, 2008 at 3:29 PM, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
There is a typo with reply function -- the name is sl_send_reply(...) in the sl module.<br>
<br>
Cheers,<br>
Daniel<div><br>
<br>
<br>
On 07/24/08 22:23, 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>
Iñaki,<br>
<br>
I tried redirecting with your syntax<br>
<br></div>
$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>>";<div><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 uac_redirect but that's not it.<br>
<br>
thanks<br>
<br>
David<br>
<br>
<br>
<br></div><div>
On Fri, Jun 20, 2008 at 6:00 PM, Iñaki Baz Castillo <<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>>> 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></div>
> 2008/6/20 Iñaki Baz Castillo <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><br>
> > AFAIK if a UAC is redirected it will not include the already used<br>
> > credentials<br>
> > in the new request to the new destination (maybe I'm 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 generates a<br>
completely<br>
new request with destination the URI of the "Contact" in 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 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 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 "Contact" header.<br>
<br>
<br>
> > In OpenSer to get a redirection you must set the RURI ($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></div></div>
<<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>>";<div><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></div>
<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><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><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><font color="#888888">
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
<br>
</font></blockquote></div><br></div></div></div>
</div><br></div>