[OpenSIPS-Users] Create new branch on receipt of provisional response on the main branch

xaled xaled at web.de
Tue May 30 09:26:36 EDT 2017


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-bounces at lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Dienstag, 30. Mai 2017 12:30
To: OpenSIPS users mailling list <users at lists.opensips.org>
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) = <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:bogdan at opensips.org] 
Sent: Freitag, 26. Mai 2017 15:28
To: OpenSIPS users mailling list  <mailto:users at lists.opensips.org> <users at lists.opensips.org>; xaled  <mailto:xaled at web.de> <xaled at 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 at lists.opensips.org <mailto:Users at lists.opensips.org> 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 






_______________________________________________
Users mailing list
Users at lists.opensips.org <mailto:Users at lists.opensips.org> 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170530/538360ce/attachment-0001.html>


More information about the Users mailing list