Re: Asterisk & Radius
фуф... начнем...
Radius Cisco VSA - атрибуты и прочая нужная фигня... расписано все...
http://www.cisco.com/en/US/products/sw/iosswrel/ps1835/products_programming_reference_guide09186a00800b5e17.html
FreeRADIUS & rfc
http://www.freeradius.org/features.html
http://www.freeradius.org/rfc/rfc2866.html
http://www.freeradius.org/rfc/rfc2865.html
Начальное ТЗ - авторизация по IP
лог радиуса:
1.Запрос доступа
Code: Access-Request, Identifier: 211, Length: 563, NAS: 192.168.0.20, Port: 1812. Dump:
User-Name = "************"
User-Password = "**************"
NAS-IP-Address = 192.168.0.20
NAS-Port-Type = Async
Service-Type = Login-User
Called-Station-Id = "74232******" - номер куда звоним
Calling-Station-Id = "7095*******" - номер откуда звоним
Cisco-AVPair = "xpgk-request-type=number"
H323-conf-id = "h323-conf-id=123213123 21312312 21312 123123"
Cisco-AVPair = "h323-call-id=0000001D 1212312312 1231 23123123"
H323-gw-id = "h323-gw-id=***,***,***,***" ип звонящей стороны
Cisco-AVPair = "h323-gw-address=***,***,***,***"
H323-remote-address = "h323-remote-address=192.168.0.10" куда приходит звонок
Cisco-AVPair = "h323-remote-id=192.168.0.10"
Cisco-AVPair = "xpgk-src-number-in=7095*******"
Cisco-AVPair = "xpgk-src-number-out=7095*******"
Cisco-AVPair = "xpgk-dst-number-in=74232******"
Cisco-AVPair = "xpgk-dst-number-out=74232******"
Cisco-AVPair = "xpgk-route-retries=1"
Client-IP-Address = 192.168.0.20
192.168.0.20 - это наш астериск
2.Запрос учета
2.1.Старт
Code: Accounting-Request, Identifier: 211, Length: 227, NAS: 192.168.0.20, Port: 1813. Dump:
Acct-Status-Type = Start
User-Name = "***.***.***.***"
NAS-IP-Address = 192.168.0.20
NAS-Port-Type = Async
Service-Type = Login-User
Acct-Delay-Time = 0
Called-Station-Id = "74232******"
Calling-Station-Id = "7095*******"
Acct-Session-Id = "9c6c23ea-30442-VOIP/00:00:20.000 VLAST Wed Apr 27 2005/***.***.***.***/53C1A63A E659201F 17A1C687 B4DD5223/originate/VoIP////192.168.0.10"
Client-IP-Address = 192.168.0.20
2.2.Стоп
Code: Accounting-Request, Identifier: 211, Length: 327, NAS: 192.168.0.20, Port: 1813. Dump:
Acct-Status-Type = Stop
User-Name = "***.***.***.***"
NAS-IP-Address = 192.168.0.20
NAS-Port-Type = Async
Service-Type = Login-User
Acct-Input-Packets = 220996
Acct-Output-Packets = 228891
Acct-Input-Octets = 229409
Acct-Output-Octets = 221042
Called-Station-Id = "74232******"
Calling-Station-Id = "7095*******"
Acct-Delay-Time = 0
Acct-Session-Time = 0
Acct-Session-Id = "9c6c23ea-30442-VOIP/00:00:20.000 VLAST Wed Apr 27 2005/***.***.***.***/53C1A63A E659201F 17A1C687 B4DD5223/originate/VoIP/00:01:06.000 VLAST Wed Apr 27 2005/00:01:06.000 VLAST Wed Apr 27 2005/1f/192.168.0.10"
Client-IP-Address = 192.168.0.20
нужно как-то вычислять H323-conf-id для sip & iax звонков...
киска как-то это делает для сип звонков...
вот кажется пока все...
|