<div>Hi,</div>
<div> </div>
<div>I am using MediaProxy to help get over some one way audio issues, however it appears to be causing more problems than it is fixing.</div>
<div> </div>
<div>When I make a call between two registered phones there is no audio at all, but when I call a gateway audio passes correctly. </div>
<div> </div>
<div>Looking at the logs it indicates that it has RTP & RTCP for one phone but only RTP for the other:</div>
<div> </div>
<div>-------------------------------------------------------------------------------------------------------------------------------------------------------------</div>
<div><em>media-relay[11366]: debug: Received new SDP offer<br>media-relay[11366]: mediaproxy.mediacontrol.StreamListenerProtocol starting on 50060<br>media-relay[11366]: mediaproxy.mediacontrol.StreamListenerProtocol starting on 50061<br>
media-relay[11366]: mediaproxy.mediacontrol.StreamListenerProtocol starting on 50062<br>media-relay[11366]: mediaproxy.mediacontrol.StreamListenerProtocol starting on 50063<br>media-relay[11366]: debug: Added new stream: (audio) <a href="http://192.168.2.200:5638">192.168.2.200:5638</a> (RTP: Unknown, RTCP: Unknown) <-> <SERVER IP ADDRESS>:50060 <-> <SERVER IP ADDRESS>:50062 <-> Unknown (RTP: Unknown, RTCP: Unknown)<br>
media-relay[11366]: debug: created new session NWZmMmMwMzAxNDM5YjdiYTAwMDYxYTViNTllMTczMWI.: </em><a href="mailto:10002*200@mydomain.com"><em>10002*200@mydomain.com</em></a><em> (b62884c7) --> </em><a href="mailto:10001*200@mydomain.com"><em>10001*200@mydomain.com</em></a><br>
<em>media-relay[11366]: debug: Got traffic information for stream: (audio) <a href="http://192.168.2.200:5638">192.168.2.200:5638</a> (RTP: Unknown, RTCP: Unknown) <-> <SERVER IP ADDRESS>:50060 <-> <SERVER IP ADDRESS>:50062 <-> Unknown (RTP: <Clients Router IP>:57096, RTCP: Unknown)<br>
media-dispatcher[11369]: debug: Issuing "update" command to relay at <SERVER IP ADDRESS><br>media-relay[11366]: debug: updating existing session NWZmMmMwMzAxNDM5YjdiYTAwMDYxYTViNTllMTczMWI.: </em><a href="mailto:10002*200@mydomain.com"><em>10002*200@mydomain.com</em></a><em> (b62884c7) --> </em><a href="mailto:10001*200@mydomain.com"><em>10001*200@mydomain.com</em></a><br>
<em>media-relay[11366]: debug: Received updated SDP answer<br>media-relay[11366]: debug: Got initial answer from callee for stream: (audio) <a href="http://192.168.2.200:5638">192.168.2.200:5638</a> (RTP: Unknown, RTCP: Unknown) <-> <SERVER IP ADDRESS>:50060 <-> <SERVER IP ADDRESS>:50062 <-> <a href="http://192.168.2.10:40022">192.168.2.10:40022</a> (RTP: <Clients Router IP>:57096, RTCP: Unknown)<br>
media-relay[11366]: debug: Got traffic information for stream: (audio) <a href="http://192.168.2.200:5638">192.168.2.200:5638</a> (RTP: Unknown, RTCP: <Clients Router IP>:55671) <-> <SERVER IP ADDRESS>:50060 <-> <SERVER IP ADDRESS>:50062 <-> <a href="http://192.168.2.10:40022">192.168.2.10:40022</a> (RTP: <Clients Router IP>:57096, RTCP: Unknown)<br>
media-relay[11366]: debug: Got traffic information for stream: (audio) <a href="http://192.168.2.200:5638">192.168.2.200:5638</a> (RTP: <Clients Router IP>:55670, RTCP: <Clients Router IP>:55671) <-> <SERVER IP ADDRESS>:50060 <-> <SERVER IP ADDRESS>:50062 <-> <a href="http://192.168.2.10:40022">192.168.2.10:40022</a> (RTP: <Clients Router IP>:57096, RTCP: Unknown)<br>
media-dispatcher[11369]: debug: Issuing "remove" command to relay at <SERVER IP ADDRESS><br>media-relay[11366]: debug: removing session NWZmMmMwMzAxNDM5YjdiYTAwMDYxYTViNTllMTczMWI.: </em><a href="mailto:10002*200@mydomain.com"><em>10002*200@mydomain.com</em></a><em> (b62884c7) --> </em><a href="mailto:10001*200@mydomain.com"><em>10001*200@mydomain.com</em></a><br>
<em>media-relay[11366]: (Port 50060 Closed)<br>media-relay[11366]: (Port 50061 Closed)<br>media-relay[11366]: (Port 50062 Closed)<br>media-relay[11366]: (Port 50063 Closed)<br>media-dispatcher[11369]: debug: Got statistics: {'from_tag': 'b62884c7', 'dialog_id': '841:447573368', 'start_time': 1256818436.3299999, 'timed_out': False, 'call_id': 'NWZmMmMwMzAxNDM5YjdiYTAwMDYxYTViNTllMTczMWI.', 'to_tag': '7t0mkzlie0', 'streams': [{'status': 'closed', 'caller_codec': 'G711u', 'post_dial_delay': 1.252835989, 'callee_codec': '1016', 'start_time': 0, 'caller_bytes': 82000, 'callee_bytes': 83600, 'caller_packets': 410, 'end_time': 8, 'callee_remote': '<Clients Router IP>:57096', 'caller_remote': '<Clients Router IP>:55670', 'media_type': 'audio', 'callee_local': '<SERVER IP ADDRESS>:50062', 'timeout_wait': 0, 'caller_local': '<SERVER IP ADDRESS>:50060', 'callee_packets': 418}], 'duration': 8, 'to_uri': </em><a href="mailto:'10001*200@mydomain.com'"><em>'10001*200@mydomain.com'</em></a><em>, 'from_uri': </em><a href="mailto:'10002*200@mydomain.com'"><em>'10002*200@mydomain.com'</em></a><em>, 'callee_ua': 'snom370/7.3.26', 'caller_ua': 'X-Lite Beta release 4.0 Beta 2 stamp 55091'}</em></div>
<div>-------------------------------------------------------------------------------------------------------------------------------------------------------------</div>
<div> </div>
<div>I am using the following OpenSIP's config:</div>
<div> </div>
<div> <span lang="EN-GB">
<p># main routing logic</p>
<p>route{</p>
<p># initial sanity checks -- messages with</p>
<p># max_forwards==0, or excessively long requests</p>
<p>if (!mf_process_maxfwd_header("10")) {</p>
<p>sl_send_reply("483","Too Many Hops");</p>
<p>exit;</p>
<p>};</p>
<p>if (msg:len >= 2048 ) {</p>
<p>sl_send_reply("513", "Message too big");</p>
<p>exit;</p>
<p>};</p>
<p># !! Nathelper</p>
<p># Special handling for NATed clients; first, NAT test is</p>
<p># executed: it looks for via!=received and RFC1918 addresses</p>
<p># in Contact (may fail if line-folding is used); also,</p>
<p># the received test should, if completed, should check all</p>
<p># vias for rpesence of received</p>
<p>if (nat_uac_test("31")) </p>
<p>{</p>
<p># Allow RR-ed requests, as these may indicate that</p>
<p># a NAT-enabled proxy takes care of it; unless it is</p>
<p># a REGISTER</p>
<p>xlog("Behind a NAT\n");</p>
<p>if (is_method("REGISTER"))</p>
<p>{</p>
<p>fix_nated_register();</p>
<p>}</p>
<p>fix_nated_contact();</p>
<p></p>
<p>force_rport(); # Add rport parameter to topmost Via</p>
<p>#setbflag(6); # Mark as NATed</p>
<p>};</p>
<p></p>
<p># we record-route all messages -- to make sure that</p>
<p># subsequent messages will go through our proxy; that's</p>
<p># particularly good if upstream and downstream entities</p>
<p># use different transport protocol</p>
<p>if (!is_method("REGISTER"))</p>
<p>record_route();</p>
<p>if(is_method("INVITE"))</p>
<p>{</p>
<p>fix_nated_sdp("1");</p>
<p>create_dialog();</p>
<p>fix_nated_sdp("8");</p>
<p>engage_media_proxy();</p>
<p>}</p>
<p></p>
<p># subsequent messages withing a dialog should take the</p>
<p># path determined by record-routing</p>
<p>if (loose_route()) {</p>
<p># mark routing logic in request</p>
<p>append_hf("P-hint: rr-enforced\r\n"); </p>
<p>route(1);</p>
<p>exit;</p>
<p>};</p>
<p> </p>
<p>if (!uri==myself) {</p>
<p># mark routing logic in request</p>
<p>append_hf("P-hint: outbound\r\n"); </p>
<p>route(1);</p>
<p>exit;</p>
<p>};</p>
<p># if the request is for other domain use UsrLoc</p>
<p># (in case, it does not work, use the following command</p>
<p># with proper names and addresses in it)</p>
<p>if (uri==myself) </p>
<p>{</p>
<p>if (is_method("REGISTER")) </p>
<p>{</p>
<p># Uncomment this if you want to use digest authentication</p>
<p>#if (!www_authorize("<a href="http://siphub.org">siphub.org</a>", "subscriber")) {</p>
<p># www_challenge("<a href="http://siphub.org">siphub.org</a>", "0");</p>
<p># return;</p>
<p>#};</p>
<p>save("location");</p>
<p>exit;</p>
<p>};</p>
<p> </p>
<p># native SIP destinations are handled using our USRLOC DB</p>
<p>if (!lookup("location")) </p>
<p>{</p>
<p># Local Device Not Found Send To Gateway</p>
<p>rewritehostport("<gateway>:5065");</p>
<p>}</p>
<p>};</p>
<p>append_hf("P-hint: usrloc applied\r\n"); </p>
<p>route(1);</p>
<p>}</p>
<p>route[1] </p>
<p>{</p>
<p># !! Nathelper</p>
<p># if (uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" && !search("^Route:"))</p>
<p># {</p>
<p># sl_send_reply("479", "We don't forward to private IP addresses");</p>
<p># exit;</p>
<p># };</p>
<p># NAT processing of replies; apply to all transactions (for example,</p>
<p># re-INVITEs from public to private UA are hard to identify as</p>
<p># NATed at the moment of request processing); look at replies</p>
<p>t_on_reply("1");</p>
<p># send it out now; use stateful forwarding as it works reliably</p>
<p># even for UDP2TCP</p>
<p>if (!t_relay()) {</p>
<p>sl_reply_error();</p>
<p>};</p>
<p>}</p>
<p># !! Nathelper</p>
<p>onreply_route[1] </p>
<p>{</p>
<p>if (nat_uac_test("31"))</p>
<p>{</p>
<p># Allow RR-ed requests, as these may indicate that</p>
<p># a NAT-enabled proxy takes care of it; unless it is</p>
<p># a REGISTER</p>
<p>xlog("Reply Behind a NAT");</p>
<p>fix_nated_contact();</p>
<p></p>
<p>force_rport(); # Add rport parameter to topmost Via</p>
<p>#setbflag(6); # Mark as NATed</p>
<p>};</p>
<p>}</p></span></div>
<div> </div>