Копирование Тunnel-Client-Endpoint/Tunnel-Server-Endpoint в Calling-Station-Id/Called-Station-Id
Материал из BiTel WiKi
(Различия между версиями)
Admin (Обсуждение | вклад) (Новая: <source lang="java"> import bitel.billing.server.radius.*; clientEndpoint = request.getStringAttribute( 66 ); serverEndpoint = request.getStringAttribute( 67 ); if( clientEndpoint != ...) |
Amir (Обсуждение | вклад) |
||
Строка 14: | Строка 14: | ||
} | } | ||
</source> | </source> | ||
+ | |||
+ | |||
+ | С версии 5.1: | ||
+ | |||
+ | <source lang="java"> | ||
+ | import ru.bitel.bgbilling.kernel.network.radius.*; | ||
+ | |||
+ | |||
+ | void processRequest( request, response, setup, con, conSlave ) | ||
+ | { | ||
+ | clientEndpoint = request.getStringAttribute( -1, 66, null ); | ||
+ | if( clientEndpoint != null ) | ||
+ | { | ||
+ | request.setStringAttribute( -1, RadiusDictionary.Calling_Station_Id, clientEndpoint ); | ||
+ | } | ||
+ | |||
+ | serverEndpoint = request.getStringAttribute( -1, 67, null ); | ||
+ | if( serverEndpoint != null ) | ||
+ | { | ||
+ | request.setStringAttribute( -1, RadiusDictionary.Called_Station_Id, serverEndpoint ); | ||
+ | } | ||
+ | } | ||
+ | </source> | ||
+ | |||
+ | |||
+ | processRequest |
Текущая версия на 11:23, 17 сентября 2010
import bitel.billing.server.radius.*; clientEndpoint = request.getStringAttribute( 66 ); serverEndpoint = request.getStringAttribute( 67 ); if( clientEndpoint != null ) { request.setStringAttribute( RadiusStandartAttributes.Calling_Station_Id, clientEndpoint ); } if( serverEndpoint != null ) { request.setStringAttribute( RadiusStandartAttributes.Called_Station_Id, serverEndpoint ); }
С версии 5.1:
import ru.bitel.bgbilling.kernel.network.radius.*; void processRequest( request, response, setup, con, conSlave ) { clientEndpoint = request.getStringAttribute( -1, 66, null ); if( clientEndpoint != null ) { request.setStringAttribute( -1, RadiusDictionary.Calling_Station_Id, clientEndpoint ); } serverEndpoint = request.getStringAttribute( -1, 67, null ); if( serverEndpoint != null ) { request.setStringAttribute( -1, RadiusDictionary.Called_Station_Id, serverEndpoint ); } }
processRequest