[SR-Users] force_send_socket

David Villasmil david.villasmil.work at gmail.com
Mon Oct 8 02:24:35 CEST 2018


Hello all,

I'm very rusty when it comes to variables :(

There's a part of my config where i load a parameter from usr_preferences
to know whether i should append a branch and call him to a fixed IP as well
as to their current location. I tried doing this on the REQUEST_ROUTE and
append a branch like:

            # This will check if the TO user is an office user
            if (avp_db_load("$to", "$avp(office)")) {
                if ( $avp(gsm)==1 ) {
                    xlog("L_ERR","[REQUEST_ROUTE]: [$rm] callid: $ci
from=$fU to=$tU should be ($avp(gsm)) branched - Appending branch\n");
                    append_branch("sip:$tU at 1.2.3.4:5060");
                }
            }

And later when the script hits the RELAY, the branch is actually sent, BUT
from the *PRIVATE IP.*
I tried adding:

force_send_socket(67.215.186.219:5060);

Right after the "append_branch" to set the socket from where to send, but
kamailio is still sending from the private ip.

Any ideas?

Regards,

David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181008/a5cb8d6c/attachment.html>


More information about the sr-users mailing list