<div dir="ltr"><div style>Hi Nick,</div><div style><br></div><div style>I haven'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("acc", "aaa_flag", 1)</div><div style>
<span style="background-color:rgb(254,254,238)"><font color="#000000">modparam("acc", "failed_transaction_flag", 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("INVITE") && !has_totag()) || (is_method("BYE"))) {</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"><<a href="mailto:symack@gmail.com" target="_blank">symack@gmail.com</a>></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 <<a href="mailto:shaheryarkh@gmail.com">shaheryarkh@gmail.com</a>> wrote:<br>
> Something like this,<br>
><br>
> if (t_check_status("408")) {<br>
> if ( t_local_replied("all") ) {<br>
> # local timeout with no reply received -> fr_timer<br>
> } else if ( t_local_replied("last") ) {<br>
> # timeout with replies received -> fr_inv_timer<br>
> } else {<br>
> # received timeout<br>
> };<br>
> };<br>
> ...<br>
><br>
> Thank you.<br>
><br>
><br>
><br>
><br>
> On Thu, May 2, 2013 at 12:29 PM, <a href="mailto:qasimakhan@gmail.com">qasimakhan@gmail.com</a><br>
> <<a href="mailto:qasimakhan@gmail.com">qasimakhan@gmail.com</a>>wrote:<br>
><br>
>> Hi,<br>
>><br>
>> Thanks Bogdan for your reply.<br>
>><br>
>> Now for my question, I want to keep my STOP event on reply as i have<br>
>> faced<br>
>> issues when generating event on request time. The thing is how should i<br>
>> cater the fact that the device has gone offline and there is no response<br>
>> generated and hence no accounting STOP event.<br>
>><br>
>> Regards,<br>
>> Qasim<br>
>><br>
>><br>
>> On Tue, Apr 30, 2013 at 2:26 PM, Bogdan-Andrei Iancu<br>
>> <<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>>wrote:<br>
>><br>
</div>>>> **<br>
<div class="im">>>> Hello,<br>
>>><br>
>>> All accounting triggers (START/STOP or CDR based) are on replies, so<br>
>>> when<br>
>>> the transaction is completed. Of course, all transactions are terminated<br>
>>> in<br>
>>> OpenSIPS - either by received replies, either by a timeout (if no reply<br>
>>> received).<br>
>>><br>
>>> If you want to generate the STOP event at BYE request time (versus BYE<br>
>>> reply time), you can manually do it from script via the acc function<br>
>>> acc_db_request() (instead of setting the acc flag and letting the acc<br>
>>> module to generate automatically the event) - the generate event is the<br>
>>> same. See:<br>
>>><br>
>>> <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>
>>><br>
>>> Regards,<br>
>>><br>
>>> Bogdan-Andrei Iancu<br>
</div>>>> OpenSIPS Founder and Developerhttp://<a href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a><br>
<div><div class="h5">>>><br>
>>><br>
>>> On 04/30/2013 08:00 AM, <a href="mailto:qasimakhan@gmail.com">qasimakhan@gmail.com</a> wrote:<br>
>>><br>
>>> I have tried this scenario. Still if the User B is behind a NAT or is<br>
>>> unreachable the opensips generates the BYE with retransmitted BYE's and<br>
>>> the<br>
>>> dialog is closed but there is no response to BYE received from that user<br>
>>> hence no radius acct request.<br>
>>><br>
>>> Regards,<br>
>>> Qasim<br>
>>><br>
>>><br>
>>> On Mon, Apr 29, 2013 at 8:36 PM, Muhammad Shahzad<br>
>>> <<a href="mailto:shaheryarkh@gmail.com">shaheryarkh@gmail.com</a>>wrote:<br>
>>><br>
>>>> Per my understanding, accounting event is sent when BYE completes,<br>
>>>> whether if destination replies with 200 OK or BYE re-transmission times<br>
>>>> out<br>
>>>> and opensips responds with 408 Request timeout. In each case SIP<br>
>>>> response<br>
>>>> code is set appropriately and you should use stop time as accounting<br>
>>>> end<br>
>>>> time rather then the time your receive account stop request on radius<br>
>>>> (they<br>
>>>> both may differ, e.g. under high load scenarios).<br>
>>>><br>
>>>> Thank you.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> On Mon, Apr 29, 2013 at 3:27 PM, <a href="mailto:qasimakhan@gmail.com">qasimakhan@gmail.com</a> <<br>
>>>> <a href="mailto:qasimakhan@gmail.com">qasimakhan@gmail.com</a>> wrote:<br>
>>>><br>
>>>>> Hi,<br>
>>>>><br>
>>>>> I wanted to confirm if radius accounting requests are generated on a<br>
>>>>> successful transaction or it can be generated on a received BYE only.<br>
>>>>> To<br>
>>>>> elaborate my question you can look at 2 diagrams below. Is first<br>
>>>>> scenario<br>
>>>>> correct based on RFC's? My next question is that if scenario A is<br>
>>>>> correct<br>
>>>>> then how can we account the call if say user B has gone offline and we<br>
>>>>> do<br>
>>>>> not receive 200 OK of the BYE sent?<br>
>>>>><br>
>>>>> Can we send a manual accounting request to Radius with acc_aaa_request<br>
>>>>> in accounting module?<br>
>>>>><br>
</div></div>>>>>> *Scenario A:*<br>
<div class="im">>>>>> User A OpenSIPs Radius User B<br>
>>>>><br>
>>>>> |-------BYE------->|<br>
>>>>> |<br>
>>>>> |<br>
>>>>> |---------------------BYE-------------------->|<br>
>>>>> | |-------acct-BYE------->|<br>
>>>>><br>
</div>>>>>> *Scenario B:*<br>
<div class="im">>>>>> User A OpenSIPs Radius User B<br>
>>>>> |-------BYE------->|<br>
>>>>> | |<br>
>>>>> |<br>
>>>>> |---------------------BYE-------------------->|<br>
>>>>> | |<-------------------200 OK<br>
>>>>> -----------------|<br>
>>>>> |<----200 OK -----|<br>
>>>>> | |-------acct-BYE------->|<br>
>>>>><br>
>>>>><br>
>>>>> Regards,<br>
>>>>> Qasim Ayyaz Khan<br>
>>>>><br>
>>>>> _______________________________________________<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>
>>>>><br>
>>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> Mit freundlichen Grüßen<br>
>>>> Muhammad Shahzad<br>
>>>> -----------------------------------<br>
>>>> CISCO Rich Media Communication Specialist (CRMCS)<br>
>>>> CISCO Certified Network Associate (CCNA)<br>
</div>>>>> Cell: +49 176 99 83 10 85 <%2B49%20176%2099%2083%2010%2085><br>
<div class="im">>>>> MSN: <a href="mailto:shari_786pk@hotmail.com">shari_786pk@hotmail.com</a><br>
>>>> Email: <a href="mailto:shaheryarkh@googlemail.com">shaheryarkh@googlemail.com</a><br>
>>>><br>
>>>> _______________________________________________<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>
>>>><br>
>>>><br>
>>><br>
>>> _______________________________________________<br>
>>> Users mailing<br>
</div>>>> 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">>>><br>
>>><br>
>><br>
>> _______________________________________________<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>
>><br>
>><br>
><br>
><br>
> --<br>
> Mit freundlichen Grüßen<br>
> Muhammad Shahzad<br>
> -----------------------------------<br>
> CISCO Rich Media Communication Specialist (CRMCS)<br>
> CISCO Certified Network Associate (CCNA)<br>
> Cell: +49 176 99 83 10 85<br>
> MSN: <a href="mailto:shari_786pk@hotmail.com">shari_786pk@hotmail.com</a><br>
> Email: <a href="mailto:shaheryarkh@googlemail.com">shaheryarkh@googlemail.com</a><br>
><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>