radius服务器显示的计费信息错误

开始的时候,radius服务器收到opensips发送的计费开始消息后,显示的计费信息有错误:

 

Service-Type=IAPP_Register

EAP-Key-Name="\000\000\000\310"

Error-Cause=Invite

在/usr/local/etc/radiusclient-ng/dictiongary.opensips中,我已经进行了如下的设置:

#### 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
ATTRIBUTE Sip-Method               101 integer
ATTRIBUTE Sip-Response-Code  102 integer
ATTRIBUTE  Sip-To-Tag                 104 string
ATTRIBUTE  Sip-From-Tag            105 string
ATTRIBUTE  Sip-Translated-Request-URI  107 string
#ATTRIBUTE   Contact             100    string    #zyh defined
ATTRIBUTE   Event-Time-Stamp           55    integer
ATTRIBUTE Acct-Status-Type   40  integer 
### 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       SIP-Session          15
#####Acct-Status-Type Values############
VALUE Acct-Status-Type Start  1
VALUE Acct-Status-Type Stop   2
### 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

但是显示的属性明显不是我设置的,而是rfc文件中设定的,经过一番思索,原来问题出在/usr/local/etc/raddb/dictionary文件中,

在该文件的开始应经由一行:$INCLUDE /usr/local/share/freeradius/dictionary ,为了opensips 配合做计费,需要在文件中包含opensips的dictionary文件,即在/usr/local/etc/raddb/dictionary文件中添加一行:$INCLUDE /usr/local/etc/radiusclient-ng/dictionary.opensips,我在添加的时候,将这一行添加在了文件的头部,所以才出现了上述问题,正确的做法应该是添加在文件的$INCLUDE /usr/local/share/freeradius/dictionary 这一行的下面,而不是上面,这样才可以用自己定义的属性覆盖rfc文件中的属性 ,得到正确的显示信息:

Service-Type = Sip-Session

Sip-Method=Invite

 

 

你可能感兴趣的:(radius服务器显示的计费信息错误)