<html><head></head><body bgcolor="#FFFFFF"><div>Forgot to say that you should also look at failed transaction flag parameter in acc, it should handle your needs, iirc.<br><br>Daniel-Constantin Mierla<div><a href="http://www.asipto.com">http://www.asipto.com</a></div></div><div><br>On 10 Nov 2012, at 08:41, Daniel-Constantin Mierla &lt;<a href="mailto:miconda@gmail.com">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">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">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>&nbsp;</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, מאת "Klaus Darilion" &lt;<a href="mailto:klaus.mailinglists@pernau.at" target="_blank">klaus.mailinglists@pernau.at</a>&gt;:<div><div class="h5"><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, מאת "Klaus Darilion"<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>
&nbsp; &nbsp; Ingoring accounting, such "sequential forking" scenarios are usually<br>
&nbsp; &nbsp; solved by having the forkin logic in a failure-route.<br>
<br>
&nbsp; &nbsp; - 1st callee sends 486<br>
&nbsp; &nbsp; - failure route is executed, if winning response is 486, set the new<br>
&nbsp; &nbsp; destination and t_relay().<br>
<br>
&nbsp; &nbsp; I do not know how this single transaction with 2 branches is<br>
&nbsp; &nbsp; reflected in the acc table, but I guess you can implement any acc<br>
&nbsp; &nbsp; behavior using manual accounting.<br>
<br>
&nbsp; &nbsp; regards<br>
&nbsp; &nbsp; Klaus<br>
<br>
&nbsp; &nbsp; On 07.11.2012 16:29, Uri Shacked wrote:<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; To be more accurate - I am using the "t_set_fr()" it generates<br>
&nbsp; &nbsp; &nbsp; &nbsp; 408 and<br>
&nbsp; &nbsp; &nbsp; &nbsp; sends cancel to the destination.<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; This is the case that i do not see a final reply for the first<br>
&nbsp; &nbsp; &nbsp; &nbsp; invite.<br>
<br>
<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; 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>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mailto:<a href="mailto:ushacked@gmail.com" target="_blank">ushacked@gmail.com</a>&gt;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &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>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Hi,<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I am trying to make an option of "route when no answer" or<br>
&nbsp; &nbsp; &nbsp; &nbsp; " route<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;when busy".<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;What I am doing is checking the reply and if "busy", for<br>
&nbsp; &nbsp; &nbsp; &nbsp; example, I<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;use "t_drop_replies". Then, I set the new number and<br>
&nbsp; &nbsp; &nbsp; &nbsp; route[relay] again.<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;On the accdb table, I get the first invite with 183 and<br>
&nbsp; &nbsp; &nbsp; &nbsp; after that<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;the second invite with 183 and with 200.<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I would like to do exactly what i do, but would like to see<br>
&nbsp; &nbsp; &nbsp; &nbsp; on the<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;accdb the 486 reply from the first invite.<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;how do i do it?<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BR,<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Uri<br>
<br>
<br>
<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; ______________________________<u></u>___________________<br>
&nbsp; &nbsp; &nbsp; &nbsp; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users<br>
&nbsp; &nbsp; &nbsp; &nbsp; mailing list<br>
&nbsp; &nbsp; &nbsp; &nbsp; <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>


&nbsp; &nbsp; &nbsp; &nbsp; <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></body></html>