<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7650.15">
<TITLE>Problems with Mediaproxy. Bad Port.</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hello list.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">I'm having a problem with my mediaproxy box. I have a NAT'd client (a softphone) calling to a SIP-H323 conversor through my OpenSER-Mediaproxy box and then to a Cisco Call Manager (it's a very weird configuration). Anyway, the problem presents when the 200 - OK message arrives from my conversor, the SDP part indicate the media address (10.10.148.230) and port (16952) where the remote endpoint will listen RTP, despite of this the mediaproxy open a session for the port 17360.&nbsp; The escenario is something like this.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">100.100.148.248 ------- 100.100.148.246 ----- 100.100.154.36 ------ 100.100.154.119 ---- 100.100.148.230</FONT>

<BR><FONT SIZE=2 FACE="Arial">Softphone&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OpenSer/Mediaproxy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Proxy Sip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; siph323 conversor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call Manager.H323</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Please check the log from the mediaproxy and the execution of the &quot;sessions.py&quot; utility, plus the OK message.</FONT>

<BR><FONT SIZE=2 FACE="Arial">U 100.100.154.36:5060 -&gt; 100.100.148.246:5060</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">SIP/2.0 200 OK.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">Via: SIP/2.0/UDP 100.100.148.246;branch=z9hG4bK67ea.aa12dc97.0.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">Via: SIP/2.0/UDP 192.168.1.101;received=100.100.148.248;rport=46096;branch=z9hG4bKc0a801650000001d4533a0ee00007c2900000011.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Record-Route: &lt;sip:100.100.154.36;ftag=2214787970;lr=on&gt;.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">Record-Route: &lt;sip:7072408196@100.100.148.246:5060;nat=yes;ftag=2214787970;lr=on&gt;.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">From: &quot;unknown&quot;&lt;sip:5502408196@sip.desa.mydomain.net&gt;;tag=2214787970.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">To: &lt;sip:7072408196@sip.desa.mydomain.net&gt;;tag=2260729709.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">Call-ID: A2304B7B-AA05-42C5-A467-C16B1BD9102A@192.168.1.101.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">Cseq: 2 INVITE.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">Date: Mon, 16 Oct 2006 15:10:37 GMT.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">Server: siph323.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">Content-Type: application/sdp.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">Content-Length: 162.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">Contact: sip:7072408196@100.100.154.119.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">v=0.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">o=100.100.154.119 1 505533324 IN IP4 100.100.154.119.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">s=SIP Library call.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">c=IN IP4 100.100.148.230.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">t=3370000237 0.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">m=audio 16952 RTP/AVP 0.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">a=rtpmap:0 PCMU/8000.</FONT><FONT FACE="Times New Roman"> </FONT>

<BR><FONT SIZE=2 FACE="Arial">Oct 16 12:12:00 sip mediaproxy[18289]: lookup A2304B7B-AA05-42C5-A467-C16B1BD9102A@192.168.1.101 100.100.148.230:16952:audio 100.100.154.36 sip.desa.mydomain.net local sip.desa.mydomain.net unknown siph323 info=from:5502408196@sip.desa.mydomain.net,to:7072408196@sip.desa.mydomain.net,fromtag:2214787970,totag:2260729709</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Oct 16 12:12:00 sip mediaproxy[18289]: execution time: 0.48 ms</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">Oct 16 12:12:00 sip mediaproxy[18289]: session A2304B7B-AA05-42C5-A467-C16B1BD9102A@192.168.1.101: caller signed in from 100.100.148.248:49154 (RTP) (will return to 100.100.148.248:49154)</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Oct 16 12:12:00 sip mediaproxy[18289]: session A2304B7B-AA05-42C5-A467-C16B1BD9102A@192.168.1.101: called signed in from 100.100.148.230:17360 (RTP) (will return to 100.100.148.230:17360)</FONT></P>

<P><FONT SIZE=2 FACE="Arial">[root@sip ]# /usr/src/mediaproxy-1.7.2/mediaproxy/sessions.py</FONT> 

<BR><FONT SIZE=2 FACE="Courier New">Caller Via Called Status Duration Codec Type Traffic</FONT> 

<BR><FONT SIZE=2 FACE="Courier New">------------------------------------------------------------------------------------------------------------------------</FONT></P>

<P><FONT SIZE=2 FACE="Courier New">100.100.148.248:49154 - 100.100.148.246:60022 - 100.100.148.230:17360 active 0'39&quot; G711u Audio 336.91k/669.53k/332.62k</FONT>

<BR><FONT SIZE=2 FACE="Arial">Total traffic: 79.69kbps/78.12kbps/157.81kbps (in1/in2/out)</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">Session count: 1</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">Proxy version: 1.7.2</FONT><FONT FACE="Times New Roman"> </FONT>

<BR><FONT SIZE=2 FACE="Arial">Doing more debugs i discover the RTP traffic coming from the 100.100.148.230 it has source port 17360, but the listening port is not the same (i guess is the one indicated in the SDP). Why mediaproxy assumes the 17360 port is for listening too and ommit the SDP 16952 port ?</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Is this maybe an asymmetric regarding the RTP media?. If so, i added this line into the rtp-asymmetric-clients file:</FONT><FONT FACE="Times New Roman"> </FONT>

<BR><FONT SIZE=2 FACE="Courier New">#</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"># Lines starting with a '#' character or empty lines are ignored.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"># Put a User-Agent name or regular expression per line.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"># Check is case insensitive.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New">#</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"># This file should only list SIP clients that are asymmetric regarding</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"># the RTP media streams. For clients that are asymmetric regarding the SIP</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"># signaling, use the equivalent SIP version of this file.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"># Clients that are asymmetric for both SIP signaling as well as RTP media</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"># streams should go in both files.</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New">#</FONT><FONT FACE="Times New Roman"> </FONT>

<BR><FONT SIZE=2 FACE="Courier New">siph323</FONT><FONT FACE="Times New Roman"> </FONT>

<BR><FONT SIZE=2 FACE="Arial">But not solve the problem.</FONT><FONT FACE="Times New Roman"> </FONT>

<BR><FONT SIZE=2 FACE="Arial">Can someone help me here?</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">Thanks in advance</FONT><FONT FACE="Times New Roman"> </FONT>

<BR><FONT SIZE=2 FACE="Arial">Regards</FONT><FONT FACE="Times New Roman"> </FONT>

<BR><FONT SIZE=2 FACE="Arial">Ricardo Martinez.-</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">RedVoiss.</FONT><FONT FACE="Times New Roman"> </FONT>
</P>

</BODY>
</HTML>