Hi Bogdan Thank you for the tip :)
--- On Tue, 12/29/09, Bogdan-Andrei Iancu <[email protected]> wrote: From: Bogdan-Andrei Iancu <[email protected]> Subject: Re: [OpenSIPS-Users] Need help Nathelper + rtpproxy To: "OpenSIPS users mailling list" <[email protected]> Date: Tuesday, December 29, 2009, 7:42 AM Hi Ha, You need to call unforce_rtp_proxy() when BYE is received. Regards, Bogdan > # ------------------------- request routing logic ------------------- > > # main routing logic > route{ > # initial sanity checks -- messages with > # max_forwards==0, or excessively long requests > if (!mf_process_maxfwd_header("10")) { > sl_send_reply("483","Too Many Hops"); > exit; > }; > > if (msg:len >= 2048 ) { > sl_send_reply("513", "Message too big"); > exit; > }; > > # we record-route all messages -- to make sure that > # subsequent messages will go through our proxy; that's > # particularly good if upstream and downstream entities > # use different transport protocol > if (!method=="REGISTER") > record_route(); > # subsequent messages withing a dialog should take the > # path determined by record-routing > if (loose_route()) { > # mark routing logic in request > append_hf("P-hint: rr-enforced\r\n"); > route(1); > }; > > if (!uri==myself) { > # mark routing logic in request > append_hf("P-hint: outbound\r\n"); > route(1); > }; > > # if the request is for other domain use UsrLoc > # (in case, it does not work, use the following command > # with proper names and addresses in it) > if (uri==myself) { > if (method=="REGISTER") { > save("location"); > exit; > }; > } > # native SIP destinations are handled using our USRLOC DB > if(method=="INVITE"){ > if (dst_ip == 192.168.1.248) > force_rtp_proxy("oei"); > if (dst_ip == 172.26.0.2) > force_rtp_proxy("oie"); > t_on_reply("1"); > }; > if (is_method("BYE")) > unforce_rtp_proxy(); > > if (!lookup("location","m")) { > switch ($retcode) { > case -1: > case -3: > t_newtran(); > t_on_failure("1"); > t_reply("404", "Not Found"); > exit; > case -2: > sl_send_reply("405", "Method Not Allowed"); > exit; > } > } > route(1); > } > route[1] { > # send it out now; use stateful forwarding as it works > # reliably even for UDP2TCP > failure_route[1]; > if (!t_relay()) { > sl_reply_error(); > }; > exit; > } > onreply_route[1]{ > if (status=="200"){ > if(dst_ip == 172.26.0.2) > force_rtp_proxy("oie"); > if(dst_ip == 192.168.1.248) > force_rtp_proxy("oei"); > } > } > > failure_route[1]{ > unforce_rtp_proxy(); > } > > > > when i make call and check on rtpproxy debug and see the rtpproxy debug : > > DBUG:handle_command: received command "18781_4 > UIEc0,18,4,97,9,2,15,8,101 [email protected] 172.26.0.100 > 2908 824bcd8bb5ba14fa;1" > INFO:handle_command: new session [email protected], tag > 824bcd8bb5ba14fa;1 requested, type strong > INFO:handle_command: new session on a port 48190 created, tag > 824bcd8bb5ba14fa;1 > INFO:handle_command: pre-filling caller's address with 172.26.0.100:2908 > DBUG:doreply: sending reply "18781_4 48190 192.168.1.248 > " > DBUG:handle_command: received command "18780_4 LEIc0,101 > [email protected] 192.168.1.6 17206 824bcd8bb5ba14fa;1 > 49ee0e488eccead5;1" > INFO:handle_command: lookup on ports 48190/42508, session timer restarted > INFO:handle_command: pre-filling callee's address with 192.168.1.6:17206 > DBUG:doreply: sending reply "18780_4 42508 172.26.0.2 > " > INFO:process_rtp: session timeout > INFO:remove_session: RTP stats: 238 in from callee, 323 in from > caller, 561 relayed, 0 dropped > INFO:remove_session: RTCP stats: 1 in from callee, 0 in from caller, 1 > relayed, 0 dropped > INFO:remove_session: session on ports 48190/42508 is cleaned up > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Bogdan-Andrei Iancu www.voice-system.ro _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
