<div dir="ltr">Thanks for replying, I still can&#39;t get it to work, my routing says:<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if($au=~&quot;^5.*&quot;){<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $ru = &quot;IP_OF_NEW_SERVER&quot;;<br>&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; sl_send_reply(&quot;302&quot;, &quot;Redirect to SIP provider&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; exit;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<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>&nbsp;18.965383&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://10.0.1.2">10.0.1.2</a> -&gt; SERVER_1_IP SIP Request: REGISTER sip:<a href="http://sip99.yip.com">sip99.yip.com</a><br>
&nbsp;19.139214 SERVER_1_IP -&gt; <a href="http://10.0.1.2">10.0.1.2</a>&nbsp;&nbsp;&nbsp;&nbsp; SIP Status: 100 Trying&nbsp;&nbsp;&nbsp; (0 bindings)<br>&nbsp;19.140477 SERVER_1_IP -&gt; <a href="http://10.0.1.2">10.0.1.2</a>&nbsp;&nbsp;&nbsp;&nbsp; SIP Status: 401 Unauthorized&nbsp;&nbsp;&nbsp; (0 bindings)<br>
&nbsp;19.142207&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://10.0.1.2">10.0.1.2</a> -&gt; SERVER_1_IP SIP Request: REGISTER sip:<a href="http://sip99.yip.com">sip99.yip.com</a><br>&nbsp;19.321262 SERVER_1_IP -&gt; <a href="http://10.0.1.2">10.0.1.2</a>&nbsp;&nbsp;&nbsp;&nbsp; SIP Status: 302 Redirect to SIP provider&nbsp;&nbsp;&nbsp; (0 bindings)<br>
<br>But I never see a REGISTER on my other box. I&#39;ve tried with Twinkle, SJPhone and Eyebeam... all of them show &quot;redirect&quot; when trying to register but I don&#39;t see them trying to register on the other box (NEW_SERVER)<br>
<br>thanks a lot!<br><br>David<br><br><div class="gmail_quote">On Thu, Jul 24, 2008 at 3:29 PM, Daniel-Constantin Mierla &lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt; 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 class="Ih2E3d"><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 class="Ih2E3d">
Iñaki,<br>
<br>
 &nbsp; &nbsp; I tried redirecting with your syntax<br>
<br></div>
$ru = &quot;<a href="http://sip.voipstunt.com" target="_blank">sip.voipstunt.com</a> &lt;<a href="http://sip.voipstunt.com/" target="_blank">http://sip.voipstunt.com/</a>&gt;&quot;;<div class="Ih2E3d"><br>
send_reply(&quot;302&quot;, &quot;Redirect to SIP provider&quot;);<br>
exit;<br>
<br>
but i get an erro<br>
&quot;unknown command, missing loadmodule?&quot;<br>
<br>
I can&#39;t figure out what module I should load, I tried uac_redirect but that&#39;s not it.<br>
<br>
thanks<br>
<br>
David<br>
<br>
<br>
<br></div><div class="Ih2E3d">
On Fri, Jun 20, 2008 at 6:00 PM, Iñaki Baz Castillo &lt;<a href="mailto:ibc@aliax.net" target="_blank">ibc@aliax.net</a> &lt;mailto:<a href="mailto:ibc@aliax.net" target="_blank">ibc@aliax.net</a>&gt;&gt; wrote:<br>
<br>
 &nbsp; &nbsp;El Viernes, 20 de Junio de 2008, Valerio Di Marino escribió:<br>
 &nbsp; &nbsp;&gt; Thanks for your answer.<br>
<br>
 &nbsp; &nbsp;Ok, but next time continue the thread in the maillist ;)<br>
<br>
<br></div>
 &nbsp; &nbsp;&gt; 2008/6/20 Iñaki Baz Castillo <a href="mailto:ibc@aliax.net" target="_blank">ibc@aliax.net</a> &lt;mailto:<a href="mailto:ibc@aliax.net" target="_blank">ibc@aliax.net</a>&gt;:<div><div></div><div class="Wj3C7c"><br>

 &nbsp; &nbsp;&gt; &gt; AFAIK if a UAC is redirected it will not include the already used<br>
 &nbsp; &nbsp;&gt; &gt; credentials<br>
 &nbsp; &nbsp;&gt; &gt; in the new request to the new destination (maybe I&#39;m wrong).<br>
 &nbsp; &nbsp;&gt;<br>
 &nbsp; &nbsp;&gt; Do you think is possible to force using the pseudovariables ?<br>
<br>
 &nbsp; &nbsp;No, it&#39;s not possible. When a UAAC receives a 302 it generates a<br>
 &nbsp; &nbsp;completely<br>
 &nbsp; &nbsp;new request with destination the URI of the &quot;Contact&quot; in the 302.<br>
<br>
<br>
 &nbsp; &nbsp;&gt; &gt; If you need solving NAT in your OpenSer then you need to<br>
 &nbsp; &nbsp;forward the<br>
 &nbsp; &nbsp;&gt; &gt; request<br>
 &nbsp; &nbsp;&gt; &gt; in it after make fix NAT.<br>
 &nbsp; &nbsp;&gt;<br>
 &nbsp; &nbsp;&gt; How ? Can explain better ?<br>
<br>
 &nbsp; &nbsp;If a UAC receives a 302 it will generate a new INVITE. If the UAC<br>
 &nbsp; &nbsp;has not<br>
 &nbsp; &nbsp;configured your OpenSer as outbound proxy, the new INVITE it<br>
 &nbsp; &nbsp;generates will<br>
 &nbsp; &nbsp;go directly to the SIP provider, so it&#39;s not possible your OpenSer<br>
 &nbsp; &nbsp;makes fix<br>
 &nbsp; &nbsp;the NAT (fix &quot;Contact&quot; and so).<br>
 &nbsp; &nbsp;But maybe your SIP provider makes fix the NAT by itself, or you<br>
 &nbsp; &nbsp;can try STUN<br>
 &nbsp; &nbsp;in your UAC&#39;s.<br>
<br>
<br>
 &nbsp; &nbsp;&gt; &gt; If not you could use forwarding or redirect.<br>
 &nbsp; &nbsp;&gt;<br>
 &nbsp; &nbsp;&gt; With redirect, openser will send an address and the uer will<br>
 &nbsp; &nbsp;contact the<br>
 &nbsp; &nbsp;&gt; new address: is it correct ? (I am not shure).<br>
<br>
 &nbsp; &nbsp;Yes, OpenSer replies a 302 with the new URI in the &quot;Contact&quot; header.<br>
<br>
<br>
 &nbsp; &nbsp;&gt; &gt; In OpenSer to get a redirection you must set the RURI ($ru =<br>
 &nbsp; &nbsp;...) and<br>
 &nbsp; &nbsp;&gt; &gt; reply a<br>
 &nbsp; &nbsp;&gt; &gt; 302 to the user.<br>
 &nbsp; &nbsp;&gt;<br>
 &nbsp; &nbsp;&gt; Can you send &nbsp;ma a routine syntax ?<br>
 &nbsp; &nbsp;&gt; For example, I would redirect to <a href="http://sip.voipstunt.com" target="_blank">sip.voipstunt.com</a><br></div></div>
 &nbsp; &nbsp;&lt;<a href="http://sip.voipstunt.com" target="_blank">http://sip.voipstunt.com</a>&gt;<br>
<br>
 &nbsp; &nbsp;Something like:<br>
<br>
 &nbsp; &nbsp;$ru = &quot;<a href="http://sip.voipstunt.com" target="_blank">sip.voipstunt.com</a> &lt;<a href="http://sip.voipstunt.com" target="_blank">http://sip.voipstunt.com</a>&gt;&quot;;<div class="Ih2E3d"><br>
 &nbsp; &nbsp;send_reply(&quot;302&quot;, &quot;Redirect to SIP provider&quot;);<br>
 &nbsp; &nbsp;exit;<br>
<br>
<br>
<br>
<br>
 &nbsp; &nbsp;--<br>
 &nbsp; &nbsp;Iñaki Baz Castillo<br>
<br>
 &nbsp; &nbsp;_______________________________________________<br>
 &nbsp; &nbsp;Users mailing list<br></div>
 &nbsp; &nbsp;<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a> &lt;mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a>&gt;<div class="Ih2E3d"><br>
 &nbsp; &nbsp;<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"><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>
 &nbsp;<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>