Re: [OpenSIPS-Users] Create new branch on receipt of provisional response on the main branch
Hi Bogdan, a-ha I thought of triggering on event, but did not find an even for the received 180 response. What I did not know, that one can simulate an event. That is a powerful function. Thanks, Xaled From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu Sent: Dienstag, 30. Mai 2017 12:30 To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Create new branch on receipt of provisional response on the main branch 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 so you cannnot do this. The only option is to use the "event" param and to manually simulate an event by populating some AVPs: $avp(uri) = ; $avp(received) = ; empty string if not used $avp(path) = ; empty string if not used $avp(qval) = ; mandatory $avp(bflags) = ; mandatory (use 0 as default) $avp(socket) = ; 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:bog...@opensips.org] Sent: Freitag, 26. Mai 2017 15:28 To: OpenSIPS users mailling list <mailto:users@lists.opensips.org> ; xaled <mailto:xa...@web.de> 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 Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Create new branch on receipt of provisional response on the main branch
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) = ; $avp(received) =; empty string if not used $avp(path) = ;empty string if not used $avp(qval) = ;mandatory $avp(bflags) = ; mandatory (use 0 as default) $avp(socket) = ; 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:bog...@opensips.org] *Sent:* Freitag, 26. Mai 2017 15:28 *To:* OpenSIPS users mailling list ; xaled *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 Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Create new branch on receipt of provisional response on the main branch
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:bog...@opensips.org] Sent: Freitag, 26. Mai 2017 15:28 To: OpenSIPS users mailling list ; xaled 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 Users@lists.opensips.org <mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
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 Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Create new branch on receipt of provisional response on the main branch
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 Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users