<div dir="ltr"><font color="#3366ff"><font><font face="tahoma,sans-serif">Are you searching for examples of serial / parallel forking config found in the TM module documentation ?<br clear="all"></font></font></font><div dir="ltr">
<font color="#3366ff" face="tahoma, sans-serif"><br></font><div><font color="#3366ff" face="tahoma, sans-serif">Reda</font></div></div><br>
<br><br><div class="gmail_quote">On Tue, Mar 27, 2012 at 16:55, Carsten Bock <span dir="ltr"><<a href="mailto:carsten@ng-voice.com">carsten@ng-voice.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Uri,<br>
<br>
you're wrong.<br>
"t_on_branch" works before the request is sent out....<br>
The branches work in the manner, you program them in your logic (e.g.<br>
set the timeout for a request, then use failure route for serial<br>
branches). There is no general switch (and i'm not aware of any good<br>
docs regarding this) in order to do serial or parallel branches.<br>
<br>
Carsten<br>
<br>
2012/3/27 Uri Shacked <<a href="mailto:ushacked@gmail.com">ushacked@gmail.com</a>>:<br>
> In my case i need to change the header and then send it.<br>
><br>
> Here the case works if i make the changes after i sent the invite and got<br>
> the reply. As i know the t_on_branch will work after the invite is sent...<br>
> am i wrong?<br>
><br>
> There are many questions to ask about the branches... when do they work in a<br>
> serial manner, when parallel... where can i find it documented best?<br>
><br>
><br>
><br>
><br>
><br>
> Hi,<br>
><br>
> try the following:<br>
><br>
> route {<br>
> # Whatever you do in your main-route....<br>
> t_on_branch("modify_contact");<br>
> # Whatever you do in your main-route, the branch route is<br>
> automatically triggered for each branch.<br>
> t_relay();<br>
> }<br>
><br>
> branch_route[modify_contact] {<br>
> remove_hf("Contact");<br>
> append_hf("Contact: sip:whatever at something\r\n");<br>
> }<br>
><br>
> failure_route[failure_from_np] {<br>
> # You need to modify the triggered branch_route again, otherwise the<br>
> same branch_route will triggered again...<br>
> }<br>
><br>
> Just calling "append_branch" does not help.<br>
><br>
> Carsten<br>
><br>
><br>
><br>
> On Tue, Mar 27, 2012 at 3:14 PM, Uri Shacked <<a href="mailto:ushacked@gmail.com">ushacked@gmail.com</a>> wrote:<br>
>><br>
>><br>
>><br>
>> On Tue, Mar 27, 2012 at 3:13 PM, Uri Shacked <<a href="mailto:uri.shacked@gmail.com">uri.shacked@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> Hi,<br>
>>><br>
>>><br>
>>><br>
>>> Following the advice I got on the subject “remove_hf" and "append_hf" one<br>
>>> after the other , twice, issue”, I tried to work with the “append_branch()”<br>
>>> function.<br>
>>><br>
>>> What I need to do is, after I received the invite from the original user,<br>
>>> I use SIP methods to work with the NP server. I subst() the user part, send<br>
>>> the call to the NP server, get the reply, parse it and then subst() back to<br>
>>> the destination and send the call out.<br>
>>><br>
>>> Doing it with “append_branch” seems logical.<br>
>>><br>
>>> I do “append_branch()” before changing the user, get the reply (301),<br>
>>> goes on to failure route after the branch route was called, and from there I<br>
>>> have a problem.<br>
>>><br>
>>> I need to continue my flow without the branch I added. How do I return to<br>
>>> the original on?<br>
>>><br>
>>> I read about the t_drop_replies but didn’t quit understand…..<br>
>>><br>
>>><br>
>>><br>
>>> BR,<br>
>>><br>
>>> Uri<br>
>><br>
>><br>
><br>
<br>
<br>
<br>
--<br>
Carsten Bock<br>
CEO (Geschäftsführer)<br>
<br>
ng-voice GmbH<br>
Schomburgstr. 80<br>
D-22767 Hamburg / Germany<br>
<br>
<a href="http://www.ng-voice.com" target="_blank">http://www.ng-voice.com</a><br>
mailto:<a href="mailto:carsten@ng-voice.com">carsten@ng-voice.com</a><br>
<br>
Mobile <a href="tel:%2B49%20179%202021244" value="+491792021244">+49 179 2021244</a><br>
Office <a href="tel:%2B49%2040%2034927219" value="+494034927219">+49 40 34927219</a><br>
Fax <a href="tel:%2B49%2040%2034927220" value="+494034927220">+49 40 34927220</a><br>
<br>
Sitz der Gesellschaft: Hamburg<br>
Registergericht: Amtsgericht Hamburg, HRB 120189<br>
Geschäftsführer: Carsten Bock<br>
Ust-ID: DE279344284<br>
<br>
Hier finden Sie unsere handelsrechtlichen Pflichtangaben:<br>
<a href="http://www.ng-voice.com/imprint/" target="_blank">http://www.ng-voice.com/imprint/</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Meet ng-voice at LinuxTag 2012 in Berlin - May 23rd - 26th, 2012. Save the<br>
date!<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</font></span></blockquote></div><br></div>