[OpenSIPS-Users] Opensips 2.3.2

mas_66 at tiscali.co.uk mas_66 at tiscali.co.uk
Tue Dec 12 11:55:37 EST 2017


Thanks Bogdan and Razvan

I have inserted the function in the location as below  in opensips.cfg with no 
success im afraid.
Have i put it in the correct location? i want to change the FROM URI 1.1.1.1 to 
2.2.2.2

thanks
route[relay] {
        # for INVITEs enable some additional helper routes
        if (is_method("INVITE")) {

                if (isflagset(NAT)) {
                        rtpproxy_offer("ro");
                }

                t_on_branch("per_branch_ops");
                t_on_reply("handle_nat");
                t_on_failure("missed_call");
        }

        if (isflagset(NAT)) {
                add_rr_param(";nat=yes");
                }

        if (!t_relay()) {
                send_reply("500","Internal Error");
        };
        exit;
}




branch_route[per_branch_ops] {
        uac_replace_from("$avp(display)","$avp(uri)");
        xlog("new branch at $ru\n");
}


onreply_route[handle_nat] {
        if (nat_uac_test("1"))
                fix_nated_contact();
        if ( isflagset(NAT) )
                rtpproxy_answer("ro");
        xlog("incoming reply\n");
}


failure_route[missed_call] {
        if (t_was_cancelled()) {
                exit;
        }

        # uncomment the following lines if you want to block client
        # redirect based on 3xx replies.
        ##if (t_check_status("3[0-9][0-9]")) {
        ##t_reply("404","Not found");
        ##      exit;
        ##}


}



local_route {
        if (is_method("BYE") && $DLG_dir=="UPSTREAM") {

                acc_db_request("200 Dialog Timeout", "acc");

        }
}




More information about the Users mailing list