[Devel] append_branch

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


Hi Klaus,

Klaus Darilion wrote:
>>>> BTW, this lead to a related issue I found - stateless forward does
>>>> not obey the path info.
>>>>
>>>> What you are saying about resetting the path after append_branch() is
>>>> more related here to a logical issue: when creating a new branch (via
>>>> append), all the info pushed into the new branch should be reset?
>>>>         
>>> Not sure how it should be done - probably I still do not know what
>>> append branch exactly does. I try to write down my understanding of
>>> branches and please correct me:
>>>
>>> When a request enters openser.cfg the message has one branch
>>> (branches[0]).
>>>
>>> Any manipulation or lookup of RURI and DURI will be done on branches[0].
>>>
>>> If I call append_branch, the current RURI/DURI/PATH (identically to
>>> branches[0]) will be copied into the next empty branch - in this case
>>> branches[1].
>>>
>>> Then further URI/DURI manipulation will not touch branches[1] anymore.
>>>
>>> Is the above correct?
>>>       
>> yes, this is correct. The same applies for the branch flags and forced
>> socket (along RURI, DURI and PATH)
>>     
>>> Thus IMO it would make sense to reset all parameters of branches[0] to
>>> avoid confusion between the existing (copied into branches[x]) and the
>>> fresh new branch.
>>>       
>> I agree, but note that there is no equivalent of branch[0]. all info for
>> branch 0 is kept directly into the SIP request. The additional branches
>> (>0) are kept in an array of branch structures.
>>     
>
> Can you add a corrected version of my text to the core-parameters wiki
> please?
>   
not sure what core parameters you are reffering...but anybody can edit 
the wiki, so feel free to update :)
>   
>> so, after doing append_branch(), all per-branch info from the request
>> will be reset (following the above logic).
>>     
>
> really? is this already the case? AFAIK, currently the DURI must be reset
> manually.
>   
no, this is not the current behaviour - it was a hypothetical follow up 
if we do the reset in append_branch()
>> if we expand a bit the idea, it should be a different logic behind
>> append_branch(); and append_branch(URI); :
>>     
>
> btw: append_branch(URI) it not documented on the core wiki.
>
>   
>>     append_branch() - appends current branch[0] (RURI) as a new branch;
>> the request must be reset after;
>>     append_branch(URI) - appends a new URI as a new branch; this new URI
>> should not inherit and reset anything from branch[0].
>>     
>
> I agree. Will you apply this logic to 1.2?
>   

for me, the current logic (or lack of logic) is buggy, so I will open a 
bug report about append_branch logic.

regards,
bogdan



More information about the Devel mailing list