[xtradius] VoIP accounting problem

Top Page
Author: Nick Mashchenko
Date:  
To: XTRADIUS Mailing List
CC: Igor Kaba, Horacio J. Peсa, Oleg Zaharov, George Chelidze
Subject: [xtradius] VoIP accounting problem
Hello XTRADIUS,

Still coming :-). I called my "project" SIPTA (http://mnv.ma.cx).
Authorization works just fine. Next step -- accounting. Here is
my /etc/raddb/users and appropriate external program files.

DEFAULT Acct-Status-Type = "Stop"
        Exec-Program-Account = "/usr/local/radius/zzz.pl %u"


#!/usr/bin/perl
$ENV_FILE = "/tmp/xtr.env.acct";
use Env;
open(OUT,">>$ENV_FILE");
print OUT "Printing Parameters\n";
for ($i=0;$i<$#ARGV;$i++) {
print OUT "$i:\t[".$ARGV[$i]."]\n";
}
print OUT "Printing Environment Vars\n";
foreach $var (sort keys %ENV) {
print OUT "$var:\t[$ENV{$var}]\n";
}
print OUT "Exiting...\n";
close(OUT);

Then, the problem is that it writes down in /tmp/xtr.env.acct file
only environment for TELEPHONY STOP-session, but not for VoIP one.
However, in "-sxyz" mode I can see TWO STOP-sessions, the FIRST is
TELEPHONY one, and the SECOND is VoIP. The sequence is normal --
FIRST I put down the handset, and SECOND -- the VoIP session dies.
But why XTRADIUS collects data about FIRST (TELEPHONY) session only?
It seem very strange to me... I've modified /etc/raddb/users as
floows, but in this case zzz.pl dosn't write anything :-).

DEFAULT h323-call-type = "h323-call-type=VoIP", Acct-Status-Type = "Stop"
        Exec-Program-Account = "/usr/local/radius/zzz.pl %u"


Here is /tmp/xtr.env.acct:

Printing Parameters
Printing Environment Vars
Acct-Authentic: [RADIUS]
Acct-Delay-Time:        [0]
Acct-Input-Octets:      [37804]
Acct-Input-Packets:     [342]
Acct-Output-Octets:     [82212]
Acct-Output-Packets:    [848]
Acct-Session-Id:        [00008721]
Acct-Session-Time:      [57]
Acct-Status-Type:       [Stop]
Called-Station-Id:      [17187773456]
Calling-Station-Id:     [380445739528]
Cisco-AVPair:   [interface=CAS 0:0:2]
Cisco-NAS-Port: [CAS 0:0:2]
Exec-Program-Account:   [/usr/local/radius/zzz.pl %u]
NAS-IP-Address: [194.93.191.116]
NAS-Port-Id:    [0]
NAS-Port-Type:  [Async]
PATH:  
[/usr/local/sbin:/usr/sbin:/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin]
Service-Type:   [Login-User]
User-Name:      [p813438969263]
h323-call-origin:       [h323-call-origin=answer]
h323-call-type: [h323-call-type=Telephony]
h323-conf-id:   [h323-conf-id=1449E263 DBF111D8 878AF396 41ED4A56]
h323-connect-time:      [h323-connect-time=17:09:08.157 GMT Fri Jul 23 2004]
h323-disconnect-cause:  [h323-disconnect-cause=10  ]
h323-disconnect-time:   [h323-disconnect-time=17:10:05.167 GMT Fri Jul 23 2004]
h323-gw-id:     [h323-gw-id=GU1.VoIP]
h323-setup-time:        [h323-setup-time=17:09:08.141 GMT Fri Jul 23 2004]
h323-voice-quality:     [h323-voice-quality=0]
Exiting...


Naturaly, I can charge my users by that accounting info, because
even he didn't establish a VoIP connection, the PSTN connection
has been placed anyway, and XTRADIUS will write down PSTN connection
data, but since client didn't speak really, we can't charge him...
Unfortunately :-).

--
MNV-UANIC

_______________________________________________
xtradius mailing list
xtradius@???
http://lists.q-linux.com/mailman/listinfo/xtradius