Hi Alex
Only drawback I have with this is, when cycling through registered
contacts and adding branches. I can only have one trigger.
request_route {
...
if(jittery)
t_on_branch("BRANCH_DECAF");
else
t_on_branch("BRANCH_REGULAR");
Actual situation. I have two registrars, each one shall only send
invites to CPE registerd locally (aka where the socket is not 0)
So I loop through the AOR and:
* append_branch, if contact if socket > 0
* append_branch to other registrar if branch count < registered contacts
But I have to handle some headers and rtpengine differently, for
branches to an actual customer CPE or the one which might add a call to
the other registrar to correctly send the invite though the sockets
present there.
But, in my last tests, comparing $du and $(branch(uri)[]) in every
branch, I found there is an off by one with the index!
While in Branch $T_branch_idx = 0. I get the correct URI in
$(branch(uri)[-1]) matching to $ds.
In $T_branch_idx = 1, $ds corresponds to $(branch(uri)[0]) and so on.
This is utterly weird I would not have expected the index to be
negative.
But I'll have a shot at $nh, thanks for pointing that out!
Mit freundlichen Grüssen
-Benoît Panizzon-
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web
http://www.imp.ch
______________________________________________________