Hi Xaled,

Normally you should use the "msg" param for the inject function, to take the new destination (to be injected) from the sip msg RURI. But you are in on_reply route soyou cannnot do this.

The only option is to use the "event" param and to manually simulate an event by populating some AVPs:

$avp(uri) = <sip ruri>;
$avp(received) =<sip outbound proxy uri>; empty string if not used
$avp(path) = <sip path uri>;empty string if not used
$avp(qval) = <integer Q value 0-10> ;mandatory
$avp(bflags) = <integer bitmask with per-branch flags> ; mandatory (use 0 as default)
$avp(socket) = <local socket as proto:ip:port> ; empty string if not used

Best regards,

Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Bootcamp 2017, Huston, US
  http://opensips.org/training/OpenSIPS_Bootcamp_2017.html

On 05/29/2017 02:43 PM, xaled wrote:

Hi Bogdan,

Thanks of pointing this new feature out.

I’d like to have something like the script below to work by adding a branch after receipt of 180. The problem is I don’t get the meaning of source parameter of t_inject_branch in this scenario. Can you help me with this one?

route {

                t_on_reply("global");

t_relay();

}

onreply_route[global] {

        if (t_check_status("180")) {

                t_inject_branch(“???”);

        }

}

Thanks,

Xaled

*From:*Bogdan-Andrei Iancu [mailto:[email protected]]
*Sent:* Freitag, 26. Mai 2017 15:28
*To:* OpenSIPS users mailling list <[email protected]>; xaled <[email protected]> *Subject:* Re: [OpenSIPS-Users] Create new branch on receipt of provisional response on the main branch

Hi Xaled,

With a pre-2.3 release you cannot do this, unless you wait for the current branches to fail, so to use the failure_route to add new branches.

With 2.3 you can do it by using the t_inject_branch() function.

Best regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2017, Huston, US
   http://opensips.org/training/OpenSIPS_Bootcamp_2017.html

On 05/22/2017 09:30 PM, xaled wrote:

    Hello,

    I need to create a branch on receipt of provisional response on
    the main branch.

    Doing append_brach in reply_route does not seem to work.

    What is right way to do it?

    Thanks,

    xaled




    _______________________________________________

    Users mailing list

    [email protected] <mailto:[email protected]>

    http://lists.opensips.org/cgi-bin/mailman/listinfo/users



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

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

Reply via email to