<span class="ppt" id="_user_users@lists.openser.org"><font size="2">
<p>Hi everybody,</p>
<p>I'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'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't receive any RTSP stream. It seems that the mediaproxy doesn'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> </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'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't.
</p>
<p>Unlike the previous scenario, the signalling is:</p>
<p>INVITE without SDP --> 200 OK (SDP) -- > ACK (SDP)</p>
<p>In theory, Mediaproxy 1.9.0 should support this procedure since it's a SIP standard mechanism, however the called party doesn'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't do anything
</p>
<p>Sorry for the complex explanation. I've waste a lot of time trying to solve this solution and honestly I don'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> </p>
<p> </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="/tmp/openser_fifo"</p>
<p>fifo_db_url="mysql://openser:openserrw@localhost/openser"</p>
<p></p>
<p># ------------------ module loading ----------------------------------</p>
<p>mpath = "/usr/local/lib/openser/modules/"</p>
<p></p>
<p># Uncomment this if you want to use SQL database</p>
<p>loadmodule "mysql.so"</p>
<p>loadmodule "domain.so"</p>
<p>loadmodule "mediaproxy.so"</p>
<p>loadmodule "uri_db.so"</p>
<p>loadmodule "sl.so"</p>
<p>loadmodule "tm.so"</p>
<p>loadmodule "rr.so"</p>
<p>loadmodule "maxfwd.so"</p>
<p>loadmodule "usrloc.so"</p>
<p>loadmodule "registrar.so"</p>
<p>loadmodule "textops.so"</p>
<p>loadmodule "avpops.so"</p>
<p>loadmodule "uri.so"</p>
<p>loadmodule "xlog.so"</p>
<p>loadmodule "acc.so"</p>
<p>loadmodule "auth_radius.so"</p>
<p>loadmodule "group_radius.so"</p>
<p>loadmodule "avp_radius.so"</p>
<p>loadmodule "nathelper.so"</p>
<p> </p>
<p># Uncomment this if you want digest authentication</p>
<p># mysql.so must be loaded !</p>
<p></p>
<p>loadmodule "auth.so"</p>
<p>loadmodule "auth_db.so"</p>
<p></p>
<p># ----------------- setting module-specific parameters ---------------</p>
<p># -- usrloc params --</p>
<p>#modparam("usrloc", "db_mode", 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("usrloc", "db_mode", 2)</p>
<p>modparam("usrloc", "timer_interval", 20)</p>
<p># -- auth params --</p>
<p># Uncomment if you are using auth module</p>
<p>#</p>
<p></p>
<p>modparam("auth_db", "calculate_ha1", yes)</p>
<p>#</p>
<p># If you set "calculate_ha1" parameter to yes (which true in this config),</p>
<p># uncomment also the following parameter)</p>
<p>#</p>
<p></p>
<p>modparam("auth_db", "password_column", "password")</p>
<p># -- acc params --</p>
<p>modparam("acc", "radius_flag", 1)</p>
<p>modparam("acc", "radius_missed_flag", 1)</p>
<p>#cambio 16_04_07 modparam("acc", "radius_missed_flag", 2)</p>
<p>modparam("acc", "log_flag", 1)</p>
<p>modparam("acc", "log_missed_flag", 1)</p>
<p>modparam("acc", "service_type", 15)</p>
<p>modparam("acc|auth_radius|group_radius|avp_radius", "radius_config",</p>
<p>"/usr/local/etc/radiusclient-ng/radiusclient.conf")</p>
<p>#modparam("acc", "radius_extra", "Sip-Src-IP=$si;Sip-Src-Port=$sp")</p>
<p>#puesto para el CDRTool</p>
<p>modparam("acc", "failed_transaction_flag", 1)</p>
<p>modparam("acc", "report_cancels", 0)</p>
<p>modparam("acc", "report_ack", 0)</p>
<p>modparam("acc", "early_media", 0)</p>
<p>modparam("acc", "log_level", 1)</p>
<p>#modparam("acc", "radius_config", "/etc/openser/radius/client.conf")</p>
<p>modparam("acc", "radius_extra", "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)") </p>
<p># SIP-Proxy-IP=$avp(s:sip_proxy_ip)")</p>
<p> </p>
<p> </p>
<p># -- group_radius params --</p>
<p>modparam("group_radius", "use_domain", 1)</p>
<p># -- avpops params --</p>
<p>#modparam("avpops", "avp_aliases", "day=i:101;time=i:102")</p>
<p>modparam("avpops","avp_aliases","can_uri=i:34")</p>
<p>modparam("avpops","avp_aliases","billing_party=i:1")</p>
<p> </p>
<p># -- rr params --</p>
<p># add value to ;lr param to make some broken UAs happy</p>
<p>modparam("rr", "enable_full_lr", 1)</p>
<p></p>
<p>modparam("mediaproxy", "natping_interval", 60)</p>
<p>modparam("registrar", "nat_flag", 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("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></p>
<p></p>
<p># setflag(ACCOUNTING_FLAG);</p>
<p># avp_write("SER_IP","$avp(s:sip-proxy)");</p>
<p># avp_write("$ru", "$avp(can_uri)");</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 (!method=="REGISTER") 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("P-hint: rr-enforced\r\n");</p>
<p>if(is_method("BYE"))</p>
<p>{ # log it all the time</p>
<p>acc_rad_request("200 ok");</p>
<p>acc_log_request("200 ok");</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("2");</p>
<p>};</p>
<p>if(is_method("INVITE") && !has_totag())</p>
<p>{ # set the acc flags</p>
<p>setflag(1);</p>
<p>setflag(2);</p>
<p>};</p>
<p>if (method=="MESSAGE") {</p>
<p>setflag(1); </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>};</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=="REGISTER") {</p>
<p># Uncomment this if you want to use digest authentication</p>
<p># if (!www_authorize("<a href="http://sip.com">sip.com</a>", "subscriber")) {</p>
<p># www_challenge("<a href="http://sip.com">sip.com</a>", "0");</p>
<p># exit;</p>
<p># };</p>
<p>if (!radius_www_authorize(""))</p>
<p>{</p>
<p>www_challenge("","1");</p>
<p>exit;</p>
<p>} </p>
<p>if (client_nat_test("3")) {</p>
<p>setflag(2);</p>
<p>force_rport();</p>
<p>fix_contact();</p>
<p>};</p>
<p></p>
<p>save("location");</p>
<p>exit;</p>
<p></p>
<p>};</p>
<p></p>
<p>lookup("aliases");</p>
<p>if (!uri==myself) {</p>
<p>append_hf("P-hint: outbound alias\r\n");</p>
<p>route(1);</p>
<p>};</p>
<p></p>
<p># native SIP destinations are handled using our USRLOC DB</p>
<p>if (!lookup("location")) {</p>
<p># log to acc as missed call</p>
<p>acc_rad_request("404 Not Found");</p>
<p>acc_log_request("404 Not Found");</p>
<p>sl_send_reply("404", "Not Found");</p>
<p>exit;</p>
<p>};</p>
<p>};</p>
<p></p>
<p>if (method=="INVITE") {</p>
<p>t_on_failure("1");</p>
<p>} else if (method == "BYE" || method == "CANCEL") {</p>
<p>end_media_session();</p>
<p>};</p>
<p></p>
<p>if (loose_route()) {</p>
<p>if (method=="INVITE" || method=="ACK") {</p>
<p>use_media_proxy();</p>
<p>};</p>
<p>#if ((method=="INVITE" || method=="ACK") && !to_uri=="<a href="mailto:sip:frog1@xxx.xxx.10.12">sip:frog1@xxx.xxx.10.12</a>") {</p>
<p># use_media_proxy();</p>
<p>#};</p>
<p>t_relay();</p>
<p>return;</p>
<p>};</p>
<p></p>
<p>if (client_nat_test("3") && !search("^Record-Route:")) {</p>
<p># Mark as NAT'ed</p>
<p>force_rport();</p>
<p>fix_contact();</p>
<p>};</p>
<p></p>
<p>if (method=="INVITE") {</p>
<p>t_on_reply("1");</p>
<p>};</p>
<p></p>
<p>if (method=="INVITE" || method=="ACK") {</p>
<p>use_media_proxy();</p>
<p>};</p>
<p>#if ((method=="INVITE" || method=="ACK") && !to_uri=="<a href="mailto:sip:frog1@xxx.xxx.10.12">sip:frog1@xxx.xxx.10.12</a>") {</p>
<p># use_media_proxy();</p>
<p>#};</p>
<p></p>
<p>if (!t_relay()) {</p>
<p>if (method=="INVITE" || method=="ACK") {</p>
<p>end_media_session();</p>
<p>};</p>
<p>sl_reply_error();</p>
<p>};</p>
<p></p>
<p>append_hf("P-hint: usrloc applied\r\n");</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=~"(183)|(2[0-9][0-9])") {</p>
<p>if (client_nat_test("1")) {</p>
<p>fix_contact();</p>
<p>};</p>
<p>use_media_proxy();</p>
<p>};</p>
<p>}</p></font></span>