<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">&lt;<a href="mailto:carsten@ng-voice.com">carsten@ng-voice.com</a>&gt;</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&#39;re wrong.<br>
&quot;t_on_branch&quot; 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&#39;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 &lt;<a href="mailto:ushacked@gmail.com">ushacked@gmail.com</a>&gt;:<br>
&gt; In my case i need to change the header and then send it.<br>
&gt;<br>
&gt; Here the case works if i make the changes after i sent the invite and got<br>
&gt; the reply. As i know the t_on_branch will work after the invite is sent...<br>
&gt; am i wrong?<br>
&gt;<br>
&gt; There are many questions to ask about the branches... when do they work in a<br>
&gt; serial manner, when parallel... where can i find it documented best?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; try the following:<br>
&gt;<br>
&gt; route {<br>
&gt;   # Whatever you do in your main-route....<br>
&gt;    t_on_branch(&quot;modify_contact&quot;);<br>
&gt; # Whatever you do in your main-route, the branch route is<br>
&gt; automatically triggered for each branch.<br>
&gt;   t_relay();<br>
&gt; }<br>
&gt;<br>
&gt; branch_route[modify_contact] {<br>
&gt;   remove_hf(&quot;Contact&quot;);<br>
&gt;   append_hf(&quot;Contact: sip:whatever at something\r\n&quot;);<br>
&gt; }<br>
&gt;<br>
&gt; failure_route[failure_from_np] {<br>
&gt;   # You need to modify the triggered branch_route again, otherwise the<br>
&gt; same branch_route will triggered again...<br>
&gt; }<br>
&gt;<br>
&gt; Just calling &quot;append_branch&quot; does not help.<br>
&gt;<br>
&gt; Carsten<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Mar 27, 2012 at 3:14 PM, Uri Shacked &lt;<a href="mailto:ushacked@gmail.com">ushacked@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Mar 27, 2012 at 3:13 PM, Uri Shacked &lt;<a href="mailto:uri.shacked@gmail.com">uri.shacked@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Following the advice I got on the subject “remove_hf&quot; and &quot;append_hf&quot; one<br>
&gt;&gt;&gt; after the other , twice, issue”, I tried to work with the “append_branch()”<br>
&gt;&gt;&gt; function.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; What I need to do is, after I received the invite from the original user,<br>
&gt;&gt;&gt; I use SIP methods to work with the NP server. I subst() the user part, send<br>
&gt;&gt;&gt; the call to the NP server, get the reply, parse it and then subst() back to<br>
&gt;&gt;&gt; the destination and send the call out.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Doing it with “append_branch” seems logical.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I do “append_branch()” before changing the user,  get the reply (301),<br>
&gt;&gt;&gt; goes on to failure route after the branch route was called, and from there I<br>
&gt;&gt;&gt; have a problem.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I need to continue my flow without the branch I added. How do I return to<br>
&gt;&gt;&gt; the original on?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I read about the t_drop_replies but didn’t quit understand…..<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; BR,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Uri<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<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>