[Kamailio-Devel] append_branch() inside modules

Klaus Darilion klaus.mailinglists at pernau.at
Fri Nov 28 14:53:21 CET 2008



Iñaki Baz Castillo schrieb:
> El Viernes, 28 de Noviembre de 2008, Klaus Darilion escribió:
>>> Why should be bflags copied when appending a new branch manually?
>> Example: You want to create 2 branches with different settings:
>> 1. set RURI, set bflag, set send_socket
>> 2. append branch()
>> 3. set RURI, set bflag, set send_socket
> 
> What do you mean with this example? I don't get it.
> 
> BTW, imagine A calls B (natted) so bflag(natted)=1.
> The call fails and failure_route creates a new branch (append_branch) to a 
> voicemail server (not natted). I would like (as the current behaviour) that 
> bflag(natted)=0 in this new branch, I don't want, at all, the value being 1 
> jsut because B was natted.

IMO then the bflag should be resetted before append_branch, or 
append_brnach should be extended to have flags to control which parts of 
  branch[0] are copied, e.g. a bitmask:
  1 copy ruri (default)
  2 copy duri
  4 copy send_socket
  8 copy bflags

Thus append_branch("15") would copy all the branch parameters.

regards
klaus

> 



More information about the Devel mailing list