[OpenSIPS-Users] Parallel forking and per branch manipulation

Binan AL Halabi binanalhalabi at yahoo.com
Thu Aug 30 23:12:02 CEST 2012


Hi,

lets say you have 2 branches 0 towards user in location and 1 towards PSTN.
 
I suggest to use branch flags which are used to activate some functions in branch level

when creating the branches in main route use this variable $branch() to set branch flags to each indivisual branch depending on its index 0 for branch 0 and 1 for branch 1.

use branch routing blocks to execute certain logic (it could be the manipulation ) for each branch before forwarding the request.

// Binan

--- On Thu, 8/30/12, Jayesh Nambiar <jayesh.voip at gmail.com> wrote:

From: Jayesh Nambiar <jayesh.voip at gmail.com>
Subject: [OpenSIPS-Users] Parallel forking and per branch manipulation
To: "OpenSIPS users mailling list" <users at lists.opensips.org>
Date: Thursday, August 30, 2012, 8:11 AM

Hi All,I have a scenario to do parellel forking between the user found in location and towards a PSTN gateway. The requirement here is, I have unique manipulations to be done before routing the call which I believe can be done using branch routes, but I'm just wondering how. 
For eg: The branch that goes to the user found from location should have no FROM Header manipulation and the branch that goes out to PSTN gateway needs a uac_replace_from("sip:123456789 at 1.2.3.4"), and insert_hf("P-Asserted_Identity: sip:123456789 at 1.2.3.4\r\n") before calling t_relay(). There are many other manipulations like this.
How do I take the script logic to individual branch routes before calling t_relay, because whats happening with me is once the location is looked up, I go ahead for manipulations that is supposed to be done for the gateway branch, but it gets applicable for the branch that goes out to the user as well !!

Probably I am missing something on my understanding on how to call branch_routes while doing parallel forking.
Thanks for any help.
--- Jayesh

-----Inline Attachment Follows-----

_______________________________________________
Users mailing list
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/20120830/e808da9f/attachment-0001.htm>


More information about the Users mailing list