Hello,
On 08/11/08 14:34, Alex Balashov wrote:
Daniel,
Well, for now I am processing $hdr(Via) in my Perl middleware to get the branch ID out.
The problem then becomes that the topmost Via visible to the initial REQUEST-ROUTE (as well as any corresponding BRANCH-ROUTEs resulting from lookup & stateful relay) during processing is from the call source, not the outgoing call leg.
So:
SBC --> its Via and a certain branch param --> registrar --> branches to contacts
At the point at which the registrar is processing the request, the Via from the SBC is what is visible. Only once the request is forwarded does the new Via stamped on by the proxy become visible, with the corresponding branch parameters.
As a result, I have no way of identifying the same branches from the REQUEST-ROUTE (or BRANCH-ROUTE) as later in the ONREPLY-ROUTE.
What would you suggest as my other options? I suppose it is possible to append some custom headers, but these do not come back in replies. I would hate to use add_rr_param() for this purpose or something equally nefarious, as well; that does not seem RFC-kosher.
I suppose I *could* store the branch= parameter of the incoming leg and then collate the subsequent branches with it, but it seems like there really ought to be a better way.
maybe you you tell what you need to do with this branches I can find a solution. So far I don't get exactly the logic you want to implement. I thought you need the branch id in the onreply route and that is all.
Cheers, Daniel
-- Alex