<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi, Bogdan:<br><br>I will try ngrep and tcpdump.<br><br>But I am quite sure it is mediaproxy problem, since I can print out all<br>the debug message by linphonec.<br><br>If I enable mediaproxy, the linphone doesn't print any thing since it doesn't get message from opensips.<br>Once I kill mediaproxy, the linphone gets and prints out all the communication which is correct.<br><br>George Wu <br><br></div><br><br><br><br><br><br><div></div><div id="divNeteaseMailCard"></div><br>At 2014-10-15 20:46:02, "Bogdan-Andrei Iancu" <bogdan@opensips.org> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="moz-cite-prefix"><tt>Hi George,<br>
<br>
Not sure if a media relay process has anything to do with the
ability to send traffic to an UAC - do you actually see with
ngrep/tcpdump the request (on the network level) sent by
opensips to the UAC ?<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
On 15.10.2014 15:06, george wu wrote:<br>
</div>
<blockquote cite="mid:46185c1e.103bc.14913b36612.Coremail.aihuawu2012@163.com" type="cite">
<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">
<div>Hi, Bogdan:<br>
<br>
I think I have found the problem.<br>
I am using mediaproxy. If I kill that proxy.<br>
suddenly the uac can get the message.<br>
So it is quite obvious that my mediaproxy setting is not
correct.<br>
Just I don't know how to fix it. I modify it from my old
rtpproxy setting.<br>
<br>
<br>
George<br>
</div>
<br>
<div>/////////////////////<br>
<br>
<br>
#### NAT modules<br>
loadmodule "nathelper.so"<br>
modparam("nathelper", "natping_interval", 10)<br>
modparam("nathelper", "ping_nated_only", 1)<br>
modparam("nathelper", "received_avp", "$avp(received_nh)")<br>
<br>
#loadmodule "rtpproxy.so"<br>
#modparam("rtpproxy", "rtpproxy_sock", "udp:localhost:12221")
# CUSTOMIZE ME<br>
<br>
loadmodule "mediaproxy.so"<br>
modparam("mediaproxy", "mediaproxy_socket",
"/var/run/mediaproxy/dispatcher.sock")<br>
modparam("mediaproxy", "ice_candidate", "low-priority")<br>
<br>
<br>
<br>
</div>
<br>
####### Routing Logic ########<br>
<br>
# main request routing logic<br>
<br>
route{<br>
force_rport();<br>
if (nat_uac_test("23")) {<br>
if (is_method("REGISTER")) {<br>
fix_nated_register();<br>
setbflag(NAT);<br>
} else {<br>
fix_nated_contact();<br>
setflag(NAT);<br>
}<br>
}<br>
<br>
<br>
if (!mf_process_maxfwd_header("10")) {<br>
sl_send_reply("483","Too Many Hops");<br>
exit;<br>
}<br>
<br>
if (has_totag()) {<br>
# sequential request withing a dialog should<br>
# take the path determined by record-routing<br>
if (loose_route()) {<br>
<br>
if (is_method("BYE")) {<br>
setflag(ACC_DO); # do accounting ...<br>
setflag(ACC_FAILED); # ... even if the
transaction fails<br>
} else if (is_method("INVITE")) {<br>
# even if in most of the cases is useless, do RR
for<br>
# re-INVITEs alos, as some buggy clients do
change route set<br>
# during the dialog.<br>
record_route();<br>
}<br>
<br>
if (check_route_param("nat=yes")) <br>
setflag(NAT);<br>
<br>
# route it out to whatever destination was set by
loose_route()<br>
# in $du (destination URI).<br>
route(relay);<br>
} else {<br>
<br>
if ( is_method("ACK") ) {<br>
if ( t_check_trans() ) {<br>
# non loose-route, but stateful ACK; must be
an ACK after <br>
# a 487 or e.g. 404 from upstream server<br>
t_relay();<br>
exit;<br>
} else {<br>
# ACK without matching transaction -><br>
# ignore and discard<br>
exit;<br>
}<br>
}<br>
sl_send_reply("404","Not here");<br>
}<br>
exit;<br>
}<br>
<br>
# CANCEL processing<br>
if (is_method("CANCEL"))<br>
{<br>
if (t_check_trans())<br>
t_relay();<br>
exit;<br>
}<br>
<br>
t_check_trans();<br>
<br>
if ( !(is_method("REGISTER") ) ) {<br>
<br>
if (from_uri==myself)<br>
<br>
{<br>
<br>
} else {<br>
# if caller is not local, then called number must be
local<br>
<br>
if (!uri==myself) {<br>
send_reply("403","Rely forbidden");<br>
exit;<br>
}<br>
}<br>
<br>
}<br>
<br>
# preloaded route checking<br>
if (loose_route()) {<br>
xlog("L_ERR",<br>
"Attempt to route with preloaded Route's
[$fu/$tu/$ru/$ci]");<br>
if (!is_method("ACK"))<br>
sl_send_reply("403","Preload Route denied");<br>
exit;<br>
}<br>
<br>
# record routing<br>
if (!is_method("REGISTER|MESSAGE"))<br>
record_route();<br>
<br>
# account only INVITEs<br>
if (is_method("INVITE")) {<br>
<br>
setflag(ACC_DO); # do accounting<br>
}<br>
<br>
<br>
if (!uri==myself) {<br>
append_hf("P-hint: outbound\r\n"); <br>
<br>
# if you have some interdomain connections via TLS<br>
## CUSTOMIZE IF NEEDED<br>
##if ($rd=="tls_domain1.net"<br>
## || $rd=="tls_domain2.net"<br>
##) {<br>
## force_send_socket(tls:127.0.0.1:5061); # CUSTOMIZE<br>
##}<br>
<br>
route(relay);<br>
}<br>
<br>
# requests for my domain<br>
<br>
if (is_method("PUBLISH|SUBSCRIBE"))<br>
{<br>
sl_send_reply("503", "Service Unavailable");<br>
exit;<br>
}<br>
<br>
if (is_method("REGISTER"))<br>
{<br>
<br>
<br>
if ( proto==TCP || proto==TLS || 0 )
setflag(TCP_PERSISTENT);<br>
<br>
if (!save("location"))<br>
sl_reply_error();<br>
<br>
exit;<br>
}<br>
<br>
if ($rU==NULL) {<br>
# request with no Username in RURI<br>
sl_send_reply("484","Address Incomplete");<br>
exit;<br>
}<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
# do lookup with method filtering<br>
if (!lookup("location","m")) {<br>
<br>
<br>
t_newtran();<br>
t_reply("404", "Not Found");<br>
exit;<br>
} <br>
<br>
if (isbflagset(NAT)) setflag(NAT);<br>
<br>
# when routing via usrloc, log the missed calls also<br>
setflag(ACC_MISSED);<br>
route(relay);<br>
}<br>
<br>
<br>
route[relay] {<br>
# for INVITEs enable some additional helper routes<br>
if (is_method("INVITE")) {<br>
<br>
if (isflagset(NAT)) {<br>
# rtpproxy_offer("ro");<br>
use_media_proxy();<br>
<br>
}<br>
<br>
t_on_branch("per_branch_ops");<br>
t_on_reply("handle_nat");<br>
t_on_failure("missed_call");<br>
}<br>
if (is_method("BYE")) {<br>
if (isflagset(NAT)) {<br>
end_media_session();<br>
}<br>
}<br>
<br>
<br>
if (isflagset(NAT)) {<br>
add_rr_param(";nat=yes");<br>
}<br>
<br>
if (!t_relay()) {<br>
send_reply("500","Internal Error");<br>
};<br>
exit;<br>
}<br>
<br>
<br>
<br>
<br>
branch_route[per_branch_ops] {<br>
xlog("new branch at $ru\n");<br>
}<br>
<br>
<br>
onreply_route[handle_nat] {<br>
if (nat_uac_test("1"))<br>
fix_nated_contact();<br>
# if ( isflagset(NAT) )<br>
# rtpproxy_answer("ro");<br>
if (is_method("INVITE")) {<br>
if (isflagset(NAT)) {<br>
use_media_proxy();<br>
}<br>
}<br>
if (is_method("BYE")) {<br>
if (isflagset(NAT)) {<br>
end_media_session();<br>
}<br>
}<br>
<br>
xlog("incoming reply\n");<br>
}<br>
<br>
<br>
failure_route[missed_call] {<br>
if (t_was_cancelled()) {<br>
exit;<br>
}<br>
<br>
# uncomment the following lines if you want to block client
<br>
# redirect based on 3xx replies.<br>
##if (t_check_status("3[0-9][0-9]")) {<br>
##t_reply("404","Not found");<br>
## exit;<br>
##}<br>
<br>
<br>
}<br>
<br>
<br>
</div></blockquote><br></blockquote></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>