<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:courier,monaco,monospace,sans-serif;font-size:12pt">ok how about this:<br><br>try rev 5207 and do everything I described before only in the <br>force-contact set it to nat-connectile-dysfunction<br><br>&lt;variable name="force-contact" value="nat-connectile-dysfunction"/&gt;<br><br>This will rewrite the host and ip of the contact to use the <br>ip and port the req was received from.&nbsp; To benefit&nbsp; from this feature, you will probably need to set the ata to constantly register to maintain this dynamic reverse mapping created by the nat routers.&nbsp; Most of them will destroy any mappings with inactivity after a certain period of time so you must make your reg freq more often that that time period whatever it may be.<br><br><br><div>&nbsp;</div><div>Anthony Minessale II<br><br><span>FreeSWITCH <a target="_blank"
 href="http://www.freeswitch.org/">http://www.freeswitch.org/</a></span><br><span>ClueCon <a target="_blank" href="http://www.cluecon.com/">http://www.cluecon.com/</a></span><br><br>AIM: anthm<br>MSN:anthony_minessale@hotmail.com<br>JABBER:anthony.minessale@gmail.com<br>IRC: irc.freenode.net #freeswitch</div><div><br>FreeSWITCH Developer Conference<br>sip:888@conference.freeswitch.org<br>iax:guest@conference.freeswitch.org/888<br>googletalk:conf+888@conference.freeswitch.org<br>pstn:213-799-1400</div><div style="font-family: courier,monaco,monospace,sans-serif; font-size: 12pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Dave &lt;lists+freeswitch@bigfatdave.com&gt;<br>To: freeswitch-users@lists.freeswitch.org<br>Sent: Monday, May 21, 2007 11:24:55 AM<br>Subject: Re: [Freeswitch-users] Strange Reg<br><br><div>Hi Anthony,<br><br>I assume that means we can change the topolgy to something like
 this:<br>ATA&lt;-&gt;NAT&lt;-&gt;Internet&lt;-&gt;FS1<br><br>Basically, what we're doing here is telling FS1 how to find ATA.<br>There are only two problems:<br>1) NAT is on DHCP.&nbsp;&nbsp;(I assume this can be worked around by using DynDNS<br>instead of an IP.)<br>2) As I discovered while looking for the mystery 10.0.0.221 IP, NAT is<br>actually two NATs, one behind the other, and I only have access to one<br>of them.<br><br>While you're at it, why don't you just make an option (&lt;variable<br>name='my-ata-sucks' value='true'/&gt;) to totally break RFCs and mimic<br>Asterisk's treatment? :-)<br><br>Thanks a bunch for all your help,<br> - Dave<br><br><br>On Mon, May 21, 2007 at 07:25:01AM -0700, Anthony Minessale wrote:<br>&gt; Hi,<br>&gt; <br>&gt; You sound like a good candidate for my new experimental force contact feature.<br>&gt; <br>&gt; For this to work you need to use the directory for auth instead of the blind reg mode.<br>&gt; <br>&gt; *) Edit sofia.conf.xml
 and comment the blind reg option.<br>&gt; *) Edit directory.xml and add a &lt;user&gt; tag to the &lt;domain name="$${domain}"&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;section making sure $${domain} is also the name of the domain portion of <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;the sip's client registration.<br>&gt; <br>&gt; edit the file to look something like this and put in a absolute contact to use when this user registers regardless of what he advertises.&nbsp;&nbsp;This means that if you are using nat you should setup a permenant port forwarding for whatver uri you mention.<br>&gt; <br>&gt; e.g.<br>&gt; <br>&gt; Assuming your public ip is 66.2.2.2 and your phone is 10.0.0.2<br>&gt; <br>&gt; add a rule to always port forward udp port 5555 of 66.2.2.2 to 10.0.0.2 5060<br>&gt; then edit the following so the contact uri is user@66.2.2.2:5555<br>&gt; <br>&gt; Whenever the phone registers with this user the specified contact will be added to the database instead of the real one this
 should make it possible for your phone to receive sip traffic even if it does not support STUN.<br>&gt; <br>&gt; &lt;domain name="$${domain}"&gt;<br>&gt;&nbsp;&nbsp; &lt;user id="myuser"&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;params&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param name="password" value="mypass"/&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/params&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;variables&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;variable name="force-contact" value="[TESTING] sip:myuser@66.2.2.2:5555"/&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/variables&gt;<br>&gt;&nbsp;&nbsp; &lt;/user&gt;<br>&gt; &lt;/domain&gt; <br>&gt;&nbsp;&nbsp;<br>&gt; Anthony Minessale II<br>&gt; <br>&gt; FreeSWITCH <a target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>&gt; ClueCon <a target="_blank" href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>&gt; <br>&gt; AIM: anthm<br>&gt;
 MSN:anthony_minessale@hotmail.com<br>&gt; JABBER:anthony.minessale@gmail.com<br>&gt; IRC: irc.freenode.net #freeswitch<br>&gt; <br>&gt; FreeSWITCH Developer Conference<br>&gt; sip:888@conference.freeswitch.org<br>&gt; iax:guest@conference.freeswitch.org/888<br>&gt; googletalk:conf+888@conference.freeswitch.org<br>&gt; pstn:213-799-1400<br>&gt; <br>&gt; <br>&gt; ----- Original Message ----<br>&gt; From: Dave &lt;lists+freeswitch@bigfatdave.com&gt;<br>&gt; To: FSwtch Usrs &lt;freeswitch-users@lists.freeswitch.org&gt;<br>&gt; Sent: Monday, May 21, 2007 2:20:53 AM<br>&gt; Subject: [Freeswitch-users] Strange Reg<br>&gt; <br>&gt; Hi guys,<br>&gt; <br>&gt; I've got a rather interesting situation, here.&nbsp;&nbsp;I've got an ATA<br>&gt; registering to a FreeSWITCH(TM) (FS2), both behind NAT.&nbsp;&nbsp;So far, so good.<br>&gt; Now, the FreeSWITCH(TM) registers to another FreeSWITCH(TM) outside the<br>&gt; NAT (FS2), and that's where the problems start.&nbsp;&nbsp;Here's the
 configuration:<br>&gt; <br>&gt; ATA&lt;-&gt;FS2&lt;-&gt;NAT&lt;-&gt;Internet&lt;-&gt;FS1<br>&gt; <br>&gt; ATA: 10.1.0.51 (behind NAT)<br>&gt; FS2: 10.1.0.30 (behind NAT)<br>&gt; FS1: freeswitch1.asnetinc.net (64.118.94.19)<br>&gt; <br>&gt; Now, here's where it gets very interesting.&nbsp;&nbsp;This is what FS1 gets when<br>&gt; FS2 registers:<br>&gt; &gt; From:&nbsp;&nbsp;&nbsp;&nbsp;[R352928@freeswitch1.asnetinc.net]<br>&gt; &gt; Contact: ["user" &lt;sip:R352928@10.0.0.221:39260&gt;]<br>&gt; &gt; Expires: [3600]<br>&gt; &gt; nta_agent: tport: Bad message<br>&gt; <br>&gt; Now, where on Earth did 10.0.0.221 come from???&nbsp;&nbsp;(I've actually hardcoded<br>&gt; both external_rtp_ip and server_name to the public IP of the NAT in the<br>&gt; FS2 config, but for some strange reason, FS2 apparently claims to be at<br>&gt; 10.0.0.221, which isn't even its local IP.)<br>&gt; <br>&gt; As if that's not interesting enough, I get this from FS1, too, when it<br>&gt; tries to connect
 to another SIP server on the public Internet:<br>&gt; &gt; outbound(0xb4e1e1a0): detected NAT: freeswitch1.asnetinc.net != 64.118.94.19<br>&gt; <br>&gt; Now, since a forward DNS resolution claims that the inequality is false, I<br>&gt; assume it attempted a reverse DNS lookup, which would fail (since my ISP<br>&gt; takes forever to update PTR records).<br>&gt; <br>&gt; As usual, any hints, tips, tricks, ideas, suggestions, flames, questions,<br>&gt; or (ideally) answers are greatly appreciated :-)<br>&gt; <br>&gt; Thank you,<br>&gt;&nbsp;&nbsp;- Dave<br>&gt; <br>&gt; _______________________________________________<br>&gt; Freeswitch-users mailing list<br>&gt; Freeswitch-users@lists.freeswitch.org<br>&gt; <a target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt; UNSUBSCRIBE:<a target="_blank"
 href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt; <a target="_blank" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&gt; ____________________________________________________________________________________Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. <br>&gt; <a target="_blank" href="http://answers.yahoo.com/dir/?link=list&amp;sid=396545433">http://answers.yahoo.com/dir/?link=list&amp;sid=396545433</a><br>&gt; _______________________________________________<br>&gt; Freeswitch-users mailing list<br>&gt; Freeswitch-users@lists.freeswitch.org<br>&gt; <a target="_blank"
 href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt; UNSUBSCRIBE:<a target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt; <a target="_blank" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br><br><br>_______________________________________________<br>Freeswitch-users mailing list<br>Freeswitch-users@lists.freeswitch.org<br><a target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a target="_blank" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></div></div><br></div></div><br>

<hr size=1>8:00? 8:25? 8:40? <a href="
http://tools.search.yahoo.com/shortcuts/?fr=oni_on_mail&#news"> Find a flick</a> in no time<br> with the<a href="
http://tools.search.yahoo.com/shortcuts/?fr=oni_on_mail&#news">Yahoo! Search movie showtime shortcut.</a></body></html>