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@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
phone: +34669448337