Can anyone give me suggestion for storing and manipulating multi-leg accounting records?<br><br><div class="gmail_quote">On Thu, Jun 12, 2008 at 2:03 PM, Ruchir <<a href="mailto:ruchir.lists@gmail.com">ruchir.lists@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Any suggestions from experts? :)<div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">
On Thu, Jun 12, 2008 at 1:27 PM, Bogdan-Andrei Iancu <<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Ruchir,<br>
<br>
with multi-leg accounting, you can match all the records belonging to the same call by using call_id, to_tag and from_tag. How you format and store the CDRS is your choice :).<br>
<br>
Regards,<br>
Bogdan<br>
<br>
Ruchir wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
Yeah I just noticed that INVITE & BYE time difference gives accurate duration of the call. We can drop using ACK now :)<br>
Are there any standards for storing records for multi-leg accounting? I tried to find it but didn't get success. Can you please suggest which way we should store CDR to identify the records properly?<br>
<br></div><div>
On Wed, Jun 11, 2008 at 8:10 PM, Bogdan-Andrei Iancu <<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>> wrote:<br>
<br>
Well, depends of how you process the ACC infor for building CDRs -<br>
that was more an opinion/recommendation than a must :).<br>
<br>
Regarding the ACK and call duration -- actually the media starts<br>
to flow immediately after the 200OK (when the INVITE log is<br>
generated) - most of the devices wait for ACK as confirmation that<br>
everything is ok and not for starting the call.<br>
<br>
Regards,<br>
Bogdan<br>
<br>
<br>
Ruchir wrote:<br>
<br>
I was thinking it should generate 9 records so it'll show up<br>
as 3 different calls so we can show CDR properly in web<br>
interface as well as calculate billing for users as the user<br>
who forwarded the call should be charged for the call. Also if<br>
we get INVITE only then we may not get accurate duration of<br>
call as actual duration starts when callee accepts the call<br>
and ACK is received. Is this scenario wrong?<br>
<br>
On Wed, Jun 11, 2008 at 5:19 PM, Bogdan-Andrei Iancu<br>
<<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>><br></div><div><div></div><div>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>>> wrote:<br>
<br>
Perfect !<br>
<br>
regarding multi-leg calls - first of all, there is no need to<br>
enabled in for ACK and BYEs - make no sense. usually you<br>
want to<br>
see all the legs of the call for INVITE.<br>
<br>
Now, about how many records you get - depends on how many AVPs<br>
(used of multi-leg acc) you set from the script. If you 3<br>
INVITEs,<br>
means you add 3 values for at least of the AVPs .<br>
<br>
Regards,<br>
Bogdan<br>
<br>
Ruchir wrote:<br>
<br>
I had put setflag after t_newtran() previously. Now I<br>
moved it<br>
before t_newtran() and got records for INVITE, ACK &<br>
BYE for<br>
normal call perfectly. :)<br>
Then I tested for call forwarding scenario. In this case<br>
forwarding is set as below:<br>
90004 -> 90001 -> 90003.<br>
<br>
I called 90004 from 90002 and I got 7 records in acc<br>
table. 3<br>
INVITEs, 3 BYEs and only single ACK. Shouldn't it log 3 ACK<br>
messages?<br>
<br>
<br>
On Wed, Jun 11, 2008 at 4:32 PM, Bogdan-Andrei Iancu<br>
<<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>><br></div></div><div>
<div></div><div>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>>>> wrote:<br>
<br>
Be sure you set the accounting flag before any<br>
t_relay() or<br>
t_newtran() for the INVITE. To be sure, try to use<br>
log/xlog<br>
to put<br>
some debugs in your script and check if the flag is<br>
really set<br>
before t_relay().<br>
<br>
<br>
Regards,<br>
Bogdan<br>
<br>
Ruchir Lists wrote:<br>
<br>
I configured simple acc module to store records<br>
in acc<br>
table,<br>
set proper flags. Then tried to call number<br>
directly(not with<br>
forwarding) but still I get only BYE record. Any<br>
suggestion?<br>
<br>
On Wed, Jun 11, 2008 at 2:43 PM, Bogdan-Andrei Iancu<br>
<<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>> <mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>> <mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>>><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>>>>> wrote:<br>
<br>
Hi Ruchir,<br>
<br>
There are two aspects here:<br>
1) making acc to work - setting the flags and<br>
getting the ACC<br>
records<br>
2) enabling multi-leg account and putting more<br>
info into the<br>
accounted info<br>
<br>
First you should to solve (1) - just getting a<br>
simple ACC<br>
record<br>
for INVITEs and BYEs (no multi leg<br>
accounting) - it this<br>
working<br>
for you or you get only BYE acc?<br>
<br>
Regards,<br>
Bogdan<br>
<br>
Ruchir Lists wrote:<br>
<br>
Hi All,<br>
<br>
I'm trying to configure OpenSER with<br>
multi-leg<br>
accounting. I'm<br>
using OpenSER 1.2 & radius. I'm using<br>
acc_radius<br>
table for<br>
writing cdr records. I've searched through<br>
several articles<br>
and mailing list posts about configuring<br>
multi-leg<br>
accounting<br>
and everywhere they talk about setting up<br>
multi-leg-info<br>
parameter of acc module to configure leg<br>
source &<br>
destination<br>
and setting up accounting flag. But this<br>
is not<br>
working for<br>
me. I get only BYE record in table if I<br>
use this<br>
way to<br>
write<br>
multiple records for one call in call<br>
forwarding<br>
scenario. I<br>
managed to get multiple records by calling<br>
acc_rad_request on<br>
INVITE, ACK, BYE & CANCEL. For instance,<br>
I have<br>
4 users;<br>
90001, 90002, 90003, 90004. The call<br>
forwarding is<br>
setup as below:<br>
90004 -> 90001 -> 90003.<br>
<br>
I dial 90004 from 90002 user and it<br>
forwards the<br>
call<br>
to 90001<br>
& then 90003 and they're connected properlry.<br>
However I<br>
don't<br>
get leg source/destination properly and<br>
also I<br>
get 7-8 bye<br>
records for this call. Can anyone guide<br>
me in right<br>
direction<br>
if I'm doing anything wrong.<br>
<br>
Regards,<br>
Ruchir<br>
------------------------------------------------------------------------<br>
<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a><br>
<mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a>><br>
<mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a><br>
<mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a>>><br>
<mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a><br>
<mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a>><br>
<mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a><br>
<mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a>>>><br>
<mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a><br>
<mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a>><br>
<mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a><br>
<mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a>>><br>
<mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a><br>
<mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a>><br>
<mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a><br>
<mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a>>>>><br>
<br>
<br>
<a href="http://lists.openser.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
</div></div></blockquote>
<br>
</blockquote></div><br>
</div></div></blockquote></div><br>