Hello Everyone,

I want to use 'uac_replace_from' multiple times in my script (to use for a failover situation). This is a simple example of what I want to do:

route[1]
{
    if (method=="INVITE")
    {
        record_route();

 uac_replace_from("","sip:[email protected]");
append_hf("Remote-Party-ID: <sip:[email protected]>;party=calling;screen=yes;privacy=full\r\n"); append_hf("P-Asserted-Identity: <sip:[email protected]>\r\n");
        append_hf("Privacy: id\r\n");

        t_on_failure("1");
        t_relay();
    }
}

route[2]
{
    if (method=="INVITE")
    {
        record_route();

        uac_replace_from("","sip:[email protected]");
append_hf("Remote-Party-ID: <sip:[email protected]>;party=calling;screen=no;privacy=off\r\n");
        append_hf("P-Asserted-Identity: <sip:[email protected]>\r\n");

        t_on_failure("1");
        t_relay();

        exit;
    }
}

failure_route[1]
{
    route(2);
}

Reading the docs and forums I tried to use branches but I think I don't understand the explanation / examples of the branches well enough :)

Can anyone explain / give me a hint how to change my script so I can drop the first 'uac_replace_from' and 'append_hf'?

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to