Hi Lenir,
you can keep the modified To value into an AVP and use the extra
accounting feature to log it. See
the problem is how to set it as Called-Station-ID attribute in order to
avoid overlapping. You can do a trick by playing with the radius
dictionary (on proxy side) :
changed the Called-Station-ID to a different ID attribute
set extra accounting with the original attribute ID of Called-Station-ID
in this way the acc will set de default TO as something else and you AVP
as Called-Station-ID ;)
regards,
bogdan
Lenir wrote:
Well, if userA dials to:30, 30 gets translated
to:15615551212 and SER dials
15615551212, how can I make the acc.so module send the modified
to:15615551212 as the Called-Station-ID attribute?
This is important for billing, specially if someone forwards to a long
distance or international long distance number.
-----Original Message-----
From: serusers-bounces(a)iptel.org [mailto:serusers-bounces@iptel.org] On
Behalf Of Jan Janak
Sent: Wednesday, November 16, 2005 3:15 AM
To: Lenir Santiago
Cc: serdev(a)iptel.org; serusers(a)iptel.org; users(a)openser.org;
devel(a)openser.org
Subject: [Serusers] Re: [Serdev] Inaccurate Radius Accounting
Hello,
Called-Station-Id attribute always contains the To URI (not
Request-URI). You can find the outbound Request-URI in
Sip-Translated-Request-URI attribute.
Even if you rewrite To header field, it will never be accounted in
Called-Station-Id.
Jan.
On 15-11-2005 21:59, Lenir Santiago wrote:
Hey guys,
I'm using Radius to do pretty much everything regarding my users, i.e.
registrations, authorization, features and preferences. I implemented my
own
way of doing speeddial by using AVPs provided by
radius and AVPOPs module,
Here is the snippet:
AVP-SIP = speedial:30:15615551212
avp_subst("s:caller_speedial/i:99",
"/(.*):(.*)/\2/");
#15615551212
avp_printf("i:98","$rU:*"); #30
avp_printf("i:97","sip:$avp($temp2)@$td"); #
sip:15615551212@xx.xx.xx.xx
avp_printf("i:96","<sip:$avp($temp2)@$td>\r\n");
#
<sip:15615551212@xx.xx.xx.xx>.
xlog("L_N"," SPEEDIALING: $fU is speed-dialing
$hdr(To)->$avp($temp2)\n");
if (avp_check("s:caller_speedial", "fm/$temp1/g")) {
#avp_pushto("$To","i:96");
#avp_pushto("$ruri","i:97");
#avp_pushto("$duri","i:97");
#subst('/^To: (.*)(a)(.*)/To: "$avp($temp2)"
<$avp($temp2)@\2/');
#append_hf("To: \"5615551212\"
<15615551212(a)xx.xx.xx.xx>;user=phone")hone");
#subst_uri('/^sip:(.*)@(.*)$/sip:$avp($temp2)@\2/i');
#subst_user('/(.*)/$avp($temp2)/');
#remove_hf("To");
rewriteuser("15615551212");
xlog("L_N"," SPEEDIALING: $fU is dialing
$hdr(To)
$avp($temp2)\n");
avp_delete("$temp1/g");
avp_delete("$temp2/g");
};
In this scenario, im forcing it instead of getting the value from AVPs
just
for ease of showing my point. The problem that
I'm having is that no
matter
what I do to change the To header or change the
R-URI, radius ALWAYS sends
the accounting records with the original R-URI, in my case 30(a)xx.xx.xx.xx,
how can I get acc.so to send the final resulting URI
(15615551212(a)xx.xx.xx.xx) in the Called-Station-Id AVP?
rad_recv: Accounting-Request packet from host xx.xx.xx.xx:39216, id=97,
length=298
Acct-Status-Type = Start
Service-Type = Sip-Session
Acct-Terminate-Cause = 200
Error-Cause = Invite
User-Name = "1000(a)xx.xx.xx.xx"
Calling-Station-Id = "sip:1000@xx.xx.xx.xx"
Called-Station-Id = "sip:30@xx.xx.xx.xx;user=phone"
Sip-Translated-Request-URI =
"sip:949449852150#15615551212@gateway;user=phone"
Acct-Session-Id =
"000d2890-d47f01e8-1dcc30bc-7a49c7a4(a)yy.yy.yy.yy"
Sip-To-Tag = "230383F4-2AF"
Sip-From-Tag = "000d2890d47f20f54576a906-290bdc33"
Sip-CSeq = "102"
NAS-IP-Address = xx.xx.xx.xx
NAS-Port = 5060
Acct-Delay-Time = 0
rlm_sql (sql): Reserving sql socket id: 12
rlm_sql (sql): Released sql socket id: 12
Sending Accounting-Response of id 97 to xx.xx.xx.xx:39216
rad_recv: Accounting-Request packet from host xx.xx.xx.xx:39216, id=98,
length=292
Acct-Status-Type = Stop
Service-Type = Sip-Session
Acct-Terminate-Cause = 200
Error-Cause = 8
User-Name = "1000(a)xx.xx.xx.xx"
Calling-Station-Id = "sip:1000@xx.xx.xx.xx"
Called-Station-Id = "sip:30@xx.xx.xx.xx;user=phone"
Sip-Translated-Request-URI =
"sip:949449852150#15615551212@gateway:5060"
Acct-Session-Id =
"000d2890-d47f01e8-1dcc30bc-7a49c7a4(a)yy.yy.yy.yy"
> Sip-To-Tag = "230383F4-2AF"
>
> Sip-From-Tag = "000d2890d47f20f54576a906-290bdc33"
>
> Sip-CSeq = "103"
>
> NAS-IP-Address = xx.xx.xx.xx
>
> NAS-Port = 5060
>
> Acct-Delay-Time = 0
>
>
>
>
>
>Thanks in advance!
>
>
>
>
>
>Lenir
>_______________________________________________
>Users mailing list
>Users(a)openser.org
>http://openser.org/cgi-bin/mailman/listinfo/users
>
>
>