[OpenSIPS-Users] Opensips 1.10 + Freeradius

Rodrigo Ferreira rsferreira08 at gmail.com
Tue Oct 8 14:13:39 CEST 2013


I got freeradius working with OpenSIPs, but I think that my OpenSIPs isnt
sending accounting_start_query, because I can only see in freeradius log
some "update" queries, and it wont work, since there is no row to update.

When I place a call, my freeradius isnt receiving anything, but when I
hangup i got this:

(...)
Ready to process requests.
rad_recv: Accounting-Request packet from host 127.0.0.1 port 52448, id=10,
length=443
        Acct-Status-Type = Stop
        Service-Type = SIP-Session
        Sip-Response-Code = 200
        Sip-Method = Bye
        Event-Timestamp = "Oct  8 2013 09:09:03 BRT"
        Sip-From-Tag = "683688623"
        Sip-To-Tag = "3f149b29"
        Acct-Session-Id = "1917414787-5062-2 at BJC.BGI.BAA.BBJ"
        User-Name = "3436642001 at 201.62.48.28"
        Calling-Station-Id = "sip:3436642001 at 201.62.48.28"
        Called-Station-Id = "sip:3436642000 at 201.62.48.28"
        Sip-Translated-Request-URI = "sip:3436642000 at 201.62.48.152:5060
;rinstance=a84194dad5d7f3e4;transport=UDP"
        Canonical-URI = "sip:3436642000 at 201.62.48.152:5060
;rinstance=a84194dad5d7f3e4;transport=UDP"
        User-Agent = "Grandstream HT-502  V1.2A 1.0.6.13  chip V2.2"
        Contact = "<sip:3436642001 at 201.62.48.152:5062>"
        NAS-Port = 5060
        Acct-Delay-Time = 0
        NAS-IP-Address = 127.0.0.1

(...)

++[radutmp] returns ok
[sql]   expand:           CALL update_radacct_record(
'radius',                 '%S',                 '%{Acct-Delay-Time}',
          '%{Connect-Info}',                 '%{X-RTP-Stat}',
   '%{Acct-Session-Id}',                 '%{Sip-To-Tag}',
'%{Sip-From-Tag}'                 ) ->           CALL
update_radacct_record(                 'radius',
'2013-10-08 09:09:03',                 '0',                 '',
    '',                  '1917414787-5062-2 at BJC.BGI.BAA.BBJ',
  '3f149b29',                 '683688623'                 )
[sql]   expand: /var/log/freeradius/sqltrace-%Y%m%d.log ->
/var/log/freeradius/sqltrace-20131008.log


(...)

Atenciosamente.
Eng.° Rodrigo Ferreira
ITIL v3 Certified

<http://br.linkedin.com/pub/rodrigo-ferreira/31/757/901>


2013/10/7 Rodrigo Ferreira <rsferreira08 at gmail.com>

> Its INCLUDE i double check
>
>
>
> Atenciosamente.
> Eng.° Rodrigo Ferreira
> ITIL v3 Certified
>
>  <http://br.linkedin.com/pub/rodrigo-ferreira/31/757/901>
>
>
> 2013/10/7 Mike Tesliuk <mike at ultra.net.br>
>
>> on the client i think that should be $INCLUDE not INCLUDE
>>
>>
>> 2013/10/7 Rodrigo Ferreira <rsferreira08 at gmail.com>
>>
>>> I did Mike.
>>>
>>> ### radiusclient dictionary
>>>
>>> root at opensips:/etc# cat radiusclient-ng/dictionary | grep opensips
>>> INCLUDE dictionary.opensips
>>> root at opensips:/etc# ls radiusclient-ng/dictionary.opensips
>>> radiusclient-ng/dictionary.opensips
>>>
>>>
>>> ### freeradius dictionary
>>> root at opensips:/etc# cat freeradius/dictionary | grep opensips
>>> $INCLUDE        /etc/freeradius/dictionary.opensips
>>> root at opensips:/etc# ls /etc/freeradius/dictionary.opensips
>>> /etc/freeradius/dictionary.opensips
>>>
>>>
>>>
>>>
>>> Atenciosamente.
>>> Eng.° Rodrigo Ferreira
>>> ITIL v3 Certified
>>>
>>> <http://br.linkedin.com/pub/rodrigo-ferreira/31/757/901>
>>>
>>>
>>> 2013/10/7 Mike Tesliuk <mike at ultra.net.br>
>>>
>>>> Rodrigo,
>>>>
>>>> did you check if this file is being included by your main dictionary
>>>> file ?  ( /etc/radiusclient-ng/dictionary ) (on client and on the server)
>>>>
>>>>
>>>> 2013/10/7 Rodrigo Ferreira <rsferreira08 at gmail.com>
>>>>
>>>>>  Hi guys,
>>>>>
>>>>> I'm stucked trying to get my freeradius working with my OpenSIPs. I'm
>>>>> getting this error from my OpenSIPs.
>>>>>
>>>>> Oct  7 12:00:00 opensips /sbin/opensips[11265]: rc_avpair_new: unknown
>>>>> attribute 0
>>>>> Oct  7 12:00:00 opensips /sbin/opensips[11265]:
>>>>> ERROR:aaa_radius:rad_avp_add: failure
>>>>> Oct  7 12:00:00 opensips /sbin/opensips[11265]:
>>>>> ERROR:acc:acc_aaa_request: failed to add Sip-Response-Code, 2
>>>>>
>>>>> I saw a few topics that tells me to check my radiusclient dictionary,
>>>>> but I did that several times, and its ok, both freeradius and radiusclient
>>>>> use the same dictionary.
>>>>>
>>>>> root at opensips:/etc/radiusclient-ng# cat
>>>>> /etc/freeradius/dictionary.opensips
>>>>> #
>>>>> # SIP RADIUS attributes
>>>>> #
>>>>> # Schulzrinne indicates attributes according to
>>>>> # draft-schulzrinne-sipping-radius-accounting-00
>>>>> #
>>>>> # Proprietary indicates an attribute that hasn't
>>>>> # been standardized
>>>>> #
>>>>> #
>>>>> # NOTE: All standard (IANA registered) attributes are
>>>>> #       defined in the default dictionary of the
>>>>> #       radiusclient-ng library.
>>>>> #
>>>>>
>>>>> ### Take standard attributes from the radiusclient-ng dictionaries ###
>>>>>
>>>>> #$INCLUDE               /etc/radiusclient-ng/dictionary
>>>>>
>>>>> ### SIP Attributes ###
>>>>> ATTRIBUTE Sip-Method                   101  integer    # Schulzrinne,
>>>>> acc
>>>>> ATTRIBUTE Sip-Response-Code            102  integer    # Schulzrinne,
>>>>> acc
>>>>> ATTRIBUTE Sip-Cseq                     103  string     # Schulzrinne,
>>>>> acc
>>>>> ATTRIBUTE Sip-To-Tag                   104  string     # Schulzrinne,
>>>>> acc
>>>>> ATTRIBUTE Sip-From-Tag                 105  string     # Schulzrinne,
>>>>> acc
>>>>> ATTRIBUTE Sip-Branch-ID                106  string
>>>>> ATTRIBUTE Sip-Translated-Request-URI   107  string     # Proprietary,
>>>>> acc
>>>>> 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 Billing-Party                218  string
>>>>> ATTRIBUTE SIP-AVP                      225  string     # Proprietary,
>>>>> avp_radius
>>>>>
>>>>> ### 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         Publish        8192
>>>>> VALUE Sip-Method         Other          16384
>>>>>
>>>>> ### Sip-Response-Code Values ###
>>>>> VALUE Sip-Response-Code  Undefined      0
>>>>> VALUE Sip-Response-Code  Invite         1
>>>>> VALUE Sip-Response-Code  Cancel         2
>>>>> VALUE Sip-Response-Code  Ack            4
>>>>> VALUE Sip-Response-Code  Bye            8
>>>>> VALUE Sip-Response-Code  Info           16
>>>>> VALUE Sip-Response-Code  Options        32
>>>>> VALUE Sip-Response-Code  Update         64
>>>>> VALUE Sip-Response-Code  Register       128
>>>>> VALUE Sip-Response-Code  Message        256
>>>>> VALUE Sip-Response-Code  Subscribe      512
>>>>> VALUE Sip-Response-Code  Notify         1024
>>>>> VALUE Sip-Response-Code  Prack          2048
>>>>> VALUE Sip-Response-Code  Refer          4096
>>>>> VALUE Sip-Response-Code  Publish        8192
>>>>> VALUE Sip-Response-Code  Other          16384
>>>>>
>>>>> ### Acct-Status-Type Values ###
>>>>> VALUE Acct-Status-Type     Start             1         # RFC2866, acc
>>>>> VALUE Acct-Status-Type     Stop              2         # RFC2866, acc
>>>>> VALUE Acct-Status-Type     Failed           15         # RFC2866, acc
>>>>>
>>>>> ### Service-Type Values ###
>>>>> VALUE Service-Type         Call-Check       10         # RFC2865,
>>>>> uri_radius
>>>>> VALUE Service-Type         Group-Check      12         # Proprietary,
>>>>> group_radius
>>>>> VALUE Service-Type         Sip-Session      15         # Schulzrinne,
>>>>> acc, auth_radius
>>>>> VALUE Service-Type         SIP-Caller-AVPs  30         # Proprietary,
>>>>> avp_radius
>>>>> VALUE Service-Type         SIP-Callee-AVPs  31         # Proprietary,
>>>>> avp_radius
>>>>>
>>>>> ### Attributes added by AG Projects ###
>>>>> ATTRIBUTE       Source-IP              214     string
>>>>> ATTRIBUTE       Source-Port            215     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       Event-Timestamp       230     string
>>>>> ATTRIBUTE       SIP-Proxy-IP           231     string
>>>>> ATTRIBUTE       ENUM-TLD               232     string
>>>>>
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> Atenciosamente.
>>>>> Eng.° Rodrigo Ferreira
>>>>> ITIL v3 Certified
>>>>>
>>>>> <http://br.linkedin.com/pub/rodrigo-ferreira/31/757/901>
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at lists.opensips.org
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20131008/30341a0e/attachment-0001.htm>


More information about the Users mailing list