<span style='font-family:Verdana'><span style='font-size:12px'>Anton, thanks for your help - the problem was pre-process directive in config pointing to internal profile by default while I was using external. Everything works now.<br /> 
<br /> 
<br /> 
<br /> 
<p style="margin:0px; padding:0px;" > 
         </p> 
<blockquote style="border-left: 1px solid #CCC; padding-left: 5px; margin-left: 5px; margin-bottom: 0px; margin-top: 0px; margin-right: 0px;" type="cite"> 
        <p style="margin:0px; padding:0px;" > 
                <span style="font-family:Verdana"><span style="font-size:12px">----- Original Message -----</span></span></p> 
        <p style="margin:0px; padding:0px;" > 
                <span style="font-family:Verdana"><span style="font-size:12px">From: Anton Kvashenkin</span></span></p> 
        <p style="margin:0px; padding:0px;" > 
                <span style="font-family:Verdana"><span style="font-size:12px">Sent: 11/09/12 06:12 AM</span></span></p> 
        <p style="margin:0px; padding:0px;" > 
                <span style="font-family:Verdana"><span style="font-size:12px">To: FreeSWITCH Users Help</span></span></p> 
        <p style="margin:0px; padding:0px;" > 
                <span style="font-family:Verdana"><span style="font-size:12px">Subject: Re: [Freeswitch-users] Error 606 (USER_NOT_REGISTERED) but in fact he is...</span></span></p> 
        <br /> 
        <div> 
                <p style="margin:0px; padding:0px;" > 
                        Which soifa profile do you use for registrering this user. Can you post sofia_contact */thatuser@domain. Also, do not forget abount dial_string.<br /> 
                         </p> 
                <div class="gmail_quote"> 
                        2012/11/9 Mi Ke <span>&lt;<a href="mailto:mi.ke@null.net" target="_blank">mi.ke@null.net</a>&gt;</span><br /> 
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> 
                                <span style="font-family:Verdana"><span style="font-size:12px">Hi,<br /> 
                                <br /> 
                                I have an IP phone behind NAT registered to also NATed FreeSWITCH (EC2):<br /> 
                                <br /> 
                                10.10.10.107 (phone) -&gt; 111.111.111.111 (NAT) -&gt; internet -&gt; 222.222.222.222 (NAT) -&gt; 10.210.250.135 (FS)<br /> 
                                <br /> 
                                Registration part of sip trace looks OK (?):<br /> 
                                <br /> 
                                tport.c:2730 tport_wakeup_pri() tport_wakeup_pri(0x7fdcf8004430): events IN<br /> 
                                tport.c:2845 tport_recv_event() tport_recv_event(0x7fdcf8004430)<br /> 
                                tport.c:3186 tport_recv_iovec() tport_recv_iovec(0x7fdcf8004430) msg 0x7fdcf8010980 from (udp/<a href="http://10.210.250.135:5060" target="_blank">10.210.250.135:5060</a>) has 702 bytes, veclen = 1<br /> 
                                tport.c:3004 tport_deliver() tport_deliver(0x7fdcf8004430): msg 0x7fdcf8010980 (702 bytes) from udp/<a href="http://111.111.111.111:5060/sip" target="_blank">111.111.111.111:5060/sip</a> next=(nil)<br /> 
                                nta.c:2803 agent_recv_request() nta: received REGISTER sip:222.222.222.222 SIP/2.0 (CSeq 49512)<br /> 
                                nta.c:3090 agent_check_request_via() nta: Via check: received=111.111.111.111<br /> 
                                nta.c:3161 agent_aliases() nta: canonizing sip:222.222.222.222 with contact<br /> 
                                nta.c:3002 agent_recv_request() nta: REGISTER (49512) going to a default leg<br /> 
                                2012-11-09 01:14:34.833161 [ERR] sofia_reg.c:1613 DELETE PRESENCE SQL: delete from sip_presence where sip_user='1000' and sip_host='222.222.222.222' and profile_name='external' and open_closed='closed'<br /> 
                                nua_stack.c:529 nua_signal() nua(0x7fdcf8013190): sent signal r_respond<br /> 
                                nua_stack.c:529 nua_signal() nua(0x7fdcf8013190): sent signal r_destroy<br /> 
                                tport.c:3238 tport_tsend() tport_tsend(0x7fdcf8004430) tpn = UDP/<a href="http://111.111.111.111:5060" target="_blank">111.111.111.111:5060</a><br /> 
                                tport.c:4660 tport_by_addrinfo() tport_by_addrinfo(0x7fdcf8004430): not found by name UDP/<a href="http://111.111.111.111:5060" target="_blank">111.111.111.111:5060</a><br /> 
                                nta.c:6678 incoming_reply() nta: <span style="background-color:#ccffcc">sent 200 OK for REGISTER</span> (49512)<br /> 
                                <br /> 
                                Here registration LED on the phone goes green, phone gives me a dialing tone i.e. behaves like registered.<br /> 
                                <br /> 
                                show registrations looks OK:<br /> 
                                <br /> 
                                reg_user,realm,token,url,expires,network_ip,network_port,network_proto,hostname,metadata<br /> 
                                1000,222.222.222.222,<a href="mailto:6a7735fa-6f81e64c@10.10.10.107" target="_blank">6a7735fa-6f81e64c@10.10.10.107</a>,sofia/external/sip:1000@10.10.10.107:5060;fs_nat=yes;fs_path=sip%3A1000%40111.111.111.111%3A5060,1352420589,111.111.111.111,5060,udp,domU-12-31-39-09-F5-79,<br /> 
                                <br /> 
                                sofia status profile external<br /> 
                                ...<br /> 
                                REGISTRATIONS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1<br /> 
                                <br /> 
                                <br /> 
                                <br /> 
                                Meanwhile when incoming call hits my dialplan (simple bridge to user/1000@domain) I'm getting ERR 606 (User not registered)<br /> 
                                <br /> 
                                and here is what list_users gives to me:<br /> 
                                <br /> 
                                userid|context|domain|group|contact|callgroup|effective_caller_id_name|effective_caller_id_number<br /> 
                                1000|default|10.210.250.135|default|<span style="background-color:#ffcc99">error/user_not_registered</span>||Mike|1000<br /> 
                                <br /> 
                                The question is - what am I doing wrong?<br /> 
                                <br /> 
                                Thanks in advance for all yours hints<br /> 
                                <br /> 
                                Mike</span></span><br /> 
                                _________________________________________________________________________<br /> 
                                Professional FreeSWITCH Consulting Services:<br /> 
                                <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br /> 
                                <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br /> 
                                <br /> 
                                FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br /> 
                                <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br /> 
                                <br /> 
                                Official FreeSWITCH Sites<br /> 
                                <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br /> 
                                <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br /> 
                                <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br /> 
                                <br /> 
                                FreeSWITCH-users mailing list<br /> 
                                <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br /> 
                                <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br /> 
                                UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br /> 
                                <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br /> 
                                 </blockquote> 
                </div> 
        </div> 
</blockquote> 
<p style="margin:0px; padding:0px;" > 
         </p> 
</span></span>