Hi,<div><br></div><div>Thanks Daniel. It work like charm :)</div><div><br>Cheers,</div><div><br><br><div class="gmail_quote">On Thu, Sep 8, 2011 at 10:22 PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#FFFFFF" text="#000000">
Hello,<div class="im"><br>
<br>
On 9/8/11 3:12 AM, MingHon wrote:
<blockquote type="cite">Hi,
<div><br>
</div>
<div>Sorry, let me explain my situation.</div>
<div><br>
</div>
<div>my box is behind nat with private ip 192.168.2.3 and nat ip
is 60.x.x.x</div>
<div><br>
</div>
<div>and asterisk is same nat as the box with private ip
192.168.2.23</div>
<div><br>
</div>
<div>now let say i got 2 UA. one UA is located on different nat
and another UA is same nat with the box.</div>
<div><br>
</div>
<div>UA1- private ip 10.10.10.123 and nat ip is 60.y.y.y</div>
<div>UA2- private ip 192.168.2.100 and nat ip is 60.x.x.x</div>
<div><br>
</div>
<div>with advertised_address = 60.x.x.x</div>
<div>UA1 successfully register.</div>
<div>UA2 registration fail. because when box send option method,
UA2 reply 200OK to 60.x.x.x</div>
<div><br>
</div>
<div>is there anyway to rewrite the via header when sending to UA2
?<br>
</div>
</blockquote></div>
then maybe is better to use set_advertise_address based on source
IP, not only as global option:<br>
<br>
<a href="http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.1.x#set_advertised_address" target="_blank">http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.1.x#set_advertised_address</a><br>
<br>
So depending who is sending the request, you set the right
advertised address per request.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote type="cite"><div class="im">
<div>
<br>
</div>
<div>Thanks and Regards,</div>
<div><br>
</div>
<div>MingHon</div>
<div><br>
<div class="gmail_quote">On Wed, Sep 7, 2011 at 4:40 PM,
Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hello,
<div>
<div><br>
<br>
On 9/6/11 8:53 AM, MingHon wrote:
<blockquote type="cite">Hello List,
<div><br>
</div>
<div>Can i have UA in the same nat with the box and
also UA in different nat at the same time?</div>
<div><br>
</div>
<div>My box is currrently working behind nat with ip
192.168.2.3 and advertised_address is set to <a href="http://sip.mydomain.com" target="_blank">sip.mydomain.com</a></div>
<div><br>
</div>
<div>is it possible to append the via header replace
the <a href="http://sip.mydomain.com" target="_blank">sip.mydomain.com</a>
to 192.168.2.3 ?</div>
</blockquote>
</div>
</div>
not sure I understand what you want to achieve. First you
say that you want advertised address to be <a href="http://sip.mydomain.com" target="_blank">sip.mydomain.com</a> but then you want
it to be 192.168.2.3, which would be if you don't set
advertised address parameter.<br>
<br>
Cheers,<br>
Daniel<br>
<font color="#888888">
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
Kamailio Advanced Training, Oct 10-13, Berlin: <a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a>
<a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a></pre>
</font></div>
</blockquote>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote><div class="im">
<br>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
Kamailio Advanced Training, Oct 10-13, Berlin: <a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a>
<a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a></pre>
</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<br><br>MingHon<br>
</div>