<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">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 sip:12345@XX.XX.XX.XX:5126 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">sip:12345@CC.CC.CC.CC</a>>;tag=as59cc9e35</font></div><div><font face="monospace">To: <sip:12345@xx.xx.xx.xx:5126></font></div><div><font face="monospace">Contact: <sip:10.240.250.121:5126;did=e7e.87a97756></font></div><div><font face="monospace">Call-ID: <a href="mailto:0068dba856ae05e8406504ab71fc9900@CC.CC.CC.CC.CC">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">10.240.250.121:5126</a></span></div><div><span style="font-family:monospace">What is wrong?</span></div></div>