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.
-- Alex
--
Alex Balashov
Evariste Systems
Web :
http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599