<span class="ppt" id="_user_users@lists.openser.org"><font size="2">
<p>Hi everybody,</p>
<p>I&#39;m working with Openser + Mediaproxy 1.9.0 and it seems that everything is working when the calls are establised between users attached to the same proxy server, even with different kind of NATs.</p>
<p>However It doen&#39;t work in 2 different scenarios, and the result is exactly the same , the video and audio is only sent in one way.</p>
<p>Scenario 1</p>
<p>========</p>
<p>User A attached to the SIP proxy xxx.xxx.xxx.13 (Public IP) calls to a GW xxx.xxx.xxx.11 (Public IP) with several users internally associated. In this case the user A can see the video and audio sent by the GW, but the GW doesn&#39;t receive any RTSP stream. It seems that the mediaproxy doesn&#39;t do anything, why? maybe because the GW blongs to other domain (
xxx.xxx.xxx.11) ? What can I do?</p>
<p>If the GW calls to user A, it works fine (I can see the session in the mediaproxy with sessions.py)</p>
<p>&nbsp;</p>
<p>Scenario 2</p>
<p>========</p>
<p>In this case, I have another GW with Public IP address xxx.xxx.xxx.14, but it doesn&#39;t include in the INVITE message the SDP body. The GW calls to the same user attached to the SIP proxy xxx.xxx.xxx.13 , and the behaviour is exactly the same as scenario 1, the calling site can sse the video and audio but the called can&#39;t.
</p>
<p>Unlike the previous scenario, the signalling is:</p>
<p>INVITE without SDP --&gt; 200 OK (SDP) -- &gt; ACK (SDP)</p>
<p>In theory, Mediaproxy 1.9.0 should support this procedure since it&#39;s a SIP standard mechanism, however the called party doesn&#39;t receive RTP stream. In my opinion, the problem could be related to scenario 1, I mean , the calling party is not attached to the SIP proxy (belongs to other domain) and when the 200 OK (SDP) message arrives to the SIP proxy, the mediaproxy doesn&#39;t do anything
</p>
<p>Sorry for the complex explanation. I&#39;ve waste a lot of time trying to solve this solution and honestly I don&#39;t know what to do. Please, could somebody help??</p>
<p>I attach my openser.conf. I hope it helps.</p>
<p>Andreti</p>
<p>&nbsp;</p>
<p>&nbsp;</p></font><font face="Courier New" size="2">
<p>debug=5 # debug level (cmd line: -dddddddddd)</p>
<p>#fork=yes</p>
<p>#log_stderror=no # (cmd line: -E)</p>
<p>log_facility=LOG_LOCAL0</p>
<p></p>
<p># Uncomment these lines to enter debugging mode</p>
<p>#fork=no</p>
<p></p>
<p>log_stderror=yes</p>
<p></p>
<p>listen=xxx.xxx.10.12</p>
<p></p>
<p>check_via=no # (cmd. line: -v)</p>
<p>dns=no # (cmd. line: -r)</p>
<p>rev_dns=no # (cmd. line: -R)</p>
<p>#port=5060</p>
<p>#children=4</p>
<p>fifo=&quot;/tmp/openser_fifo&quot;</p>
<p>fifo_db_url=&quot;mysql://openser:openserrw@localhost/openser&quot;</p>
<p></p>
<p># ------------------ module loading ----------------------------------</p>
<p>mpath = &quot;/usr/local/lib/openser/modules/&quot;</p>
<p></p>
<p># Uncomment this if you want to use SQL database</p>
<p>loadmodule &quot;mysql.so&quot;</p>
<p>loadmodule &quot;domain.so&quot;</p>
<p>loadmodule &quot;mediaproxy.so&quot;</p>
<p>loadmodule &quot;uri_db.so&quot;</p>
<p>loadmodule &quot;sl.so&quot;</p>
<p>loadmodule &quot;tm.so&quot;</p>
<p>loadmodule &quot;rr.so&quot;</p>
<p>loadmodule &quot;maxfwd.so&quot;</p>
<p>loadmodule &quot;usrloc.so&quot;</p>
<p>loadmodule &quot;registrar.so&quot;</p>
<p>loadmodule &quot;textops.so&quot;</p>
<p>loadmodule &quot;avpops.so&quot;</p>
<p>loadmodule &quot;uri.so&quot;</p>
<p>loadmodule &quot;xlog.so&quot;</p>
<p>loadmodule &quot;acc.so&quot;</p>
<p>loadmodule &quot;auth_radius.so&quot;</p>
<p>loadmodule &quot;group_radius.so&quot;</p>
<p>loadmodule &quot;avp_radius.so&quot;</p>
<p>loadmodule &quot;nathelper.so&quot;</p>
<p>&nbsp;</p>
<p># Uncomment this if you want digest authentication</p>
<p># mysql.so must be loaded !</p>
<p></p>
<p>loadmodule &quot;auth.so&quot;</p>
<p>loadmodule &quot;auth_db.so&quot;</p>
<p></p>
<p># ----------------- setting module-specific parameters ---------------</p>
<p># -- usrloc params --</p>
<p>#modparam(&quot;usrloc&quot;, &quot;db_mode&quot;, 0)</p>
<p># Uncomment this if you want to use SQL database</p>
<p># for persistent storage and comment the previous line</p>
<p></p>
<p>modparam(&quot;usrloc&quot;, &quot;db_mode&quot;, 2)</p>
<p>modparam(&quot;usrloc&quot;, &quot;timer_interval&quot;, 20)</p>
<p># -- auth params --</p>
<p># Uncomment if you are using auth module</p>
<p>#</p>
<p></p>
<p>modparam(&quot;auth_db&quot;, &quot;calculate_ha1&quot;, yes)</p>
<p>#</p>
<p># If you set &quot;calculate_ha1&quot; parameter to yes (which true in this config),</p>
<p># uncomment also the following parameter)</p>
<p>#</p>
<p></p>
<p>modparam(&quot;auth_db&quot;, &quot;password_column&quot;, &quot;password&quot;)</p>
<p># -- acc params --</p>
<p>modparam(&quot;acc&quot;, &quot;radius_flag&quot;, 1)</p>
<p>modparam(&quot;acc&quot;, &quot;radius_missed_flag&quot;, 1)</p>
<p>#cambio 16_04_07 modparam(&quot;acc&quot;, &quot;radius_missed_flag&quot;, 2)</p>
<p>modparam(&quot;acc&quot;, &quot;log_flag&quot;, 1)</p>
<p>modparam(&quot;acc&quot;, &quot;log_missed_flag&quot;, 1)</p>
<p>modparam(&quot;acc&quot;, &quot;service_type&quot;, 15)</p>
<p>modparam(&quot;acc|auth_radius|group_radius|avp_radius&quot;, &quot;radius_config&quot;,</p>
<p>&quot;/usr/local/etc/radiusclient-ng/radiusclient.conf&quot;)</p>
<p>#modparam(&quot;acc&quot;, &quot;radius_extra&quot;, &quot;Sip-Src-IP=$si;Sip-Src-Port=$sp&quot;)</p>
<p>#puesto para el CDRTool</p>
<p>modparam(&quot;acc&quot;, &quot;failed_transaction_flag&quot;, 1)</p>
<p>modparam(&quot;acc&quot;, &quot;report_cancels&quot;, 0)</p>
<p>modparam(&quot;acc&quot;, &quot;report_ack&quot;, 0)</p>
<p>modparam(&quot;acc&quot;, &quot;early_media&quot;, 0)</p>
<p>modparam(&quot;acc&quot;, &quot;log_level&quot;, 1)</p>
<p>#modparam(&quot;acc&quot;, &quot;radius_config&quot;, &quot;/etc/openser/radius/client.conf&quot;)</p>
<p>modparam(&quot;acc&quot;, &quot;radius_extra&quot;, &quot;Sip-Src-IP=$si;Sip-Src-Port=$sp;\</p>
<p>Sip-RPid=$avp(s:rpid); \</p>
<p>Source-IP=$si; \</p>
<p>Source-Port=$sp; \</p>
<p>Canonical-URI=$avp($can_uri); \</p>
<p>Billing-Party=$avp($billing_party); \</p>
<p>Divert-Reason=$avp(s:divert_reason); \</p>
<p>X-RTP-Stat=$avp(s:rtp_statistics); \</p>
<p>From-Header=$hdr(from); \</p>
<p>User-Agent=$hdr(user-agent); \</p>
<p>Contact=$hdr(contact); \</p>
<p>Event=$hdr(event)&quot;) </p>
<p># SIP-Proxy-IP=$avp(s:sip_proxy_ip)&quot;)</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p># -- group_radius params --</p>
<p>modparam(&quot;group_radius&quot;, &quot;use_domain&quot;, 1)</p>
<p># -- avpops params --</p>
<p>#modparam(&quot;avpops&quot;, &quot;avp_aliases&quot;, &quot;day=i:101;time=i:102&quot;)</p>
<p>modparam(&quot;avpops&quot;,&quot;avp_aliases&quot;,&quot;can_uri=i:34&quot;)</p>
<p>modparam(&quot;avpops&quot;,&quot;avp_aliases&quot;,&quot;billing_party=i:1&quot;)</p>
<p>&nbsp;</p>
<p># -- rr params --</p>
<p># add value to ;lr param to make some broken UAs happy</p>
<p>modparam(&quot;rr&quot;, &quot;enable_full_lr&quot;, 1)</p>
<p></p>
<p>modparam(&quot;mediaproxy&quot;, &quot;natping_interval&quot;, 60)</p>
<p>modparam(&quot;registrar&quot;, &quot;nat_flag&quot;, 2)</p>
<p></p>
<p># ------------------------- request routing logic -------------------</p>
<p># main routing logic</p>
<p></p>
<p>route{</p>
<p></p>
<p># initial sanity checks -- messages with</p>
<p># max_forwards==0, or excessively long requests</p>
<p>if (!mf_process_maxfwd_header(&quot;10&quot;)) {</p>
<p>sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);</p>
<p>exit;</p>
<p>};</p>
<p>if (msg:len &gt;= 2048 ) {</p>
<p>sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);</p>
<p>exit;</p>
<p>};</p>
<p></p>
<p></p>
<p># setflag(ACCOUNTING_FLAG);</p>
<p># avp_write(&quot;SER_IP&quot;,&quot;$avp(s:sip-proxy)&quot;);</p>
<p># avp_write(&quot;$ru&quot;, &quot;$avp(can_uri)&quot;);</p>
<p># we record-route all messages -- to make sure that</p>
<p># subsequent messages will go through our proxy; that&#39;s</p>
<p># particularly good if upstream and downstream entities</p>
<p># use different transport protocol</p>
<p>if (!method==&quot;REGISTER&quot;) record_route();</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(&quot;P-hint: rr-enforced\r\n&quot;);</p>
<p>if(is_method(&quot;BYE&quot;))</p>
<p>{ # log it all the time</p>
<p>acc_rad_request(&quot;200 ok&quot;);</p>
<p>acc_log_request(&quot;200 ok&quot;);</p>
<p>setflag(1);</p>
<p>}</p>
<p>route(1);</p>
<p>};</p>
<p>if (src_ip==<a href="http://193.36.177.227">193.36.177.227</a>) {</p>
<p>fix_nated_sdp(&quot;2&quot;);</p>
<p>};</p>
<p>if(is_method(&quot;INVITE&quot;) &amp;&amp; !has_totag())</p>
<p>{ # set the acc flags</p>
<p>setflag(1);</p>
<p>setflag(2);</p>
<p>};</p>
<p>if (method==&quot;MESSAGE&quot;) {</p>
<p>setflag(1); </p>
<p>};</p>
<p>if (!uri==myself) {</p>
<p># mark routing logic in request</p>
<p>append_hf(&quot;P-hint: outbound\r\n&quot;);</p>
<p>route(1);</p>
<p>};</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 (method==&quot;REGISTER&quot;) {</p>
<p># Uncomment this if you want to use digest authentication</p>
<p># if (!www_authorize(&quot;<a href="http://sip.com">sip.com</a>&quot;, &quot;subscriber&quot;)) {</p>
<p># www_challenge(&quot;<a href="http://sip.com">sip.com</a>&quot;, &quot;0&quot;);</p>
<p># exit;</p>
<p># };</p>
<p>if (!radius_www_authorize(&quot;&quot;))</p>
<p>{</p>
<p>www_challenge(&quot;&quot;,&quot;1&quot;);</p>
<p>exit;</p>
<p>} </p>
<p>if (client_nat_test(&quot;3&quot;)) {</p>
<p>setflag(2);</p>
<p>force_rport();</p>
<p>fix_contact();</p>
<p>};</p>
<p></p>
<p>save(&quot;location&quot;);</p>
<p>exit;</p>
<p></p>
<p>};</p>
<p></p>
<p>lookup(&quot;aliases&quot;);</p>
<p>if (!uri==myself) {</p>
<p>append_hf(&quot;P-hint: outbound alias\r\n&quot;);</p>
<p>route(1);</p>
<p>};</p>
<p></p>
<p># native SIP destinations are handled using our USRLOC DB</p>
<p>if (!lookup(&quot;location&quot;)) {</p>
<p># log to acc as missed call</p>
<p>acc_rad_request(&quot;404 Not Found&quot;);</p>
<p>acc_log_request(&quot;404 Not Found&quot;);</p>
<p>sl_send_reply(&quot;404&quot;, &quot;Not Found&quot;);</p>
<p>exit;</p>
<p>};</p>
<p>};</p>
<p></p>
<p>if (method==&quot;INVITE&quot;) {</p>
<p>t_on_failure(&quot;1&quot;);</p>
<p>} else if (method == &quot;BYE&quot; || method == &quot;CANCEL&quot;) {</p>
<p>end_media_session();</p>
<p>};</p>
<p></p>
<p>if (loose_route()) {</p>
<p>if (method==&quot;INVITE&quot; || method==&quot;ACK&quot;) {</p>
<p>use_media_proxy();</p>
<p>};</p>
<p>#if ((method==&quot;INVITE&quot; || method==&quot;ACK&quot;) &amp;&amp; !to_uri==&quot;<a href="mailto:sip:frog1@xxx.xxx.10.12">sip:frog1@xxx.xxx.10.12</a>&quot;) {</p>
<p># use_media_proxy();</p>
<p>#};</p>
<p>t_relay();</p>
<p>return;</p>
<p>};</p>
<p></p>
<p>if (client_nat_test(&quot;3&quot;) &amp;&amp; !search(&quot;^Record-Route:&quot;)) {</p>
<p># Mark as NAT&#39;ed</p>
<p>force_rport();</p>
<p>fix_contact();</p>
<p>};</p>
<p></p>
<p>if (method==&quot;INVITE&quot;) {</p>
<p>t_on_reply(&quot;1&quot;);</p>
<p>};</p>
<p></p>
<p>if (method==&quot;INVITE&quot; || method==&quot;ACK&quot;) {</p>
<p>use_media_proxy();</p>
<p>};</p>
<p>#if ((method==&quot;INVITE&quot; || method==&quot;ACK&quot;) &amp;&amp; !to_uri==&quot;<a href="mailto:sip:frog1@xxx.xxx.10.12">sip:frog1@xxx.xxx.10.12</a>&quot;) {</p>
<p># use_media_proxy();</p>
<p>#};</p>
<p></p>
<p>if (!t_relay()) {</p>
<p>if (method==&quot;INVITE&quot; || method==&quot;ACK&quot;) {</p>
<p>end_media_session();</p>
<p>};</p>
<p>sl_reply_error();</p>
<p>};</p>
<p></p>
<p>append_hf(&quot;P-hint: usrloc applied\r\n&quot;);</p>
<p># route(1);</p>
<p></p>
<p>}</p>
<p></p>
<p>route[1]</p>
<p>{</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>exit;</p>
<p>}</p>
<p></p>
<p>failure_route[1] {</p>
<p>end_media_session();</p>
<p>}</p>
<p></p>
<p>onreply_route[1] {</p>
<p>if (status=~&quot;(183)|(2[0-9][0-9])&quot;) {</p>
<p>if (client_nat_test(&quot;1&quot;)) {</p>
<p>fix_contact();</p>
<p>};</p>
<p>use_media_proxy();</p>
<p>};</p>
<p>}</p></font></span>