[OpenSIPS-Users] Topology Hiding- ACK not going through
Royee Tichauer
royee.tichauer at vonage.com
Tue Jun 6 03:56:00 EDT 2017
Hi,
I'm having some problems when using topology hiding. In my scenario an
INVITE comes in to the opensips (SBC) instance from another opensips
instance (Proxy). It is routed to a callee which eventually answers with a
200OK. The 200 OK is routed through the SBC to the Proxy which answers back
with an ACK. This ACK is absorbed by the SBC which (by looking at the logs)
attempts to send this ACK to the private IP of the callee instead of the
the NAT IP which was originally used for the incoming INVITE.
>From the logs I see that right before I attempt to do
'topology_hiding_match()' the 'ruri=public_IP' and after the method is
called the ruri switches to 'ruri=private_IP'.
Attached is a trace, the problematic ACK is message number 53. Below is a
partial opensips.cfg file I am using with opensips 2.1:
# ----- NATHELPER -----
loadmodule "nathelper.so"
modparam("nathelper", "received_avp", "$avp(42)")
# ----- DIALOG -----
loadmodule "dialog.so"
modparam("dialog", "db_mode", 0)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "profiles_no_value", "inboundcalls")
# ----- TOPOLOGY_HIDING -----
loadmodule "topology_hiding.so"
modparam("topology_hiding", "force_dialog", 1)
modparam("topology_hiding", "th_callid_passwd", "*********")
modparam("topology_hiding", "th_contact_encode_passwd", "*****")
modparam("topology_hiding", "th_callid_prefix", "****")
route {
route(nat_checks);
route(topology_check);
.
.
.
create_dialog();
record_route();
if (!has_totag() && is_method("INVITE")) {
topology_hiding("U");
}
.
.
.
}
route[topology_check] {
force_rport();
xlog("L_INFO", "[REQUEST $ci] current ruri: $ruri");
if (has_totag()) {
if (topology_hiding_match()) {
xlog("L_INFO", "[REQUEST $ci] $rm topology_check successful match
reinvite TH_callee_callid: $TH_callee_callid ruri: $ruri");
route(relay);
} else {
xlog("L_INFO", "[REQUEST $ci] $rm topology_check Did not match this
request to a topology hiding dialog.");
if ( is_method("ACK") ) {
if ( t_check_trans() ) {
xlog("L_INFO", "[REQUEST $ci] $rm within a transaction relaying");
route(relay);
} else {
xlog("L_INFO", "[REQUEST $ci] $rm not within a transaction
exiting");
exit;
}
}
xlog("L_INFO", "[REQUEST $ci] $rm sending 404 Not Found");
send_reply("404","Not Found");
exit;
}
}
}
route[nat_checks] {
if (nat_uac_test("1")) {
xlog("L_INFO", "[REQUEST $ci] $rm fix_nated_contact()");
fix_nated_contact();
}
}
.
.
.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170606/ebea955a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: capture.pcap
Type: application/octet-stream
Size: 50784 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20170606/ebea955a/attachment-0001.obj>
More information about the Users
mailing list