<div dir="ltr"><div style>Hi Nick,</div><div style><br></div><div style>I haven&#39;t used Radius with CDRTool so not very sure how the patch effects OpenSIPS accounting events triggered to Radius. We are using much sophisticated business logic with integrated VLR and HRL along with call billing with respect to national and international roaming cases. Anyhow all you need to do to get failed transactions events in Radius server, is to set <span style="background-color:rgb(254,254,238);color:rgb(0,0,0)">failed_transaction_flag on those transactions, e.g.</span></div>

<div style><span style="background-color:rgb(254,254,238);color:rgb(0,0,0)"><br></span></div><div style="color:rgb(0,0,0);background-color:rgb(254,254,238)">modparam(&quot;acc&quot;, &quot;aaa_flag&quot;, 1)</div><div style>

<span style="background-color:rgb(254,254,238)"><font color="#000000">modparam(&quot;acc&quot;, &quot;failed_transaction_flag&quot;, 3)</font><br></span></div><div style><span style="background-color:rgb(254,254,238)"><font color="#000000"><div>

<br></div></font></span></div><div style><span style="background-color:rgb(254,254,238)"><font color="#000000">...</font></span></div><div style><span style="background-color:rgb(254,254,238)"><font color="#000000"><br></font></span></div>

<div style>    if ((is_method(&quot;INVITE&quot;) &amp;&amp; !has_totag()) || (is_method(&quot;BYE&quot;))) {</div><div style>        setflag(1);</div><div style>        setflag(3);</div><div style><br></div><div style>    };</div>

<div><br></div>...<div><br></div><div><br></div><div>Then you should get failed transaction events on Radius regardless of failure reason, e.g. no-answer (480), cancel (487), busy (486) or even request timeout (408) and so on. This things works out of the box without patching Radius and / or OpenSIPS.<br>

<div class="gmail_extra"><br></div><div class="gmail_extra" style>Thank you.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, May 4, 2013 at 3:35 PM, Nick Khamis <span dir="ltr">&lt;<a href="mailto:symack@gmail.com" target="_blank">symack@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello Everyone,<br>
<br>
Sorry to chime in however, we are also working on failed route<br>
accounting using radius.<br>
My impression was that accounting failed sessions was supported by<br>
Radius when patching<br>
the server using CDRTool. Would we still need the above script along<br>
with the failed packets:<br>
<br>
<a href="http://cdrtool.ag-projects.com/projects/cdrtool/wiki/Installation_Guide" target="_blank">http://cdrtool.ag-projects.com/projects/cdrtool/wiki/Installation_Guide</a><br>
<br>
Kind Regards,<br>
<br>
Nick.<br>
<div class="im"><br>
On 5/2/13, Muhammad Shahzad &lt;<a href="mailto:shaheryarkh@gmail.com">shaheryarkh@gmail.com</a>&gt; wrote:<br>
&gt; Something like this,<br>
&gt;<br>
&gt;         if (t_check_status(&quot;408&quot;)) {<br>
&gt;                 if ( t_local_replied(&quot;all&quot;) ) {<br>
&gt;                         # local timeout with no reply received -&gt; fr_timer<br>
&gt;                 } else if ( t_local_replied(&quot;last&quot;) ) {<br>
&gt;                         # timeout with replies received -&gt; fr_inv_timer<br>
&gt;                 } else {<br>
&gt;                         # received timeout<br>
&gt;                 };<br>
&gt;         };<br>
&gt; ...<br>
&gt;<br>
&gt; Thank you.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Thu, May 2, 2013 at 12:29 PM, <a href="mailto:qasimakhan@gmail.com">qasimakhan@gmail.com</a><br>
&gt; &lt;<a href="mailto:qasimakhan@gmail.com">qasimakhan@gmail.com</a>&gt;wrote:<br>
&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; Thanks Bogdan for your reply.<br>
&gt;&gt;<br>
&gt;&gt; Now for my question, I want to keep my STOP event on reply as i have<br>
&gt;&gt; faced<br>
&gt;&gt; issues when generating event on request time. The thing is how should i<br>
&gt;&gt; cater the fact that the device has gone offline and there is no response<br>
&gt;&gt; generated and hence no accounting STOP event.<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Qasim<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Apr 30, 2013 at 2:26 PM, Bogdan-Andrei Iancu<br>
&gt;&gt; &lt;<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>&gt;wrote:<br>
&gt;&gt;<br>
</div>&gt;&gt;&gt; **<br>
<div class="im">&gt;&gt;&gt; Hello,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; All accounting triggers (START/STOP or CDR based) are on replies, so<br>
&gt;&gt;&gt; when<br>
&gt;&gt;&gt; the transaction is completed. Of course, all transactions are terminated<br>
&gt;&gt;&gt; in<br>
&gt;&gt;&gt; OpenSIPS  - either by received replies, either by a timeout (if no reply<br>
&gt;&gt;&gt; received).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; If you want to generate the STOP event at BYE request time (versus BYE<br>
&gt;&gt;&gt; reply time), you can manually do it from script via the acc function<br>
&gt;&gt;&gt; acc_db_request() (instead of setting the acc flag and letting the acc<br>
&gt;&gt;&gt; module to generate automatically the event) - the generate event is the<br>
&gt;&gt;&gt; same. See:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; <a href="http://www.opensips.org/html/docs/modules/1.9.x/acc.html#id294346" target="_blank">http://www.opensips.org/html/docs/modules/1.9.x/acc.html#id294346</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Regards,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Bogdan-Andrei Iancu<br>
</div>&gt;&gt;&gt; OpenSIPS Founder and Developerhttp://<a href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a><br>
<div><div class="h5">&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On 04/30/2013 08:00 AM, <a href="mailto:qasimakhan@gmail.com">qasimakhan@gmail.com</a> wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  I have tried this scenario. Still if the User B is behind a NAT or is<br>
&gt;&gt;&gt; unreachable the opensips generates the BYE with retransmitted BYE&#39;s and<br>
&gt;&gt;&gt; the<br>
&gt;&gt;&gt; dialog is closed but there is no response to BYE received from that user<br>
&gt;&gt;&gt; hence no radius acct request.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  Regards,<br>
&gt;&gt;&gt; Qasim<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Mon, Apr 29, 2013 at 8:36 PM, Muhammad Shahzad<br>
&gt;&gt;&gt; &lt;<a href="mailto:shaheryarkh@gmail.com">shaheryarkh@gmail.com</a>&gt;wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Per my understanding, accounting event is sent when BYE completes,<br>
&gt;&gt;&gt;&gt; whether if destination replies with 200 OK or BYE re-transmission times<br>
&gt;&gt;&gt;&gt; out<br>
&gt;&gt;&gt;&gt; and opensips responds with 408 Request timeout. In each case SIP<br>
&gt;&gt;&gt;&gt; response<br>
&gt;&gt;&gt;&gt; code is set appropriately and you should use stop time as accounting<br>
&gt;&gt;&gt;&gt; end<br>
&gt;&gt;&gt;&gt; time rather then the time your receive account stop request on radius<br>
&gt;&gt;&gt;&gt; (they<br>
&gt;&gt;&gt;&gt; both may differ, e.g. under high load scenarios).<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;  Thank you.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;  On Mon, Apr 29, 2013 at 3:27 PM, <a href="mailto:qasimakhan@gmail.com">qasimakhan@gmail.com</a> &lt;<br>
&gt;&gt;&gt;&gt; <a href="mailto:qasimakhan@gmail.com">qasimakhan@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;    Hi,<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;  I wanted to confirm if radius accounting requests are generated on a<br>
&gt;&gt;&gt;&gt;&gt; successful transaction or it can be generated on a received BYE only.<br>
&gt;&gt;&gt;&gt;&gt; To<br>
&gt;&gt;&gt;&gt;&gt; elaborate my question you can look at 2 diagrams below. Is first<br>
&gt;&gt;&gt;&gt;&gt; scenario<br>
&gt;&gt;&gt;&gt;&gt; correct based on RFC&#39;s? My next question is that if scenario A is<br>
&gt;&gt;&gt;&gt;&gt; correct<br>
&gt;&gt;&gt;&gt;&gt; then how can we account the call if say user B has gone offline and we<br>
&gt;&gt;&gt;&gt;&gt; do<br>
&gt;&gt;&gt;&gt;&gt; not receive 200 OK of the BYE sent?<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Can we send a manual accounting request to Radius with acc_aaa_request<br>
&gt;&gt;&gt;&gt;&gt; in accounting module?<br>
&gt;&gt;&gt;&gt;&gt;<br>
</div></div>&gt;&gt;&gt;&gt;&gt;  *Scenario A:*<br>
<div class="im">&gt;&gt;&gt;&gt;&gt;  User A            OpenSIPs                Radius           User B<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; |-------BYE-------&gt;|<br>
&gt;&gt;&gt;&gt;&gt; |<br>
&gt;&gt;&gt;&gt;&gt;     |<br>
&gt;&gt;&gt;&gt;&gt; |---------------------BYE--------------------&gt;|<br>
&gt;&gt;&gt;&gt;&gt;      |                       |-------acct-BYE-------&gt;|<br>
&gt;&gt;&gt;&gt;&gt;<br>
</div>&gt;&gt;&gt;&gt;&gt; *Scenario B:*<br>
<div class="im">&gt;&gt;&gt;&gt;&gt; User A            OpenSIPs                Radius           User B<br>
&gt;&gt;&gt;&gt;&gt;     |-------BYE-------&gt;|<br>
&gt;&gt;&gt;&gt;&gt; |                   |<br>
&gt;&gt;&gt;&gt;&gt;     |<br>
&gt;&gt;&gt;&gt;&gt; |---------------------BYE--------------------&gt;|<br>
&gt;&gt;&gt;&gt;&gt;      |                       |&lt;-------------------200 OK<br>
&gt;&gt;&gt;&gt;&gt; -----------------|<br>
&gt;&gt;&gt;&gt;&gt;      |&lt;----200 OK -----|<br>
&gt;&gt;&gt;&gt;&gt;     |                       |-------acct-BYE-------&gt;|<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;  Regards,<br>
&gt;&gt;&gt;&gt;&gt; Qasim Ayyaz Khan<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;  _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt; Users mailing list<br>
&gt;&gt;&gt;&gt;&gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&gt;&gt;&gt;&gt;&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;  --<br>
&gt;&gt;&gt;&gt; Mit freundlichen Grüßen<br>
&gt;&gt;&gt;&gt; Muhammad Shahzad<br>
&gt;&gt;&gt;&gt; -----------------------------------<br>
&gt;&gt;&gt;&gt; CISCO Rich Media Communication Specialist (CRMCS)<br>
&gt;&gt;&gt;&gt; CISCO Certified Network Associate (CCNA)<br>
</div>&gt;&gt;&gt;&gt; Cell: +49 176 99 83 10 85 &lt;%2B49%20176%2099%2083%2010%2085&gt;<br>
<div class="im">&gt;&gt;&gt;&gt; MSN: <a href="mailto:shari_786pk@hotmail.com">shari_786pk@hotmail.com</a><br>
&gt;&gt;&gt;&gt; Email: <a href="mailto:shaheryarkh@googlemail.com">shaheryarkh@googlemail.com</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; Users mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&gt;&gt;&gt;&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; Users mailing<br>
</div>&gt;&gt;&gt; listUsers@lists.opensips.orghttp://<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<div class="im">&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Users mailing list<br>
&gt;&gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&gt;&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Mit freundlichen Grüßen<br>
&gt; Muhammad Shahzad<br>
&gt; -----------------------------------<br>
&gt; CISCO Rich Media Communication Specialist (CRMCS)<br>
&gt; CISCO Certified Network Associate (CCNA)<br>
&gt; Cell: +49 176 99 83 10 85<br>
&gt; MSN: <a href="mailto:shari_786pk@hotmail.com">shari_786pk@hotmail.com</a><br>
&gt; Email: <a href="mailto:shaheryarkh@googlemail.com">shaheryarkh@googlemail.com</a><br>
&gt;<br>
<br>
</div><div class=""><div class="h5">_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Mit freundlichen Grüßen</span></div>

<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Muhammad Shahzad</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">------------------------------</span><span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">-----</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">CISCO Rich Media Communication Specialist (CRMCS)</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">CISCO Certified Network Associate (CCNA)</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Cell: +49 176 99 83 10 85</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">MSN: </span><a href="mailto:shari_786pk@hotmail.com" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)" target="_blank">shari_786pk@hotmail.com</a><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Email: </span><a href="mailto:shaheryarkh@googlemail.com" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)" target="_blank">shaheryarkh@googlemail.com</a>
</div></div></div>