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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jan Janak Sent: Wednesday, November 16, 2005 3:15 AM To: Lenir Santiago Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [email protected]; [email protected] 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:[EMAIL PROTECTED] > > avp_printf("i:96","<sip:$avp($temp2)@$td>\r\n"); # > <sip:[EMAIL PROTECTED]>. > > 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: (.*)@(.*)/To: "$avp($temp2)" > <$avp($temp2)@\2/'); > > #append_hf("To: \"5615551212\" > <[EMAIL PROTECTED]>;user=phone"); > > > #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 [EMAIL PROTECTED], > how can I get acc.so to send the final resulting URI > ([EMAIL PROTECTED]) 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 = "[EMAIL PROTECTED]" > > Calling-Station-Id = "sip:[EMAIL PROTECTED]" > > Called-Station-Id = "sip:[EMAIL PROTECTED];user=phone" > > Sip-Translated-Request-URI = > "sip:[EMAIL PROTECTED];user=phone" > > Acct-Session-Id = "[EMAIL PROTECTED]" > > 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 = "[EMAIL PROTECTED]" > > Calling-Station-Id = "sip:[EMAIL PROTECTED]" > > Called-Station-Id = "sip:[EMAIL PROTECTED];user=phone" > > Sip-Translated-Request-URI = > "sip:[EMAIL PROTECTED]:5060" > > Acct-Session-Id = "[EMAIL PROTECTED]" > > 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 > > _______________________________________________ > Serdev mailing list > [EMAIL PROTECTED] > http://mail.iptel.org/mailman/listinfo/serdev _______________________________________________ Serusers mailing list [EMAIL PROTECTED] http://mail.iptel.org/mailman/listinfo/serusers _______________________________________________ Devel mailing list [email protected] http://openser.org/cgi-bin/mailman/listinfo/devel
