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