<div dir="ltr"><div class="gmail_quote"><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div bgcolor="#FFFFFF">

<div>&quot;Forgot to say that you should also look at failed transaction flag parameter in acc, it should handle your needs, iirc.&quot;</div><div>when i use t_branch_timeout() and generates self 408. then reroute to another destination, the flag was set to 3 and didnt wrote to DB the 408.</div>

<div> </div></div></blockquote><div> &quot;With latest stable you should be able to execute acc_db_request() for the reply in onreply_route. Then it should take the totag from reply.&quot;</div><div> </div><div>i use t_branch_timeout()  and that can not be executed on the reply route......</div>

<div> </div><div>anyway, what i did was saving the $tt on the 18X reply and afterwards use sqlops to insert the data i needed on the acc table.</div><div> </div><div>thanks a lot for the help.</div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">

<div bgcolor="#FFFFFF"><div> </div><div><div><div><br>On 10 Nov 2012, at 08:41, Daniel-Constantin Mierla &lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt; wrote:<br><br></div><div>
</div><blockquote type="cite"><div><div>Hello,</div><div><br></div><div>With latest stable you should be able to execute acc_db_request() for the reply in onreply_route. Then it should take the totag from reply.</div><div>

<br></div><div>When doing in failure route, it processes the incoming invite that has no totag.</div><div><br></div><div>Cheers,</div><div>Daniel<br><br>--<br>Daniel-Constantin Mierla<div><a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a></div>

</div><div><br>On 8 Nov 2012, at 10:17, Uri Shacked &lt;<a href="mailto:ushacked@gmail.com" target="_blank">ushacked@gmail.com</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div><div dir="ltr"><div><font size="3" face="Times New Roman">

</font><p style="margin:0cm 0cm 0pt;line-height:normal" class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;font-size:12pt">Hi,</span></p><font size="3" face="Times New Roman">

</font><p style="margin:0cm 0cm 0pt;line-height:normal" class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;font-size:12pt">OK, i do not use drop reply.</span></p><font size="3" face="Times New Roman">

</font><p style="margin:0cm 0cm 0pt;line-height:normal" class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;font-size:12pt">I do fork the call to the secondary
destination.</span></p><font size="3" face="Times New Roman">

</font><p style="margin:0cm 0cm 0pt;line-height:normal" class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;font-size:12pt">Still, I need this (busy/no_answer)
reply to be inserted into the acc table.</span></p><font size="3" face="Times New Roman">

</font><p style="margin:0cm 0cm 0pt;line-height:normal" class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;font-size:12pt">Ho do i do that?</span></p><font size="3" face="Times New Roman">

</font><p style="margin:0cm 0cm 0pt;line-height:normal" class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;font-size:12pt">I tried acc_db_request() but the
to_tag is missing and the sip_code is missing as well. </span></p><font size="3" face="Times New Roman">

</font><p style="margin:0cm 0cm 0pt;line-height:normal" class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;font-size:12pt">How do i force the sip_code to be
the one i generated or received? how do i use the to_tag from the last reply i
got (183 for example)?</span></p><font size="3" face="Times New Roman">

</font><p style="margin:0cm 0cm 0pt;line-height:normal" class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;font-size:12pt">I know i can probably save the to_tag
and the sip_code, use update with sqlops or on the other hand do everything in
the database afterwards - but this is very tricky and i think not efficient.</span></p><font size="3" face="Times New Roman">

</font><p style="margin:0cm 0cm 0pt;line-height:normal" class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;font-size:12pt">So, any way to write the reply i do
not send to the caller to the DB with the 183 to_tag and the relevant sip_code?</span></p><font size="3" face="Times New Roman">

</font><p style="margin:0cm 0cm 0pt;line-height:normal" class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;font-size:12pt">Thanks,</span></p><font size="3" face="Times New Roman">

</font><p style="margin:0cm 0cm 0pt;line-height:normal" class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;font-size:12pt">Uri</span></p><font size="3" face="Times New Roman">

</font></div><div><br><br> </div><div class="gmail_quote">On Wed, Nov 7, 2012 at 7:35 PM, Uri Shacked <span dir="ltr">&lt;<a href="mailto:ushacked@gmail.com" target="_blank">ushacked@gmail.com</a>&gt;</span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">


<p>Thanks.<br>
I am doing the reroutes on the failure route. I am using drop reply to prevent the caller from receiving the 4xx reply from the first destination. If i would just t_relay with the new deatination, the 4xx will not be forward to the caller?</p>




<div class="gmail_quote">בתאריך 7 בנוב 2012 18:46, מאת &quot;Klaus Darilion&quot; &lt;<a href="mailto:klaus.mailinglists@pernau.at" target="_blank">klaus.mailinglists@pernau.at</a>&gt;:<div><div><br type="attribution">
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">
As I said I can not comment on the accounting, but dropping replies to forward the request to another destination is the wrong approach. Sequential forking should be done in a failure route.<br>
<br>
Klaus<br>
<br>
On 07.11.2012 17:31, Uri Shacked wrote:<br>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">
So if I wont use the drop reply I might get what I need?<br>
<br>
בתאריך 7 בנוב 2012 18:10, מאת &quot;Klaus Darilion&quot;<br>
&lt;<a href="mailto:klaus.mailinglists@pernau.at" target="_blank">klaus.mailinglists@pernau.at</a> &lt;mailto:<a href="mailto:klaus.mailinglists@pernau.at" target="_blank">klaus.mailinglists@<u></u>pernau.at</a>&gt;&gt;:<br>




<br>
    Ingoring accounting, such &quot;sequential forking&quot; scenarios are usually<br>
    solved by having the forkin logic in a failure-route.<br>
<br>
    - 1st callee sends 486<br>
    - failure route is executed, if winning response is 486, set the new<br>
    destination and t_relay().<br>
<br>
    I do not know how this single transaction with 2 branches is<br>
    reflected in the acc table, but I guess you can implement any acc<br>
    behavior using manual accounting.<br>
<br>
    regards<br>
    Klaus<br>
<br>
    On 07.11.2012 16:29, Uri Shacked wrote:<br>
<br>
        To be more accurate - I am using the &quot;t_set_fr()&quot; it generates<br>
        408 and<br>
        sends cancel to the destination.<br>
<br>
        This is the case that i do not see a final reply for the first<br>
        invite.<br>
<br>
<br>
<br>
        On Wed, Nov 7, 2012 at 5:24 PM, Uri Shacked &lt;<a href="mailto:ushacked@gmail.com" target="_blank">ushacked@gmail.com</a><br>
        &lt;mailto:<a href="mailto:ushacked@gmail.com" target="_blank">ushacked@gmail.com</a>&gt;<br>
        &lt;mailto:<a href="mailto:ushacked@gmail.com" target="_blank">ushacked@gmail.com</a> &lt;mailto:<a href="mailto:ushacked@gmail.com" target="_blank">ushacked@gmail.com</a>&gt;&gt;&gt; wrote:<br>
<br>
             Hi,<br>
             I am trying to make an option of &quot;route when no answer&quot; or<br>
        &quot; route<br>
             when busy&quot;.<br>
             What I am doing is checking the reply and if &quot;busy&quot;, for<br>
        example, I<br>
             use &quot;t_drop_replies&quot;. Then, I set the new number and<br>
        route[relay] again.<br>
             On the accdb table, I get the first invite with 183 and<br>
        after that<br>
             the second invite with 183 and with 200.<br>
             I would like to do exactly what i do, but would like to see<br>
        on the<br>
             accdb the 486 reply from the first invite.<br>
             how do i do it?<br>
             BR,<br>
             Uri<br>
<br>
<br>
<br>
<br>
        ______________________________<u></u>___________________<br>
        SIP Express Router (SER) and Kamailio (OpenSER) - sr-users<br>
        mailing list<br>
        <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a> &lt;mailto:<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-<u></u>router.org</a>&gt;<br>




        <a href="http://lists.sip-router.org/__cgi-bin/mailman/listinfo/sr-__users" target="_blank">http://lists.sip-router.org/__<u></u>cgi-bin/mailman/listinfo/sr-__<u></u>users</a> &lt;<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a>&gt;<br>




<br>
</blockquote>
</blockquote></div></div></div>
</blockquote></div><br></div>
</div></blockquote></div></blockquote></div></div></div></blockquote></div><br></div>