Dear Bogdan,<br><br>Thanks you for your spending time on this.<br><br>It works like a charm :)<br><br>Thanks and Regards,<br>-LN<br><br><div class="gmail_quote">On Thu, Apr 2, 2009 at 5:42 PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
even if this was already discussed on the #opensips IRC channel, for the sake of completion:<br>
<br>
The 400 Bad request was because of the malformed SDP - some bogus space were inserted while nathelper did some changes. This is an old bug and it was fixed starting wit 1.4.2.<br>
<br>
In this report 1.4.1 was used, so upgrading to 1.4.5 should solve the problem.<div class="im"><br>
<br>
Regards,<br>
Bogdan<br>
<br>
oso che bol 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;">
Dear Bogdan,<br>
<br><div><div></div><div class="h5">
I meet the issues of callee reply &quot;400 - bad request&quot;<br>
<br>
Attach is my trace from opensips server.<br>
<br>
Bellow is my configure of Opensips. Please take a time for my issues:<br>
<br>
route {<br>
    log(1, &quot;----------------------------------------------------------------------------------&quot;);<br>
    log(1, &quot; ENTER MAIN LOOP\n&quot;);<br>
    log(1, &quot;----------------------------------------------------------------------------------&quot;);<br>
    #---------<br>
    #Sanity Check<br>
    #-------------<br>
    if (!mf_process_maxfwd_header(&quot;10&quot;)) {<br>
        sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);<br>
        exit;<br>
    };<br>
    if ( msg:len &gt;= max_len ) {<br>
        sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);<br>
        exit;<br>
    }<br>
       #--------------------------------------<br>
    #Record-Route all messages<br>
    #-- to make sure subsequent messages will go through our proxy<br>
    #--------------------------------------<br>
    if (method!=&quot;REGISTER&quot;) {<br>
        record_route();<br>
    }<br>
    #-------------------------------<br>
    # Loose-Route<br>
    #-------------------------------<br>
    if (loose_route()) {<br>
        append_hf(&quot;P-hint: rr-enforced\r\n&quot;);<br>
        route(1);<br>
        exit;<br>
    }<br>
    #--------------------------------<br>
    # uri != myself<br>
    #--------------------------------------<br>
    if (uri!=myself) {<br>
        append_hf(&quot;P-hint: Outbound\r\n&quot;);<br>
        route(1);<br>
        exit;<br>
    }<br>
    #----------------------------------<br>
    # uri==myself<br>
    #--------------------------------<br>
    if (uri==myself) {<br>
        if (method==&quot;REGISTER&quot;) {<br>
            if (nat_uac_test(&quot;19&quot;)) {<br>
                setbflag(6);<br>
                force_rport();<br>
                fix_nated_register();<br>
                       }<br>
            sl_send_reply(&quot;100&quot;, &quot; Trying\r\n&quot;);<br>
            #AUTHENTICATE<br>
            if(!www_authorize(&quot;174.132.X.Y&quot;, &quot;subscriber&quot;)) {<br>
                www_challenge(&quot;174.132.X.Y&quot;, &quot;0&quot;);<br>
                exit;<br>
            }<br>
            consume_credentials();<br>
                       save(&quot;location&quot;);<br>
            exit;<br>
               }<br>
        lookup(&quot;aliases&quot;);<br>
        if (uri!=myself) {<br>
            append_hf(&quot;P-hint:  outbound alias\r\n&quot;);<br>
            route(1);<br>
            exit;<br>
        }<br>
        if (!lookup(&quot;location&quot;)) {<br>
            sl_send_reply(&quot;404&quot;, &quot; Not Found&quot;);<br>
            exit;<br>
        }<br>
           } #End uri==myself<br>
       #<br>
    #<br>
    #<br>
    if (method==&quot;INVITE&quot;) {<br>
        t_on_failure(&quot;1&quot;);<br>
    } else if (method==&quot;BYE&quot; || method==&quot;CANCEL&quot;) {<br>
        unforce_rtp_proxy();<br>
    }<br>
       #---------------------------------------------------------------------<br>
    # LOOSE_ROUTE - INVITE - FORCE_RTP_PROXY<br>
    #-----------------------------------------------------------------------<br>
    if (loose_route()) {<br>
        if (method==&quot;INVITE&quot; || method==&quot;ACK&quot;) {<br>
            append_hf(&quot;P-hint:- LOOSE ROUTE - Relay re-INVITE + FORCE_RTP_PROXY\r\n&quot;);<br>
            force_rtp_proxy();<br>
        }<br>
        # t-relay()<br>
        t_relay();<br>
        exit;<br>
    }<br>
       #-----------------------------------------------------------------------<br>
    #NAT - fix_nated_contact()<br>
    #------------------------------------------------------------------------<br>
    if (nat_uac_test(&quot;19&quot;) &amp;&amp; !search(&quot;^Record-Route:&quot;)) {<br>
        append_hf(&quot;P-hint: Fix nated contact\r\n&quot;);<br>
        force_rport();<br>
        fix_nated_contact();<br>
    }<br>
       if (method==&quot;INVITE&quot;) {<br>
        append_hf(&quot;P-hint:  INVITE go to on_reply_route[1]\r\n&quot;);<br>
        t_on_reply(&quot;1&quot;);<br>
    }<br>
       if (method==&quot;INVITE&quot; || method==&quot;ACK&quot;) {<br>
        append_hf(&quot;P-hint: INVITE||ACK + FORCE_RTP_PROXY\r\n&quot;);<br>
        force_rtp_proxy();<br>
    }<br>
       if (!t_relay()) {<br>
        append_hf(&quot;P-hint: INVITE||ACK - UNFORCE_RTP_PROXY\r\n&quot;);<br>
        if (method==&quot;INVITE&quot; || method==&quot;ACK&quot;) {<br>
            unforce_rtp_proxy();<br>
        }<br>
        sl_reply_error();<br>
    }<br>
       append_hf(&quot;P-hint: usrloc applied\r\n&quot;);<br>
   <br>
}<br>
<br>
route[1] {<br>
    append_hf(&quot;P-hint:Route[1] Processing\r\n&quot;);<br>
    if (!t_relay()) {<br>
        sl_reply_error();<br>
    }<br>
}<br>
<br>
failure_route[1] {<br>
    unforce_rtp_proxy();<br>
}<br>
<br>
onreply_route[1] {<br>
    append_hf(&quot;P-hint: On_reply_route[1] processing\r\n&quot;);<br>
    if (status=~&quot;(180)|(183)|2[0-9][0-9]&quot;) {<br>
        if (nat_uac_test(&quot;1&quot;)) {<br>
            fix_nated_contact();<br>
        }<br>
        force_rtp_proxy();<br>
    }<br>
}<br>
<br>
Thanks and Regards,<br>
-LN<br></div></div><div class="im">
On Wed, Apr 1, 2009 at 5:46 PM, Bogdan-Andrei Iancu &lt;<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> &lt;mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>&gt;&gt; wrote:<br>

<br>
    Hi,<br>
<br></div><div class="im">
    risntance is just an URI parameter and from server pov it is<br>
    opaque - has no meaning. It is exclusively used by phone (X-lite).<br>
    Tipically such param is used by phones that register multiple<br>
    accounts, in order to make distinction between the accounts (as<br>
    for all of them , the IP and port from contact will be the same).<br>
<br>
    To see why the call is drop, you need to take a sip trace (use<br>
    ngrep) to see the signalling on the proxy.<br>
<br>
<br>
    Regards,<br>
    Bogdan<br>
<br>
<br>
    oso che bol wrote:<br>
<br>
        Dear Bogdan,<br>
<br>
        Regarding about old question, could you please tell me why:<br>
        - Contact of Mobile: sip:8000@212.15.B.C:1120<br>
        - Contact of X-Lite:<br>
        sip:6000@58.186.Y.Z:14553;rinstance=abb597b601e7398b<br>
<br>
        What is rinstance and does it impact to the call. I make call<br>
        from Mobile (SJPhone on winCE) to X-Lite and after 32s, it<br>
        drop call. Both UAs behind NAT.<br>
<br>
        But, x-lite --to/from -- x-lite: call successful, no drop.<br>
<br>
        Thanks,<br>
        -LN<br>
<br>
        On Tue, Mar 31, 2009 at 11:09 PM, oso che bol<br>
        &lt;<a href="mailto:ndlgroup1@gmail.com" target="_blank">ndlgroup1@gmail.com</a> &lt;mailto:<a href="mailto:ndlgroup1@gmail.com" target="_blank">ndlgroup1@gmail.com</a>&gt;<br></div><div class="im">
        &lt;mailto:<a href="mailto:ndlgroup1@gmail.com" target="_blank">ndlgroup1@gmail.com</a> &lt;mailto:<a href="mailto:ndlgroup1@gmail.com" target="_blank">ndlgroup1@gmail.com</a>&gt;&gt;&gt; wrote:<br>
<br>
           Dear Bogdan,<br>
<br>
           Thanks very much for your time.<br>
<br>
           Regards,<br>
           -LN<br>
<br>
<br>
           On Tue, Mar 31, 2009 at 8:53 PM, Bogdan-Andrei Iancu<br>
           &lt;<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> &lt;mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>&gt;<br></div><div><div></div>
<div class="h5">
        &lt;mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
        &lt;mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>&gt;&gt;&gt; wrote:<br>
<br>
               Please use fix_nated_register() for REGISTER requests -<br>
        this<br>
               will set the appropriate info to be saved in usrloc.<br>
<br>
               fix_nated_register() is not changing the contact (so the<br>
               usrloc will save the real contact), but is just setting<br>
        some<br>
               additional info to be saved in usrloc (the received field)<br>
<br>
               fix_nated_contact() is actually changing the contact<br>
        from the<br>
               request - this is to be used for non-REGISTER requests.<br>
<br>
<br>
               Regards,<br>
               Bogdan<br>
<br>
               oso che bol wrote:<br>
<br>
<br>
                   Dear Bogdan<br>
<br>
                   I change the config of NATed REGISTER request to:<br>
<br>
                   /    if (nat_uac_test(&quot;19&quot;)) {<br>
                          if (is_method(&quot;REGISTER&quot;) ||<br>
                   !search(&quot;^Record-Route&quot;)) {<br>
                              log(&quot;LOG:  Someone trying to register from<br>
                   private IP, rewriting\n&quot;);<br>
                              fix_nated_contact(); # Rewrite contact with<br>
                   source IP of signalling<br>
                              force_rport(); # Add rport parameter to<br>
        topmost Via<br>
                              setbflag(6);    # Mark as NATed<br>
                          if (method==&quot;INVITE&quot;) {<br>
                              fix_nated_sdp(&quot;1&quot;); # Add<br>
        direction=active to SDP<br>
                              force_rport(); # Add rport parameter to<br>
        topmost Via<br>
                              setbflag(6); # Mark as NATed<br>
                           };<br>
                          };/<br>
<br>
                   Output of &quot;opensipsctl ul show&quot;:<br>
<br>
                   /[root@LN]# opensipsctl ul show<br>
                   database engine &#39;MYSQL&#39; loaded<br>
                   Control engine &#39;FIFO&#39; loaded<br>
                   entering fifo_cmd ul_dump<br>
                   Mar 31 07:17:27 [6412] DBG:mi_fifo:mi_parse_node:<br>
        end of<br>
                   input tree<br>
                   Mar 31 07:17:27 [6412] DBG:mi_fifo:mi_fifo_server: done<br>
                   parsing the mi tree<br>
                   Domain:: aliases table=512 records=0 max_slot=0<br>
                   Domain:: location table=512 records=2 max_slot=1<br>
                      AOR:: 5000<br>
                          Contact::<br>
        sip:5000@77.69.220.94:5060;transport=UDP Q=<br>
                              Expires:: 1038<br>
                              Callid:: A9AOj5F5oIeDS04U53IMr4_65zZvf5<br>
                              Cseq:: 6049<br>
                              User-agent:: E66-1 RM-343 102.07.81<br>
                              State:: CS_SYNC<br>
                              Flags:: 0<br>
                              Cflag:: 64<br>
                              Socket:: udp:174.132.X.Y:5060<br>
                              Methods:: 4294967295<br>
                      AOR:: 6000<br>
                          Contact::<br>
                          sip:6000@58.186.156.135:11370;rinstance=dbe921dccef4bee4 Q=<br>
                              Expires:: 1060<br>
                              Callid::<br>
                   MDdmOTVkNzAzODAxN2JiMjk0MTk1NTEwNThjOWE2ZTM.<br>
                              Cseq:: 6<br>
                              User-agent:: X-Lite release 1100l stamp<br>
        47546<br>
                              State:: CS_SYNC<br>
                              Flags:: 0<br>
                              Cflag:: 64<br>
                              Socket:: udp:174.132.X.Y:5060<br>
                              Methods:: 5951<br>
                   FIFO command was:<br>
                   :ul_dump:opensips_receiver_6568/<br>
<br>
                   Could you please explain why with mobile user 5000, the<br>
                   contact /sip:5000@77.69.220.94:5060;transport=UDP /and<br>
                   with X-Lite User 6000 the contact is<br>
                   /6000@58.186.156.135:11370;rinstance=dbe921dccef4bee4/<br>
<br>
                   How fix_nated_register() differ with<br>
        fix_nated_register(),<br>
                   do we need to call fix_nated_register() at REGISTER<br>
                   processing?<br>
<br>
                   Thanks and Regards,<br>
<br>
                   -LN<br>
<br>
                   On Tue, Mar 31, 2009 at 6:19 PM, Bogdan-Andrei Iancu<br>
                   &lt;<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
        &lt;mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>&gt; &lt;mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
        &lt;mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>&gt;&gt;<br>
                   &lt;mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
        &lt;mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>&gt;<br>
                   &lt;mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
        &lt;mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>&gt;&gt;&gt;&gt; wrote:<br>
<br>
                      Hi,<br>
<br>
                      if the online-user info is correct, it looks<br>
        like the<br>
                      fix_nated_register() is not done.<br>
<br>
                      Please post the output of &quot;opensipsctl ul show&quot;, for<br>
                   that specific<br>
                      user.<br>
<br>
                      Also test by using xlog if the at register time your<br>
                   processing<br>
                      gets inside the &quot;if (!search(&quot;^Contact:[ ]*\*&quot;) &amp;&amp;<br>
                      nat_uac_test(&quot;19&quot;)) {&quot;.<br>
<br>
                      Regards,<br>
                      Bogdan<br>
<br>
                      oso che bol wrote:<br>
<br>
                          Dear All,<br>
<br>
                          I use Opensips 1.4.1 with rtpproxy 1.2 for<br>
        NAT support.<br>
<br>
                          I use X-Lite which is Behind NAT, register to<br>
                   OpenSIPs proxy,<br>
                          Opensips store right contact address. But,<br>
        when i<br>
                   use Nokia<br>
                          E66 to register to Opensips, the contact<br>
        address is<br>
                   bellow:<br>
                          Online SIP Users<br>
                          Username Domain Contact Expires User Agent<br>
                          5000 *<a href="mailto:sip%3A5000@192.168.1.100" target="_blank">sip:5000@192.168.1.100</a><br>
        &lt;mailto:<a href="mailto:sip%253A5000@192.168.1.100" target="_blank">sip%3A5000@192.168.1.100</a>&gt;<br>
                   &lt;mailto:<a href="mailto:sip%253A5000@192.168.1.100" target="_blank">sip%3A5000@192.168.1.100</a><br>
        &lt;mailto:<a href="mailto:sip%25253A5000@192.168.1.100" target="_blank">sip%253A5000@192.168.1.100</a>&gt;&gt;<br>
                   &lt;mailto:<a href="mailto:sip%253A5000@192.168.1.100" target="_blank">sip%3A5000@192.168.1.100</a><br>
        &lt;mailto:<a href="mailto:sip%25253A5000@192.168.1.100" target="_blank">sip%253A5000@192.168.1.100</a>&gt;<br>
                   &lt;mailto:<a href="mailto:sip%25253A5000@192.168.1.100" target="_blank">sip%253A5000@192.168.1.100</a><br>
        &lt;mailto:<a href="mailto:sip%2525253A5000@192.168.1.100" target="_blank">sip%25253A5000@192.168.1.100</a>&gt;&gt;&gt;<br>
                          &lt;mailto:<a href="mailto:sip%253A5000@192.168.1.100" target="_blank">sip%3A5000@192.168.1.100</a><br>
        &lt;mailto:<a href="mailto:sip%25253A5000@192.168.1.100" target="_blank">sip%253A5000@192.168.1.100</a>&gt;<br>
                   &lt;mailto:<a href="mailto:sip%25253A5000@192.168.1.100" target="_blank">sip%253A5000@192.168.1.100</a><br>
        &lt;mailto:<a href="mailto:sip%2525253A5000@192.168.1.100" target="_blank">sip%25253A5000@192.168.1.100</a>&gt;&gt;<br>
                          &lt;mailto:<a href="mailto:sip%25253A5000@192.168.1.100" target="_blank">sip%253A5000@192.168.1.100</a><br>
        &lt;mailto:<a href="mailto:sip%2525253A5000@192.168.1.100" target="_blank">sip%25253A5000@192.168.1.100</a>&gt;<br>
                   &lt;mailto:<a href="mailto:sip%2525253A5000@192.168.1.100" target="_blank">sip%25253A5000@192.168.1.100</a><br></div></div>
        &lt;mailto:<a href="mailto:sip%252525253A5000@192.168.1.100" target="_blank">sip%2525253A5000@192.168.1.100</a>&gt;&gt;&gt;&gt;;transport=UDP*<div class="im"><br>
<br>
                   2009-03-30<br>
<br>
                          07:20:24.0 E66-1 RM-343 102.07.81<br>
<br>
<br>
                          User 5000 do not store with external IP<br>
        address of its<br>
                          (external address not 192.168.1.100). Do you<br>
        have<br>
                   any ideas<br>
                          about this?<br>
<br>
                          Bellow is my Opensips.conf<br>
<br>
                          Thanks and Regards,<br>
<br>
                          -LN<br>
<br>
                          Opensips.conf<br>
<br>
</div></blockquote>
<br>
</blockquote></div><br>