<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:courier,monaco,monospace,sans-serif;font-size:12pt">You need to make sure you setup the user directory correctly.<br><br><span><a target="_blank" href="http://wiki.freeswitch.org/wiki/FreeSwitch_XML_User_Directory_Guide">http://wiki.freeswitch.org/wiki/FreeSwitch_XML_User_Directory_Guide</a></span><br><br><br>My earlier email provided a precise example and warnings about making sure the tags etc match up.<br><br>When you setup the <domain> tag in the directory <br>you must make sure there is a domain tag that has the same name as the host portion of the to: header in the register.<br><br>Using forensics from your traces here is the exact domain tag to use<br>in directory.xml with 1 caveat:<br><br>-----------------------------------------------------------------------<br>**replace the string 1234 with the password you specified in the
ata**<br>-----------------------------------------------------------------------<br><br>*NOTE*<br>normally $${domain} would be ok here as the name <br>assuming that the domain variable is set in freeswitch.xml <br>but I put the exact domain name to avoid confusion.<br><br>*ALSO NOTE*<br>You can comment the password param if you want it to<br>accept any password for this user.<br><br><domain name="freeswitch1.asnetinc.net"><br> <user id="homebase"><br> <params><br> <param name="password" value="1234"/><br> </params><br> <variables><br> <variable name="force-contact" value="nat-connectile-dysfunction"/><br> </variables><br> </user><br></domain> <br><br>I ask that if you get this working you please document this on our wiki in exchange for this exhaustive description of what
you need to do.<br><br><div> </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 <lists+freeswitch@bigfatdave.com><br>To: freeswitch-users@lists.freeswitch.org<br>Sent: Monday, May 21, 2007 6:49:00 PM<br>Subject: Re: [Freeswitch-users]
Strange Reg<br><br><div>Okay, I tried:<br><br>recv 434 bytes from udp/[67.80.171.57]:48406 at 23:41:21.754015:<br> ------------------------------------------------------------------------<br> REGISTER sip:freeswitch1.asnetinc.net SIP/2.0<br> From: <sip:homebase@freeswitch1.asnetinc.net>;tag=a010033-13c4-108-40e02-46ec<br> To: <sip:homebase@freeswitch1.asnetinc.net><br> Call-ID: a010033-13c4-108-40dfd-133e<br> CSeq: 1 REGISTER<br> Via: SIP/2.0/UDP 10.0.0.221:48406;branch=z9hG4bK-108-40e02-4ab5<br> Max-Forwards: 70<br> Supported: replaces<br> User-Agent: FXSO_GW<br> Contact: <sip:homebase@10.0.0.221:48406>;q=0.5<br> Expires: 60<br> Content-Length: 0<br><br> ------------------------------------------------------------------------<br>2007-05-21 23:41:21 [DEBUG] sofia_reg.c:387
sofia_reg_handle_register() Requesti<br>ng Registration from: [homebase@freeswitch1.asnetinc.net]<br><br>...and it responds with:<br><br>send 640 bytes to udp/[67.80.171.57]:48406 at 23:41:21.840657:<br> ------------------------------------------------------------------------<br> SIP/2.0 401 Unauthorized<br> Via: SIP/2.0/UDP 10.0.0.221:48406;branch=z9hG4bK-108-40e02-4ab5;received=67.8<br>0.171.57<br> From: <sip:homebase@freeswitch1.asnetinc.net>;tag=a010033-13c4-108-40e02-46ec<br> To: <sip:homebase@freeswitch1.asnetinc.net>;tag=e1arjB5HrFcHF<br> Call-ID: a010033-13c4-108-40dfd-133e<br> CSeq: 1 REGISTER<br> User-Agent: FreeSWITCH(mod_sofia)<br> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY,<br>REFER, UPDATE, REGISTER, INFO<br> Supported: 100rel, precondition<br> WWW-Authenticate: Digest
realm="freeswitch1.asnetinc.net", nonce="119b66e2-04<br>43-49a9-980f-d5b150274ff6", algorithm=MD5, qop="auth"<br> Content-Length: 0<br><br> ------------------------------------------------------------------------<br><br>Any ideas as to what's wrong here?<br><br>Thanks,<br> - Dave<br><br><br>On Mon, May 21, 2007 at 12:17:12PM -0700, Anthony Minessale wrote:<br>> 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>> <variable name="force-contact" value="nat-connectile-dysfunction"/><br>> <br>> This will rewrite the host and ip of the contact to use the <br>> ip and port the req was received from. To benefit 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. 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>> <br>> Anthony Minessale II<br>> <br>> FreeSWITCH <a target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>> ClueCon <a target="_blank" href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>> <br>> AIM: anthm<br>> MSN:anthony_minessale@hotmail.com<br>> JABBER:anthony.minessale@gmail.com<br>> IRC: irc.freenode.net #freeswitch<br>> <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<br>> <br>> <br>> ----- Original Message ----<br>> From: Dave <lists+freeswitch@bigfatdave.com><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>> Hi Anthony,<br>> <br>> I assume that means we can change the topolgy to something like this:<br>> ATA<->NAT<->Internet<->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. (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 (<variable<br>> name='my-ata-sucks' value='true'/>) 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>> > Hi,<br>> > <br>> > You sound like a good candidate for my new experimental force contact feature.<br>> > <br>> > For this to work you need to use the directory for auth instead of the blind reg mode.<br>> > <br>> > *) Edit sofia.conf.xml and comment the blind reg option.<br>> > *) Edit directory.xml and add a <user> tag to the <domain name="$${domain}"><br>> > section making sure $${domain} is also the name of the domain portion of <br>> > the sip's client registration.<br>> > <br>> > 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. This means that if you are using nat you should setup a permenant port forwarding for whatver uri you mention.<br>> > <br>> > e.g.<br>> > <br>> > Assuming your
public ip is 66.2.2.2 and your phone is 10.0.0.2<br>> > <br>> > add a rule to always port forward udp port 5555 of 66.2.2.2 to 10.0.0.2 5060<br>> > then edit the following so the contact uri is user@66.2.2.2:5555<br>> > <br>> > 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>> > <br>> > <domain name="$${domain}"><br>> > <user id="myuser"><br>> > <params><br>> > <param name="password" value="mypass"/><br>> > </params><br>> > <variables><br>> > <variable name="force-contact" value="[TESTING] sip:myuser@66.2.2.2:5555"/><br>>
> </variables><br>> > </user><br>> > </domain> <br>> > <br>> > Anthony Minessale II<br>> > <br>> > FreeSWITCH <a target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>> > ClueCon <a target="_blank" href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>> > <br>> > AIM: anthm<br>> > MSN:anthony_minessale@hotmail.com<br>> > JABBER:anthony.minessale@gmail.com<br>> > IRC: irc.freenode.net #freeswitch<br>> > <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<br>> > <br>> > <br>> > ----- Original Message ----<br>> > From: Dave <lists+freeswitch@bigfatdave.com><br>> > To: FSwtch Usrs
<freeswitch-users@lists.freeswitch.org><br>> > Sent: Monday, May 21, 2007 2:20:53 AM<br>> > Subject: [Freeswitch-users] Strange Reg<br>> > <br>> > Hi guys,<br>> > <br>> > I've got a rather interesting situation, here. I've got an ATA<br>> > registering to a FreeSWITCH(TM) (FS2), both behind NAT. So far, so good.<br>> > Now, the FreeSWITCH(TM) registers to another FreeSWITCH(TM) outside the<br>> > NAT (FS2), and that's where the problems start. Here's the configuration:<br>> > <br>> > ATA<->FS2<->NAT<->Internet<->FS1<br>> > <br>> > ATA: 10.1.0.51 (behind NAT)<br>> > FS2: 10.1.0.30 (behind NAT)<br>> > FS1: freeswitch1.asnetinc.net (64.118.94.19)<br>> > <br>> > Now, here's where it gets very interesting. This is what FS1 gets when<br>> > FS2 registers:<br>> > >
From: [R352928@freeswitch1.asnetinc.net]<br>> > > Contact: ["user" <sip:R352928@10.0.0.221:39260>]<br>> > > Expires: [3600]<br>> > > nta_agent: tport: Bad message<br>> > <br>> > Now, where on Earth did 10.0.0.221 come from??? (I've actually hardcoded<br>> > both external_rtp_ip and server_name to the public IP of the NAT in the<br>> > FS2 config, but for some strange reason, FS2 apparently claims to be at<br>> > 10.0.0.221, which isn't even its local IP.)<br>> > <br>> > As if that's not interesting enough, I get this from FS1, too, when it<br>> > tries to connect to another SIP server on the public Internet:<br>> > > outbound(0xb4e1e1a0): detected NAT: freeswitch1.asnetinc.net != 64.118.94.19<br>> > <br>> > Now, since a forward DNS resolution claims that the inequality is false, I<br>> > assume it attempted a reverse DNS lookup,
which would fail (since my ISP<br>> > takes forever to update PTR records).<br>> > <br>> > As usual, any hints, tips, tricks, ideas, suggestions, flames, questions,<br>> > or (ideally) answers are greatly appreciated :-)<br>> > <br>> > Thank you,<br>> > - Dave<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>> > <br>> > <br>> > <br>> > <br>>
> <br>> > <br>> > <br>> > <br>> > ____________________________________________________________________________________Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. <br>> > <a target="_blank" href="http://answers.yahoo.com/dir/?link=list&sid=396545433">http://answers.yahoo.com/dir/?link=list&sid=396545433</a><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>> <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>> <br>> <br>> <br>> <br>> <br>> <br>> <br>> <br>> <br>> ____________________________________________________________________________________<br>> Need Mail bonding?<br>> Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.<br>> <a target="_blank"
href="http://answers.yahoo.com/dir/?link=list&sid=396546091">http://answers.yahoo.com/dir/?link=list&sid=396546091</a><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><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>We won't tell. Get more on <a href="http://us.rd.yahoo.com/evt=49980/*http://tv.yahoo.com/collections/265
">shows you hate to love</a><br>(and love to hate): <a href="http://us.rd.yahoo.com/evt=49980/*http://tv.yahoo.com/collections/265
">Yahoo! TV's Guilty Pleasures list.</a></body></html>