Вынос MAC адреса из cisco-avp-pair в Calling-Station-Id

Материал из BiTel WiKi

Версия от 11:03, 18 июня 2008; Admin (Обсуждение | вклад)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Вынос MAC адреса из cisco-avp-pair в Calling-Station-Id. В результате MAC адрес отображается в номере звонящего и может быть использован в ограничениях по номеру звонящего для разрешения входа логина с определенного MACа.

import bitel.billing.server.radius.*;
 
prefix = "client-mac-address";
length = prefix.length();
 
attributes = request.getVendorAttributes( Vendors.CISCO, CiscoVendor.Cisco_AVPair );
if( attributes != null )
for( it = attributes.iterator(); it.hasNext(); )
{
     ra = (RadiusAttribute)it.next();
     value = ra.getStringValue();
 
     if( value.startsWith( prefix ) )
     {
        request.setStringAttribute( RadiusStandartAttributes.Calling_Station_Id, value.substring( length + 1 )  );
     }
}
Личные инструменты