<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Jiri:<br>
<br>
I thought I had responded to Jan on the matter already.&nbsp; You are
correct.&nbsp; I was misusing the nathelper functions.<br>
Apparently fix_nated_sdp("1") when used in conjuction with
force_rtp_proxy causes an unhappy sdp length.&nbsp; More importantly it is
an unnecessary call.<br>
<br>
Just the same, I thank you for your follow up.&nbsp; Your work is VERY
appreciated!<br>
<br>
Jac<br>
<br>
Bad:<br>
<blockquote type="cite">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (isflagset(1)) {</blockquote>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; fix_nated_sdp("1");<br>
<blockquote type="cite"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rtp_proxy();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply("2");<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</blockquote>
<br>
Good:<br>
<blockquote type="cite">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (isflagset(1)) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rtp_proxy();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply("2");<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</blockquote>
<br>
<br>
<br>
Jiri Kuthan wrote:<br>
<blockquote type="cite"
 cite="mid6.0.1.1.0.20040228202728.034e6f50@localhost">
  <pre wrap="">Jac,

can you send us 1) dumps of the INVITEs which emberass the gateways and
2) as much Cisco's logs about the even (debug ccsip all) as you can?
I can imagine you are using some mixed sources which may lead to
miscalculation of rewritten content-length field or other similar
things. Again -- that's a very wild guess, seeing the actual messages
would be helpful.

Thanks,

-jiri

At 06:20 PM 2/23/2004, Jac Barben wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">All:

Please bear with me... I'm having a hard time formulating this quesiton.

Basics:
ser-0.8.12  from src
rtpproxy = $Id: main.c,v 1.19.2.10 2003/10/18 20:14:22 sobomax Exp
RH 7.3  updated to: [root@sip2 rtpproxy]# uname -a
Linux sip2.claritycolorado.com 2.4.20-20.7 #1 Mon Aug 18 14:56:30 EDT 2003 i686
unknown

The problem seems to be that I cannot "always" forward calls to a given destination if I have executed the force_rtp_proxy.

Typically I'm using a UA like a Cisco ATA, PureData, or softphone behind a firewall.  They in-turn register to SER/rtpproxy at a legal IP address; most calls are then forwarded to a Vega gateway that resides on the same network as SER/rtpproxy (in Denver).  In this instance all is well.  However, when I try to alt route calls to an "off-network" source (Cisco in LA and Sonus in Houston) I get two different and disturbing results:
1. Cisco will not respond to SER:  Cisco simply indicates in its own logs that the INVITE is invalid and thus "trashed" the message
2. Sonus will respond with a "Bad Request"

Below are some snippets:

Prior to calling the route I have already I identified whether or not my UA is behind a firewall and have fix_nated_contact(), force_rport(), setflag(1)

SER/rtpproxy is running at 64.47.72.12

# Clarity Vega Evergreen CO -- this one works
route[1]
{
      if (uri=~<a class="moz-txt-link-rfc2396E" href="mailto:[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)">"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)"</a> &amp;&amp;
              !search("^Route:") ) {
              sl_send_reply("479",
                      "We don't forward to private IP addresses");
              break;
      };
                                                                              

      record_route();
      if (isflagset(1)) {
              fix_nated_sdp("1");
              force_rtp_proxy();
              t_on_reply("2");
      }
                                                                              

      rewritehostport("64.47.72.10:5060");
      t_relay();
}

# Clarity Cisco AS5300 LA -- this one does not
route[2]
{
      if (uri=~<a class="moz-txt-link-rfc2396E" href="mailto:[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)">"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)"</a> &amp;&amp;
              !search("^Route:") ) {
              sl_send_reply("479",
                      "We don't forward to private IP addresses");
              break;
      };
                                                                              

      record_route();
      if (isflagset(1)) {
              fix_nated_sdp("1");
              force_rtp_proxy();
              t_on_reply("2");
      }
                                                                              

      rewritehostport("198.77.133.30:5060");
      t_relay();
}


# Clarity Sonus Houston  -- this one does not
route[3]
{
      if (uri=~<a class="moz-txt-link-rfc2396E" href="mailto:[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)">"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)"</a> &amp;&amp;
              !search("^Route:") ) {
              sl_send_reply("479",
                      "We don't forward to private IP addresses");
              break;
      };
                                                                              

      record_route();
      if (isflagset(1)) {
              fix_nated_sdp("1");
              force_rtp_proxy();
              t_on_reply("2");
      }
                                                                              

      rewritehostport("64.47.6.6:5060");
      t_relay();
}

/* inbound */
onreply_route[2] {
      fix_nated_contact();
      fix_nated_sdp("1");
      force_rtp_proxy();
}


Please... If you have any ideas... I'm really stuck.

Jac Barben

_______________________________________________
Serusers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:serusers@lists.iptel.org">serusers@lists.iptel.org</a>
<a class="moz-txt-link-freetext" href="http://lists.iptel.org/mailman/listinfo/serusers">http://lists.iptel.org/mailman/listinfo/serusers</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->
--
Jiri Kuthan            <a class="moz-txt-link-freetext" href="http://iptel.org/~jiri/">http://iptel.org/~jiri/</a> 
  </pre>
</blockquote>
</body>
</html>