opensips.cfg modified for msrp?

classic Classic list List threaded Threaded
2 messages Options
bll
Reply | Threaded
Open this post in threaded view
|

opensips.cfg modified for msrp?

bll
Hello,

Until now we had a working audio and page based chat solution with NAT traversal and ICE support. 
Now we installed the MSRPRelay on the same machine and we were able to run successful the msrp test application (file tranfer demo) from inside the machine.
But trying from outside doesn't work and we see "failure route at sip:test1@192.168.4.182:53481;transport=udp#012 with rcode=0 rreason="
error message in the opensips.log. We were trying from outside with Blink Lite and Boghe.

The question is: should we modify/update the opensips.cfg for have the MSRPRelay working?

See below the relevant fragments from our .cfg file 

Thank you,
Liviu


#---- NAT Detection ----#

force_rport();
if (nat_uac_test("19")) {
if (method=="REGISTER") {
fix_nated_register();
} else {
append_hf("P-Hint:fix_nated_contact applied\r\n");
# change the contact information from the private address to the 
# public address when a request is behind NAT
fix_nated_contact();
}
setflag(5); # caller behind NAT
}

if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
if (is_method("BYE")) {
setflag(1); # do accounting ...
setflag(3); # ... even if the transaction fails
} else if (is_method("INVITE")) {
# even if in most of the cases is useless, do RR for
# re-INVITEs alos, as some buggy clients do change route set
# during the dialog.
record_route();
}
# route it out to whatever destination was set by loose_route()
# in $du (destination URI).
route(1);
} else {
/* uncomment the following lines if you want to enable presence */
if (is_method("SUBSCRIBE")) {
# in-dialog subscribe requests
route(2);
exit;
}
if ( is_method("ACK") ) {
if ( t_check_trans() ) {
# non loose-route, but stateful ACK; must be an ACK after 
# a 487 or e.g. 404 from upstream server
t_relay();
exit;
} else {
# ACK without matching transaction ->
# ignore and discard
exit;
}
}
sl_send_reply("404","Not here");
}
exit;
}


#Route for user lookups
route[3]{
if (!lookup("location", "m")) {
switch ($retcode) {
case -1:
case -3:
t_newtran();
t_reply("404", "Not Found");
exit;
case -2:
sl_send_reply("405", "Method Not Allowed");
exit;
}
}
# when routing via usrloc, log the missed calls also
setflag(2);
route(1);
}

#Route[6] is for NAT
route[6] {
#---- RTP Proxy handling ---#
if (is_method("BYE|CANCEL")) {
end_media_session();
} else if (is_method("INVITE")){
#---- Activates the RTP Proxy for the CALLEE ---#
$var(ret) = use_media_proxy();
if(!($var(ret) == 1)){
                  log("use_media_proxy returned $var(ret)");
}
t_on_failure("1");
};
}


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: opensips.cfg modified for msrp?

Adrian Georgescu
Hi Liviu,

Is likely that nobody will spent their own precious time to analyze your particular server configuration and what you try to do. Better provide logs and sip traces to indicate what problem you have, narrow down the scope down to a few lines and logs if you wish to get relevant feedback.

Adrian

On Nov 2, 2011, at 3:32 PM, Barsan Liviu wrote:

Hello,

Until now we had a working audio and page based chat solution with NAT traversal and ICE support. 
Now we installed the MSRPRelay on the same machine and we were able to run successful the msrp test application (file tranfer demo) from inside the machine.
But trying from outside doesn't work and we see "failure route at <a href="sip:test1@192.168.4.182:53481;transport=udp#012">sip:test1@192.168.4.182:53481;transport=udp#012 with rcode=0 rreason="
error message in the opensips.log. We were trying from outside with Blink Lite and Boghe.

The question is: should we modify/update the opensips.cfg for have the MSRPRelay working?

See below the relevant fragments from our .cfg file 

Thank you,
Liviu


#---- NAT Detection ----#

force_rport();
if (nat_uac_test("19")) {
if (method=="REGISTER") {
fix_nated_register();
} else {
append_hf("P-Hint:fix_nated_contact applied\r\n");
# change the contact information from the private address to the 
# public address when a request is behind NAT
fix_nated_contact();
}
setflag(5); # caller behind NAT
}

if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
if (is_method("BYE")) {
setflag(1); # do accounting ...
setflag(3); # ... even if the transaction fails
} else if (is_method("INVITE")) {
# even if in most of the cases is useless, do RR for
# re-INVITEs alos, as some buggy clients do change route set
# during the dialog.
record_route();
}
# route it out to whatever destination was set by loose_route()
# in $du (destination URI).
route(1);
} else {
/* uncomment the following lines if you want to enable presence */
if (is_method("SUBSCRIBE")) {
# in-dialog subscribe requests
route(2);
exit;
}
if ( is_method("ACK") ) {
if ( t_check_trans() ) {
# non loose-route, but stateful ACK; must be an ACK after 
# a 487 or e.g. 404 from upstream server
t_relay();
exit;
} else {
# ACK without matching transaction ->
# ignore and discard
exit;
}
}
sl_send_reply("404","Not here");
}
exit;
}


#Route for user lookups
route[3]{
if (!lookup("location", "m")) {
switch ($retcode) {
case -1:
case -3:
t_newtran();
t_reply("404", "Not Found");
exit;
case -2:
sl_send_reply("405", "Method Not Allowed");
exit;
}
}
# when routing via usrloc, log the missed calls also
setflag(2);
route(1);
}

#Route[6] is for NAT
route[6] {
#---- RTP Proxy handling ---#
if (is_method("BYE|CANCEL")) {
end_media_session();
} else if (is_method("INVITE")){
#---- Activates the RTP Proxy for the CALLEE ---#
$var(ret) = use_media_proxy();
if(!($var(ret) == 1)){
                  log("use_media_proxy returned $var(ret)");
}
t_on_failure("1");
};
}

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users