<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Bogdan<br><br>Thank you for the tip :)<br><br><br>--- On <b>Tue, 12/29/09, Bogdan-Andrei Iancu <i><bogdan@voice-system.ro></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Bogdan-Andrei Iancu <bogdan@voice-system.ro><br>Subject: Re: [OpenSIPS-Users] Need help Nathelper + rtpproxy<br>To: "OpenSIPS users mailling list" <users@lists.opensips.org><br>Date: Tuesday, December 29, 2009, 7:42 AM<br><br><div class="plainMail">Hi Ha,<br><br>You need to call unforce_rtp_proxy() when BYE is received.<br><br>Regards,<br>Bogdan<br><br><br>> # ------------------------- request routing logic -------------------<br>><br>> # main routing logic<br>> route{<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>><br>> if (msg:len >= 2048 ) {<br>> sl_send_reply("513", "Message too big");<br>> exit;<br>> };<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")<br>> record_route();<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>> route(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>> if (method=="REGISTER") {<br>> save("location");<br>> exit;<br>>
};<br>> }<br>> # native SIP destinations are handled using our USRLOC DB<br>> if(method=="INVITE"){<br>> if (dst_ip == 192.168.1.248)<br>> force_rtp_proxy("oei");<br>> if (dst_ip == 172.26.0.2)<br>> force_rtp_proxy("oie");<br>> t_on_reply("1");<br>> };<br>> if (is_method("BYE"))<br>> unforce_rtp_proxy();<br>>
<br>> if (!lookup("location","m")) {<br>> switch ($retcode) {<br>> case -1:<br>> case -3:<br>> t_newtran();<br>> t_on_failure("1");<br>> t_reply("404", "Not Found");<br>> exit;<br>> case -2:<br>> sl_send_reply("405", "Method Not
Allowed");<br>> exit;<br>> }<br>> }<br>> route(1);<br>> }<br>> route[1] {<br>> # send it out now; use stateful forwarding as it works<br>> # reliably even for UDP2TCP<br>> failure_route[1];<br>> if (!t_relay()) {<br>> sl_reply_error();<br>> };<br>> exit;<br>> }<br>> onreply_route[1]{<br>> if (status=="200"){<br>> if(dst_ip
== 172.26.0.2)<br>> force_rtp_proxy("oie");<br>> if(dst_ip == 192.168.1.248)<br>> force_rtp_proxy("oei");<br>> }<br>> }<br>><br>> failure_route[1]{<br>> unforce_rtp_proxy();<br>> }<br>><br>><br>><br>> when i make call and check on rtpproxy debug and see the rtpproxy debug :<br>><br>> DBUG:handle_command: received command "18781_4 <br>> UIEc0,18,4,97,9,2,15,8,101 09d614a45c92f2b0@172.26.0.100 172.26.0.100 <br>> 2908 824bcd8bb5ba14fa;1"<br>> INFO:handle_command: new session 09d614a45c92f2b0@172.26.0.100, tag <br>> 824bcd8bb5ba14fa;1 requested, type strong<br>> INFO:handle_command: new session on a port 48190 created, tag <br>> 824bcd8bb5ba14fa;1<br>>
INFO:handle_command: pre-filling caller's address with 172.26.0.100:2908<br>> DBUG:doreply: sending reply "18781_4 48190 192.168.1.248<br>> "<br>> DBUG:handle_command: received command "18780_4 LEIc0,101 <br>> 09d614a45c92f2b0@172.26.0.100 192.168.1.6 17206 824bcd8bb5ba14fa;1 <br>> 49ee0e488eccead5;1"<br>> INFO:handle_command: lookup on ports 48190/42508, session timer restarted<br>> INFO:handle_command: pre-filling callee's address with 192.168.1.6:17206<br>> DBUG:doreply: sending reply "18780_4 42508 172.26.0.2<br>> "<br>> INFO:process_rtp: session timeout<br>> INFO:remove_session: RTP stats: 238 in from callee, 323 in from <br>> caller, 561 relayed, 0 dropped<br>> INFO:remove_session: RTCP stats: 1 in from callee, 0 in from caller, 1 <br>> relayed, 0 dropped<br>> INFO:remove_session: session on ports 48190/42508 is cleaned up<br>><br>><br>><br>>
------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> Users mailing list<br>> <a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a><br>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>> <br><br><br>-- <br>Bogdan-Andrei Iancu<br>www.voice-system.ro<br><br><br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br></div></blockquote></td></tr></table><br>