<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi,<br>
<br>
First, note that "2" is written "two", not "to" - just to be sure
people do understand your explanations :).<br>
<br>
Now, you say you still see the Client IP in the Call-ID and in the
FROM headers ?? If that is the case:<br>
<br>
1) to change the call-id, see the "C" option in the
topology_hiding() call<br>
<br>
2) The FROM hdr is outside the topology-hiding scope, but if you
want to change it see the uac_replace_from() function from the the
uac module.<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>
<div class="moz-cite-prefix">On 11/14/2017 05:49 PM, Kirill
Galinurov wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAPDUut_7UeHGMyMt45MPWQgDeAJ5QpWZnjY-fhahT6akXvdd=w@mail.gmail.com">
<div dir="ltr">Hi. All we try topology hiding module.
<div>We have opensips 2.3/2 like sbc with to interfaces.</div>
<div>And ip addresses are X.X.X.X and y.y.y.y.</div>
<div>We have to softswitch with ip addreses z.z.z.1 and z.z.z.2</div>
<div>Also we loadbalancing calls between softswitch .</div>
<div>My config</div>
<div><span style="font-family:monospace"><span
style="color:rgb(0,0,0)">if(is_method("INVITE")) {
</span><br>
create_dialog();
<br>
topology_hiding();
<br>
if
(check_address("1","$si","$sp","any","$avp(ctx)")){
<br>
force_send_socket(udp:<a
href="http://10.240.250.121:5126" moz-do-not-send="true">10.240.250.121:5126</a>);
<br>
setflag(CALL_SW);
<br>
do_accounting("log", "cdr|failed");
<br>
$dlg_val(callee) = $rU;
<br>
$dlg_val(calling) =$fU;
<br>
$dlg_val(callcount) = $var(size);
<br>
xlog("L_INFO","+++++Incoming call from $fU
$sp $proto \n");
<br>
$acc_extra(src_ip) = $si;
<br>
$acc_leg(caller) = $fU;
<br>
$acc_leg(callee) = $rU;
<br>
if(!lb_start_or_next("1","st","s")){
<br>
switch($rc){
<br>
case -1:
<br>
xlog("L_INFO","error 500 General
dispatch error\n");
<br>
send_reply("503", "No resource
avaiable");
<br>
acc_log_request("503 General
dispatch error");
<br>
break;
<br>
<br>
case -2:
<br>
xlog("L_INFO", "503 No free
resources on nodes\n");
<br>
send_reply("503", "No resource
avaible");
<br>
acc_log_request("503 No free
resource on nodes");
<br>
break;
<br>
case -3:
<br>
xlog("L_INFO","606 No nodes
avaible\n");
<br>
send_reply("503", "No resource
avaible");
<br>
acc_log_request("606 No nodes
avaible");
<br>
break;
<br>
} <br>
} else {
<br>
xlog("L_INFO","Dispatch request to
softswitch $du\n");
<br>
$avp(node) = $du;
<br>
$acc_extra(dst_node) = $du;
<br>
t_on_failure("fail_softswitch");
<br>
route(relay);
<br>
}
<br>
}
<br>
else
<br>
if
(check_address("2","$Ri","$Rp","any","$avp(ctx)")){
<br>
setflag(CALL_FROM_SW);
<br>
do_accounting("log", "cdr|failed");
<br>
$dlg_val(callee) = $rU;
<br>
$dlg_val(calling) = $fU;
<br>
$dlg_val(callcount) = $var(size);
<br>
xlog("L_INFO","+++++Outgouing call from $fU
$sp $proto \n");
<br>
$acc_extra(src_ip) = $si;
<br>
$acc_leg(caller) = $fU;
<br>
$acc_leg(callee) = $rU;
<br>
if(!lb_start_or_next("$avp(ctx)","st","s")){
<br>
switch($rc){
<br>
case -1:
<br>
xlog("L_INFO","error 500 General
dispatch error\n");
<br>
send_reply("503", "No resource
avaiable");
<br>
acc_log_request("503 General
dispatch error");
<br>
break;
<br>
<br>
case -2:
<br>
xlog("L_INFO", "503 No free
resources on operator\n");
<br>
send_reply("503", "No resource
avaible");
<br>
acc_log_request("503 No free
resource on operator");
<br>
break;
<br>
case -3:
<br>
xlog("L_INFO","606 No resources
avaible\n");
<br>
send_reply("503", "No resource
avaible");
<br>
acc_log_request("606 No nodes
avaible");
<br>
break;
<br>
} <br>
} else {
<br>
xlog("L_INFO","Dispatch request to
operator sbc $du\n");
<br>
$avp(node) = $du;
<br>
$acc_extra(dst_node) = $du;
<br>
t_on_failure("fail_operator");
<br>
route(relay);
<br>
}
<br>
}
<br>
else
<br>
sl_send_reply("403", "Forbidden posible wrong
port");
<br>
<br>
}
<br>
}<br>
In invite on softswitch i see</span></div>
<div>
<div><font face="monospace">NVITE <a class="moz-txt-link-freetext" href="sip:12345@XX.XX.XX.XX:5126">sip:12345@XX.XX.XX.XX:5126</a>
SIP/2.0</font></div>
<div><font face="monospace">Via: SIP/2.0/UDP
YY.YY.YY.YY:5126;branch=z9hG4bKe4d9.14b51d57.0</font></div>
<div><font face="monospace">Max-Forwards: 69</font></div>
<div><font face="monospace">From: "Anonymous" <<a
href="mailto:sip%3A12345@CC.CC.CC.CC"
moz-do-not-send="true">sip:12345@CC.CC.CC.CC</a>>;tag=as59cc9e35</font></div>
<div><font face="monospace">To:
<a class="moz-txt-link-rfc2396E" href="sip:12345@xx.xx.xx.xx:5126"><sip:12345@xx.xx.xx.xx:5126></a></font></div>
<div><font face="monospace">Contact:
<a class="moz-txt-link-rfc2396E" href="sip:10.240.250.121:5126;did=e7e.87a97756"><sip:10.240.250.121:5126;did=e7e.87a97756></a></font></div>
<div><font face="monospace">Call-ID: <a
href="mailto:0068dba856ae05e8406504ab71fc9900@CC.CC.CC.CC.CC"
moz-do-not-send="true">0068dba856ae05e8406504ab71fc9900@CC.CC.CC.CC.CC</a></font></div>
<div><font face="monospace">CSeq: 102 INVITE</font></div>
</div>
<div><br>
</div>
<div>Where CC is client ip. I thithk it must be opensips ip
adress <span style="font-family:monospace"><a
href="http://10.240.250.121:5126" moz-do-not-send="true">10.240.250.121:5126</a></span></div>
<div><span style="font-family:monospace">What is wrong?</span></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>