[Devel] append_branch - in failure route

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Feb 7 11:10:27 CET 2007


Klaus Darilion wrote:
> Hi!
>
> As we have clarified the normal append_branch behaviour maybe we can
> clarify the meaning in failure_route too:
>
> failure_route[1] {
>   # send to voicebox
>   rewriteuri("sip:vm at server.com");
>   append_branch();
>   t_relay();
> }
>
> I suspect that the new URI will be written into RURI (branches[0]). Then
> append_branch() copies the URI from branches[0] into branches[1]. Then
> t_relay sees 2 branches: branches[0] and branches[1]. But as branches[0]
> is already "dead", only branches[1] will be releayed.
>
> Is this correct?
>   
yes this is correct - there is no special handling of append_branch() in 
failure route. What is important to know is that the branch[0] in 
failure route is the winning branch of the transaction and and inherits 
all its attributes. So, if you had force_socket(sock1) for branch x 
(before relay) and this is the winning branch in failure route, the 
branch[0] will have the forced_socket "sock1" which will be again 
inherit by the new branch after append_branch().

regards,
bogdan



More information about the Devel mailing list