problem in opensips+radius accounting

happyeveryday1025 happyeveryday1025 at 126.com
Tue Jan 18 01:25:36 CET 2011


 
 
 Hello:
I am doing accounting with opensips+freeradius+radiusclient-ng.Now when i make a call using X-Lite,the radius server has response,but the accounting message is not right,the attribute "service-type" and "eap-service-type"is present in the log,I dont know what is the matter,how to set service-type?Your timely help will be greatly appreciated.
Here is the response of the freeradius:

        Acct-Status-Type = Start
        User-Service-Type = IAPP-Register
        EAP-Key-Name = "\000\000\000\310"
       Error-Cause = Invite
        Attr-55 = 0x4d33d5c7
        Sip-From-Tag = "2c29a446"
        Sip-To-Tag = "1fb68f517efd4f6682a527d79cf5809b"
        Acct-Session-Id = "YzIxMDNjMTRlNTUxYTJiYmRkNzhkYmU4MThmZWM3OWQ."
        User-Name = "3901 at 192.168.118.39"
        Calling-Station-Id = "sip:3901 at 192.168.118.39"
        Called-Station-Id = "sip:3902 at 192.168.118.39"
        Sip-Translated-Request-URI = "sip:192.168.118.41:16591"
        Attr-223 =    0x3c7369703a33393031403139322e3136382e3131382e34313a33323435343e
        NAS-Port = 5060
        Acct-Delay-Time = 0
        NAS-IP-Address = 192.168.118.39

The config file of opensips related to radius is as fllowed:

 # ----- acc params -----
/* what sepcial events should be accounted ? */
modparam("acc", "early_media", 1)
modparam("acc", "report_ack", 1)
modparam("acc", "report_cancels", 1)
/* by default ww do not adjust the direct of the sequential requests.
   if you enable this parameter, be sure the enable "append_fromtag"
   in "rr" module */
modparam("acc", "detect_direction", 0)
/* account triggers (flags) */
modparam("acc", "failed_transaction_flag", 3)
modparam("acc", "log_flag", 1)
modparam("acc", "log_missed_flag", 2)
/* uncomment the following lines to enable DB accounting also */
#modparam("acc", "db_flag", 1)
#modparam("acc", "db_missed_flag", 2)
modparam("acc","aaa_flag",2)
modparam("acc","aaa_missed_flag",3)
modparam("acc","service_type",15)
#modparam("aaa_radius", "radius_config", "/usr/local/etc/radiusclient-ng/radiusclient.conf")
modparam("acc","aaa_url","radius:/usr/local/etc/radiusclient-ng/radiusclient.conf")
modparam("acc", "aaa_extra",    "User-Name=$Au ;\
                                  Calling-Station-Id=$from;\
                                  Called-Station-Id=$to ;\
                                  Sip-Translated-Request-URI=$ruri;\
                                   Sip-RPid=$avp(s:rpid);\
                                    Canonical-URI=$avp(s:can_uri);\
                                   Billing-Party=$avp(s:billing_party);\
                                   Divert-Reason=$avp(s:divert_reason);\
                                    X-RTP-Stat=$hdr(X-RTP-Stat);\
                                     Contact=$hdr(contact);\
                                      Event=$hdr(event);\
                                     SIP-Proxy-IP=$avp(s:sip_proxy_ip);\
                                     ENUM-TLD=$avp(s:enum_tld)") 

The dictionary file of opensips is as followed:

 #### Attributes ###
ATTRIBUTE Sip-Uri-User         208  string     # Proprietary, auth_radius
ATTRIBUTE Sip-Group            211  string     # Proprietary, group_radius
ATTRIBUTE Sip-Rpid             213  string     # Proprietary, auth_radius
ATTRIBUTE SIP-AVP              225  string     # Proprietary, avp_radius
ATTRIBUTE Sip-Call-Duration    227  integer
ATTRIBUTE Sip-Call-Setuptime   228  integer

###lines add###
ATTRIBUTE Sip-Method                    101  integer
ATTRIBUTE Sip-Response-Code             102  integer    # Schulzrinne, acc
ATTRIBUTE Sip-To-Tag                    104  string     # Schulzrinne, acc
ATTRIBUTE Sip-From-Tag                  105  string     # Schulzrinne, acc
ATTRIBUTE Sip-Translated-Request-URI    107  string     # Proprietary, acc

ATTRIBUTE Source-IP                     214  string
ATTRIBUTE Source-Port                   215  string
ATTRIBUTE Sip-Src-IP                    108  string     # Proprietary, acc
ATTRIBUTE Sip-Src-Port                  109  string     # Proprietary, acc
ATTRIBUTE Digest-Response               206  string     # Sterman, auth_radius

ATTRIBUTE Sip-Uri-User                  208  string     # Proprietary, auth_radius
ATTRIBUTE Sip-Group                     211  string     # Proprietary, group_radius
ATTRIBUTE Sip-Rpid                      213  string     # Proprietary, auth_radius
ATTRIBUTE SIP-AVP                       225  string     # Proprietary, avp_radius
ATTRIBUTE Digest-Realm                  1063  string    # Sterman, auth_radius
ATTRIBUTE Digest-Nonce                  1064  string    # Sterman, auth_radius
ATTRIBUTE Digest-Method                 1065  string    # Sterman, auth_radius
ATTRIBUTE Digest-URI                    1066  string    # Sterman, auth_radius
ATTRIBUTE Digest-QOP                    1067  string    # Sterman, auth_radius
ATTRIBUTE Digest-Algorithm              1068  string    # Sterman, auth_radius
ATTRIBUTE Digest-Body-Digest            1069  string    # Sterman, auth_radius
ATTRIBUTE Digest-CNonce                 1070  string    # Sterman, auth_radius
ATTRIBUTE Digest-Nonce-Count            1071  string    # Sterman, auth_radius
ATTRIBUTE Digest-User-Name              1072  string    # Sterman, auth_radius

ATTRIBUTE User-Name  1 string
ATTRIBUTE Called-Station-Id 30 string
ATTRIBUTE Calling-Station-Id 31 string
ATTRIBUTE       Canonical-URI          216     string
ATTRIBUTE       Delay-Time             217     string
ATTRIBUTE       Divert-Reason          219     string
ATTRIBUTE       X-RTP-Stat             220     string
ATTRIBUTE       From-Header            221     string
ATTRIBUTE       User-Agent             222     string
ATTRIBUTE       Contact                223     string
ATTRIBUTE       Event                  224     string
ATTRIBUTE       SIP-Proxy-IP           231     string
ATTRIBUTE       ENUM-TLD               232     string
ATTRIBUTE      Billing-Party             218     string
ATTRIBUTE  Acct-Status-Type  40  integer
ATTRIBUTE       Event-Timestamp       230     string
ATTRIBUTE      Acct-Session-Id       44     string

### Service-Type Values ###
VALUE     Service-Type       Group-Check      12   # Proprietary, group_radius
VALUE     Service-Type       SIP-Caller-AVPs  30   # Proprietary, avp_radius
VALUE     Service-Type       SIP-Callee-AVPs  31   # Proprietary, avp_radius
VALUE      Service-Type      Login-User           1      
VALUE      Service-Type      Framed-User          2      
VALUE      Service-Type      Callback-Login-User  3      
VALUE      Service-Type      Callback-Framed-User 4      
VALUE      Service-Type      Outbound-User        5      
VALUE      Service-Type      Administrative-User  6      
VALUE      Service-Type      NAS-Prompt-User      7      
VALUE      Service-Type      Authenticate-Only    8      
VALUE      Service-Type      Call-Check           10
VALUE      Service-Type      SIP-Session         15

### Sip-Method Values ###
#VALUE Sip-Method         Undefined      0
VALUE Sip-Method         Invite         1
VALUE Sip-Method         Cancel         2
VALUE Sip-Method         Ack            4
VALUE Sip-Method         Bye           8
VALUE Sip-Method         Info           16
VALUE Sip-Method         Options        32
VALUE Sip-Method         Update         64
VALUE Sip-Method         Register       128
VALUE Sip-Method         Message        256
VALUE Sip-Method         Subscribe      512
VALUE Sip-Method         Notify         1024
VALUE Sip-Method         Prack          2048
VALUE Sip-Method         Refer          4096
VALUE Sip-Method         Other          8192
####acct-status#####
VALUE Acct-Status-Type     Start             1         # RFC2866, acc
VALUE Acct-Status-Type     Stop              2         # RFC2866, acc
VALUE Acct-Status-Type     Failed           15         # RFC2866, acc






 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20110118/a4c53440/attachment.html>


More information about the Freeradius-Users mailing list