Hi,<div><br></div><div>This is occurring for outbound invites from my Freeswitch (I have FS -&gt; OpenSips -&gt; Provider).  FS sends the invite through OpenSips. The only 200 OK I see in the entire SIP trace on the OpenSips box with a Contact header contains the contact of the number I am trying to call from FS. The issue happens when the BYE is trying to be routed back to the FS from the Provider --- so I think, If I&#39;m reading correctly, fix_route_dialog() will not work for what I&#39;m trying to do?</div>
<div><br></div><div>Thanks, your help is appreciated.</div><div><br><div class="gmail_quote">On Mon, Nov 14, 2011 at 3:10 AM, Vlad Paiu <span dir="ltr">&lt;<a href="mailto:vladpaiu@opensips.org">vladpaiu@opensips.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><u></u>

  
    
    
  
  <div bgcolor="#ffffff" text="#000000">
    Hello,<br>
    <br>
    fix_route_dialog() uses the information from the Contact of the 200
    OK. So if that is ok, you can use fix_route_dialog() to fix the
    bogus BYE messages.<br>
    <br>
    Regards,<span class="HOEnZb"><font color="#888888"><br>
    <pre cols="72">Vlad Paiu
OpenSIPS Developer</pre></font></span><div><div class="h5">
    <br>
    On 11/12/2011 06:22 PM, Matt Stockton wrote:
    <blockquote type="cite">After doing some reading, thinking that I may be able
      to solve my problem using the dialog module and
      fix_route_dialog(). Since the Contact Header is being re-written
      by the Provider, will fix_route_dialog() change it on the way in
      to the appropriate value in the dialog, causing the message to be
      forwarded correctly? The code for what I&#39;m thinking is below.
      Unfortunately, the issue is so intermittent that I have not been
      able to re-produce the case of the Provider re-writing the Contact
      Header since I started trying this modification. Does anyone know
      if this strategy will work?
      <div>
        <br>
      </div>
      <div>
        <div>       if (!has_totag()) {</div>
        <div>                create_dialog();</div>
        <div>                # initial request</div>
        <div>                record_route();</div>
        <div>        }</div>
        <div>        else {</div>
        <div>                # sequential request - obey the indicated
          route</div>
        <div>                loose_route();</div>
        <div><br>
        </div>
        <div>                if ($DLG_status!=NULL) {</div>
        <div>                   if (!validate_dialog()) {</div>
        <div>                      fix_route_dialog();</div>
        <div>                   }</div>
        <div>                }</div>
        <div><br>
        </div>
        <div>                t_relay();</div>
        <div>                exit;</div>
        <div>        }</div>
        <div><br>
        </div>
        <br>
        <div class="gmail_quote">On Fri, Nov 11, 2011 at 9:23 AM, Matt
          Stockton <span dir="ltr">&lt;<a href="mailto:mstockton@harqen.com" target="_blank">mstockton@harqen.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
            I added the following to my config:
            <div><br>
            </div>
            <div>
              <div>onreply_route[pstn_outgoing] {</div>
              <div>
                <div>   setflag(1);</div>
                <div>   if(t_check_status(&quot;200&quot;)) {</div>
                <div>     if(search(&quot;Content-type: application/sdp&quot;)) {</div>
                <div>        fix_nated_sdp(&quot;8&quot;, &quot;x.x.x.x&quot;);</div>
                <div>     }</div>
                <div>   }</div>
                <div>}</div>
              </div>
            </div>
            <div><br>
            </div>
            <div>And the only thing that seemed to have changed in the
              SIP signalling is, when my provider sends SIP 200 OK to
              OpenSips, OpenSips is just re-writing the OK Content
              before sending onto Freeswitch. It doesn&#39;t look like any
              messages have changed that are going from OpenSips to the
              provider, and the provider is still sending the BYE
              message with the Contact Header intermittently to the
              different IPs as I described. Any more thoughts on this? </div>
            <div><br>
            </div>
            <div>My end goal is to simply have the same OpenSips act as
              both an inbound proxy and outbound proxy, with no
              registration requirements. If there is an easier way to do
              this with OpenSips, please let me know. I&#39;ve looked around
              and checked out all the referenced tutorials on the site
              w/r/t load balancing and routing</div>
            <div><br>
            </div>
            <div>
              <div><span style="white-space:pre-wrap"> </span>v=0</div>
              <div><span style="white-space:pre-wrap"> </span>o=Sonus_UAC
                14270 3732 IN IP4 x.x.x.x</div>
              <div><span style="white-space:pre-wrap"> </span>s=SIP
                Media Capabilities</div>
              <div><span style="white-space:pre-wrap"> </span>c=IN
                IP4 67.231.0.110</div>
              <div><span style="white-space:pre-wrap"> </span>t=0 0</div>
              <div><span style="white-space:pre-wrap"> </span>m=audio
                25620 RTP/AVP 0 101</div>
              <div><span style="white-space:pre-wrap"> </span>a=rtpmap:0
                PCMU/8000</div>
              <div><span style="white-space:pre-wrap"> </span>a=rtpmap:101
                telephone-event/8000</div>
              <div><span style="white-space:pre-wrap"> </span>a=fmtp:101
                0-15</div>
              <div><span style="white-space:pre-wrap"> </span>a=sendrecv</div>
              <div><span style="white-space:pre-wrap"> </span>a=maxptime:20</div>
              <div><span style="white-space:pre-wrap"> </span>a=oldmediaip:ACTUAL_IP</div>
            </div>
            <div>
              <div>
                <div><br>
                </div>
                <div><br>
                  <br>
                  <div class="gmail_quote">On Thu, Nov 10, 2011 at 7:17
                    PM, ddgiants <span dir="ltr">&lt;<a href="mailto:ddgiants@gmail.com" target="_blank">ddgiants@gmail.com</a>&gt;</span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
                      Matt,<br>
                      Sounds like you may not be topology hiding the
                      200OKs. Some/most SIP<br>
                      devices/SBC&#39;s etc will send a BYE to the ip
                      address in the o(owner) line of<br>
                      the SDP of the 200OK. Some devices do not and send
                      BYE to the initator/proxy<br>
                      they are configured for. The 200OK will have o and
                      c. O is the owner,<br>
                      meaning signaling owner and C is the connection IP
                      as in where to send the<br>
                      actual RTP. I use the below to change the o
                      portion of the SDP in 200 OKs<br>
                      and works for me. Give it a try and let me know.<br>
                      <br>
                      onreply_route[1] {<br>
                       setflag(1);<br>
                       if(t_check_status(&quot;200&quot;)) {<br>
                         if(search(&quot;Content-type: application/sdp&quot;)) {<br>
                           fix_nated_sdp(&quot;8&quot;, &quot;x.x.x.x&quot;);<br>
                         }<br>
                       }<br>
                      }<br>
                      <br>
                      DD<br>
                      <span><font color="#888888"><br>
                          --<br>
                          View this message in context: <a href="http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSips-as-an-inbound-loadbalancer-and-outbound-proxy-issue-with-routing-BYES-tp6984017p6984067.html" target="_blank">http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSips-as-an-inbound-loadbalancer-and-outbound-proxy-issue-with-routing-BYES-tp6984017p6984067.html</a><br>

                          Sent from the OpenSIPS - Users mailing list
                          archive at Nabble.com.<br>
                          <br>
_______________________________________________<br>
                          Users mailing list<br>
                          <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
                          <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                        </font></span></blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </div></div></div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>