<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi all<br><br>i set up rtpproxy run in same machine with opensips<br><br>my network topology:<br>ip phone1 (192.168.1.6) --------(192.168.1.248)opensips(172.26.0.2)-------(172.26.0.100)ip phone 2<br><br>media :<br>ip phone1 (192.168.1.6) --------(192.168.1.248)rtpproxy(172.26.0.2)-------(172.26.0.100)ip phone 2<br><br>i start rtpproxy : <br>rtpproxy -l 172.26.0.2/192.168.1.248 -f -F -s udp:127.0.0.1:22222 -d DBUG:LOG_LOCAL7<br><br>the IP Phone 2 call IP Phone 1 and i did successfull on signaling + media <br>when i disconnect the call i didnt see the command tear down the media session on rtpproxy<br> <br>it is normal or i mis-config the opensips.cfg, please help<br><br><br>Thank you<br>Ha<br><br>here is my opensips.cfg:<br>
# ----------- global configuration parameters ------------------------<br>
debug=9 # debug level (cmd line: -dddddddddd)<br>
fork=yes<br>
log_facility=LOG_LOCAL7<br>
log_stderror=no # (cmd line: -E)<br>
children=4<br>
port=5060<br>
<br>
# ------------------ module loading ----------------------------------<br>
#set module path<br>
mpath="/usr/local/lib/opensips/modules/"<br>
loadmodule "db_mysql.so"<br>
loadmodule "signaling.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 "mi_fifo.so"<br>
loadmodule "uri.so"<br>
loadmodule "xlog.so"<br>
loadmodule "nathelper.so"<br>
#loadmodule "snmpstats.so"<br>
<br>
# ----------------- setting module-specific parameters ---------------<br>
# -- mi_fifo params --<br>
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")<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>
modparam("usrloc", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")<br>
modparam("usrloc", "db_mode", 2)<br>
<br>
# -- rr params --<br>
# add value to ;lr param to make some broken UAs happy<br>
modparam("rr", "enable_full_lr", 1)<br>
modparam("nathelper", "rtpproxy_sock", "udp:127.0.0.1:22222")<br>
modparam("nathelper", "nortpproxy_str", "")<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 UIEc0,18,4,97,9,2,15,8,101 09d614a45c92f2b0@172.26.0.100 172.26.0.100 2908 824bcd8bb5ba14fa;1"<br>INFO:handle_command: new session 09d614a45c92f2b0@172.26.0.100, tag 824bcd8bb5ba14fa;1 requested, type strong<br>INFO:handle_command: new session on a port 48190 created, tag 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 09d614a45c92f2b0@172.26.0.100 192.168.1.6 17206 824bcd8bb5ba14fa;1 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 caller, 561 relayed, 0 dropped<br>INFO:remove_session: RTCP stats: 1 in from callee, 0 in from caller, 1 relayed, 0 dropped<br>INFO:remove_session: session on ports 48190/42508 is cleaned up<br><br><br></td></tr></table><br>