Здравствуйте.
Не могу решить проблемку: имеется 2 номера, на один звонят, на другой переадресовывается. Как не ковырял не ловятся они никак, ни один, ни другой. Абсолютно уверен, что конфиг непральный, но как сделать пральный, чтобы других не обсчитать не знаю. Помогите кто чем может:)
Вот такие вот штуковины:
Конфиг Voip:
Код:
#вендоры - производители оборудования и их коды
vendors=9=Cisco;2011=Huawei;2021=Unix PPP;529=Lucent;6618=Quintum;529=Ascend
#минимальная и максимальная длина пароля
password.length.min=5
password.length.max=16
#длина автоматически генерируемого пароля
password.length.auto=6
#допустимые в пароле символы
password.chars=1234567890
#сколько лет отображать в просмотре сессий через web
showyears=5
#XSL для печати и отправки на почту сессий
xslt.1=voiceip_login_sessions.xsl
xslt.1.csv=voiceip_login_sessions_csv.xsl
reportTitle.1=ТЕЛЕФОН звонки
#XSL для печати и отправки на почту наработки по логинам
xslt.2=voiceip_login_amount.xsl
xslt.2.csv=voiceip_login_amount_csv.xsl
reportTitle.2=ТЕЛЕФОН итого
#XSL для печати и отправки на почту наработки логина по направлениям
xslt.3=voiceip_login_direct.xsl
xslt.3.csv=voiceip_login_direct_csv.xsl
reportTitle.3=Наработка логина телефон по направлениям.
#в просмотре сессий в Web статистике кол-во выводимых на странице сессий
show.sessions.on.page=25
#названия пунктов Web - меню
web.menuItem1=ТЕЛЕФОН звонки
web.menuItem2=ТЕЛЕФОН итого
#web.menuItem3=Смена пароля на логины VoiceIp
web.menuItem3=none
web.menuItem4=none
web.menuItem5=none
#web.menuitem2=none
#web.menuItem3=Наработка логина VoiceIp по направлениям
#граница не карточных логинов
top.nocard.login=10000
#----------------------------------------
#выборочное отключение проверки закрытого периода
#Перенос логина с даты
#closed.date.disabled.ActionWrapLogin=1
#перобсчет
#closed.date.disabled.ActionRecalculateSessions=1
#установка баланса
#closed.date.disabled.ActionSetBalance=1
#редактирование логина
#closed.date.disabled.ActionUpdateLoginInfo=1
#----------------------------------------
############### опции RADIUS сервера #######################
#1 - проверять наличие в договоре всех требуемых услуг при авторизации, иначе ошибка авторизации "Service deny"
check.service=0
#код модуля "карточки", 0 - модуль "карточки" не используется
card.module.id=0
#максимальная длительность сессии
voip.max.time=1800
#Атрибуты радиуса доступные в списке атрибутов в редактировании логина
radius.attributes==NAS-Identifier;User-Name;NAS-IP-Address;Calling-Station-Id
#игнорируемые Disconnect cause через запятую
#звонки с такими Disconnect cause будут считается нулевой длины (через ,)
voip.ignore.dc=66
#установка цветов для подсветки Disconnect-Cause в мониторе DC:HEX Color
voip.monitor.dc.color=10:00ff00;3:ff0000;22:ff00ff;11:ffff00
# режимы поиска логинов
###findmode.0.title=Поиск по User-Name=LOGIN
###findmode.0.value=User-Name=LOGIN
###findmode.1.title=Поиск по User-Name=ALIAS
###findmode.1.value=User-Name=ALIAS
###findmode.2.title=Поиск по Calling-Station-Id=ALIAS
###findmode.2.value=Calling-Station-Id=ALIAS
findmode.0.title=Поиск по User-Name=LOGIN
findmode.0.value=User-Name=LOGIN
findmode.1.title=Поиск по NAS-IP-Address
findmode.1.value=NAS-IP-Address=ALIAS
findmode.2.title=Поиск по Calling-Station-Id
findmode.2.value=Calling-Station-Id=ALIAS
findmode.3.title=Поиск по Called-Station-Id
findmode.3.value=Called-Station-Id=ALIAS
findmode.4.title=Поиск по User-Name=ALIAS
findmode.4.value=User-Name=ALIAS
#
#find.order=0,1,2
#
#цвета ASR(%) и ACD(сек) в отчёте договора, в зависимости от значения
#color.asr=0-30:#dd0000;30-100:#ffffff
#color.acd=0-60:#dd0000
Для NAS
Код:
#Код услуги, заданный в редакторе модулей и услуг
service=8
find.order=2,3,1
#acct.out=all/all
#acct.out=voip/originate
#acct.in=voip/answer
acct.in=voip/originate
acct.out=voip/answer
Скрипт предобработки:
Код:
import bitel.billing.server.radius.*;
import java.util.regex.*;
// Получаем параметры пакета - направление звонка, АОН абонента А, АОН абонента В
direction = request.getFlag();
callingStation = request.getStringAttribute( RadiusStandartAttributes.Calling_Station_Id );
calledStation = request.getStringAttribute( RadiusStandartAttributes.Called_Station_Id );
userName = request.getStringAttribute( RadiusStandartAttributes.User_Name );
print( "DEBUG: original direction = " + direction );
print( "DEBUG: User_Name = " + userName );
if( callingStation == null ) {
print ( "ERROR: callingStationId not found!" );
return;
}
if( calledStation == null ) {
print ( "ERROR: calledStationId not found!" );
return;
}
// Отмена установленного обратного направления и установка режима поиска по User-Name, если dial peer исходящий
if( (userName.equals( "OPORA_OUT" ) ) || (userName.equals( "PRI_and_H323" )) || (userName.equals( "TeleNET" )) || (userName.equals( "DigiTel" )) || (userName.equals( "TACKLE_cisco" )) || (userName.equals( "DigiTel_new" )) || (userName.equals( "VTK" )) || (userName.equals( "StarGate" )) ) {
print( "DEBUG: double-reversed dial peer detected: " + userName );
if( direction == 2 ) {
request.setFlag( 1 );
}
if( direction == 1 ) {
request.setFlag( 2 );
}
direction = request.getFlag();
print( "DEBUG: double-reversed direction = " + direction );
request.setOption( "find.mode", 4 );
print( "DEBUG: set find.mode = User_Name for userName: " + userName );
}
// Отмена установленного обратного направления, если dial peer исходящий
if( (userName.equals( "RosTelecom-->" )) ) {
print( "DEBUG: double-reversed dial peer detected: " + userName );
if( direction == 2 ) {
request.setFlag( 1 );
}
if( direction == 1 ) {
request.setFlag( 2 );
}
direction = request.getFlag();
print( "DEBUG: double-reversed direction = " + direction );
// request.setOption( "find.mode", 4 );
// print( "DEBUG: set find.mode = User_Name for userName: " + userName );
}
// Установка услуги "Входящие звонки", если звонок входящий
if( direction == 2 ) {
print ( "DEBUG: Set serviceID for in-calls coz direction is " + direction );
request.setOption( "service", 21 );
}
// *** Нормализация номера вызывающего абонента ***
print( "DEBUG: original callingStationId = " + callingStation );
// если 10 цыфр + @ + IP !!!!!!!!!! контроль входящего для 8-800 по SIP
if( callingStation.matches( "\\d{10}@.*" )) {
callingStation = callingStation.substring(0,10);
print( "DEBUG: (10digit)@IP detected: now callingStation = " + callingStation );
print( "DEBUG: set callingStation = " + callingStation );
}
// callingStation = "7" + callingStation;
// Добавить 7, если формат 10 знаков вида (***)-***-****
if( callingStation.length() == 10 ) {
callingStation = "7" + callingStation;
print( "DEBUG: no 7 prefix detected; now callingStationId = " + callingStation );
}
// Вернуть нормализованный номер вызывающего абонента
print( "DEBUG: set callingStationId = " + callingStation );
request.setStringAttribute( RadiusStandartAttributes.Calling_Station_Id, callingStation );
// *** Нормализация номера вызываемого абонента ***
print( "DEBUG: original calledStationId = " + calledStation );
// Если начинается последовательность 10 digit + @ + IP !!!!!!!!!! для причёсывания вызываемого
//if( calledStation.matches( "\\d{10}@.*" ) {
// calledStation = calledStation.substring(0,10);
// print( "DEBUG: (10digit)@IP detected: now calledStationId = " + calledStation );
// print( "DEBUG: set calledStationId = " + calledStation );
//}
// Удаление трехзначного префикса в исходящих звонках
if( direction == 1 ) {
delpref = calledStation.substring( 0,3 );
calledStation = calledStation.substring( 3 );
print( "DEBUG: GateKeeper prefix remove; now calledStationId = " + calledStation );
print( "DEBUG: DELPREFIX; now prefix = " + delpref );
}
// Если начинается последовательность 1 после @ то вернуть @1+ удалённый префикс
if( calledStation.startsWith( "1@" ) ) {
calledStation = calledStation.substring(0,1);
calledStation = "0000" + delpref + calledStation;
print( "DEBUG: ****@IP detected: now calledStationId = " + calledStation );
print( "DEBUG: set calledStationId = " + calledStation );
}
// Если начинается последовательность 2 после @ то вернуть @2+ удалённый префикс
if( calledStation.startsWith( "2@" ) ) {
calledStation = calledStation.substring(0,1);
calledStation = "0000" + delpref + calledStation;
print( "DEBUG: ****@IP detected: now calledStationId = " + calledStation );
print( "DEBUG: set calledStationId = " + calledStation );
}
// Если начинается последовательность 3 после @ то вернуть @3+ удалённый префикс
if( calledStation.startsWith( "3@" ) ) {
calledStation = calledStation.substring(0,1);
calledStation = "0000" + delpref + calledStation;
print( "DEBUG: ****@IP detected: now calledStationId = " + calledStation );
print( "DEBUG: set calledStationId = " + calledStation );
}
// Если начинается последовательность 4 после @ то вернуть @4+ удалённый префикс
if( calledStation.startsWith( "4@" ) ) {
calledStation = calledStation.substring(0,1);
calledStation = "0000" + delpref + calledStation;
print( "DEBUG: ****@IP detected: now calledStationId = " + calledStation );
print( "DEBUG: set calledStationId = " + calledStation );
}
// Если начинается последовательность 5 после @ то вернуть @5+ удалённый префикс
if( calledStation.startsWith( "5@" ) ) {
calledStation = calledStation.substring(0,1);
calledStation = "0000" + delpref + calledStation;
print( "DEBUG: ****@IP detected: now calledStationId = " + calledStation );
print( "DEBUG: set calledStationId = " + calledStation );
}
// Если начинается последовательность 6 после @ то вернуть @6+ удалённый префикс
if( calledStation.startsWith( "6@" ) ) {
calledStation = calledStation.substring(0,1);
calledStation = "0000" + delpref + calledStation;
print( "DEBUG: ****@IP detected: now calledStationId = " + calledStation );
print( "DEBUG: set calledStationId = " + calledStation );
}
// Если начинается последовательность 7 после @ то вернуть @7+ удалённый префикс
if( calledStation.startsWith( "7@" ) ) {
calledStation = calledStation.substring(0,1);
calledStation = "0000" + delpref + calledStation;
print( "DEBUG: ****@IP detected: now calledStationId = " + calledStation );
print( "DEBUG: set calledStationId = " + calledStation );
}
// Если начинается последовательность 8 после @ то вернуть @8+ удалённый префикс
if( calledStation.startsWith( "8@" ) ) {
calledStation = calledStation.substring(0,1);
calledStation = "0000" + delpref + calledStation;
print( "DEBUG: ****@IP detected: now calledStationId = " + calledStation );
print( "DEBUG: set calledStationId = " + calledStation );
}
// Если начинается последовательность 9 после @ то вернуть @9+ удалённый префикс
if( calledStation.startsWith( "9@" ) ) {
calledStation = calledStation.substring(0,1);
calledStation = "0000" + delpref + calledStation;
print( "DEBUG: ****@IP detected: now calledStationId = " + calledStation );
print( "DEBUG: set calledStationId = " + calledStation );
}
// Если начинается последовательность 0 после @ то вернуть @0+ удалённый префикс
if( calledStation.startsWith( "0@" ) ) {
calledStation = calledStation.substring(0,1);
calledStation = "0000" + delpref + calledStation;
print( "DEBUG: ****@IP detected: now calledStationId = " + calledStation );
print( "DEBUG: set calledStationId = " + calledStation );
}
// Удалить 810, если формат вида 810-x-(xxx)-xxx-xxxx...
if( calledStation.startsWith( "810" ) ) {
calledStation = calledStation.substring( 3 );
print( "DEBUG: 8-10 detected: now calledStationId = " + calledStation );
print( "DEBUG: set calledStationId = " + calledStation );
request.setStringAttribute( RadiusStandartAttributes.Called_Station_Id, calledStation );
return;
}
// Добавить 7495, если формат 7 знаков вида xxx-xxxx
if( calledStation.length() == 7 ) {
calledStation = "7495" + calledStation;
print( "DEBUG: no prefix detected: now calledStationId = " + calledStation );
}
// Удалить 8 и добавить 7, если формат вида 8(xxx)-xxx-xxxx...
if( calledStation.startsWith( "8" ) ) {
calledStation = "7" + calledStation.substring( 1 );
print( "DEBUG: 8 instead of 7 detected; now calledStationId = " + calledStation );
}
// Вернуть нормализованный номер вызываемого абонента
print( "DEBUG: set calledStationId = " + calledStation );
request.setStringAttribute( RadiusStandartAttributes.Called_Station_Id, calledStation );
И в аттаче еще.
Код:
Клиент: вер. 5.1 сборка 478 от 22.02.2011 13:50:42
os:Windows 2003; java:Sun Microsystems Inc., v.1.6.0_23
Сервер: вер. 5.1 сборка 598 от 22.02.2011 13:50:30
os:Linux; java:Sun Microsystems Inc., v.1.6.0_22
bill вер. 5.1 сборка 224 от 21.02.2011 19:54:08
dialup вер. 5.1 сборка 171 от 22.02.2011 13:50:16
ipn вер. 5.1 сборка 218 от 31.01.2011 15:32:00
npay вер. 5.1 сборка 169 от 07.02.2011 19:19:27
phone вер. 5.1 сборка 248 от 22.02.2011 13:50:11
reports вер. 5.1 сборка 171 от 22.02.2011 18:50:05
rscm вер. 5.1 сборка 147 от 23.12.2010 15:57:03
ru.bitel.bgbilling.plugins.crm вер. 5.1 сборка 175 от 18.01.2011 14:05:49
ru.bitel.bgbilling.plugins.documents вер. 5.1 сборка 117 от 18.01.2011 13:03:56
voiceip вер. 5.1 сборка 160 от 20.01.2011 20:47:59
Ах да, звонки считаются на другой договор!! Где статистика операторов
Код:
select * from log_session_1_201103 where to_number=79262059374;
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
id | type | nas_id | lid | cid | session_start | session_time | round_session_time | from_number | to_number | dest_code | zone | min_cost | session_cost | oper_id | oper_round_session_time | oper_session_cost | sid | h323_id | dc | lr
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
624 | 1 | 6 | 154 | 838 | 2011-03-01 09:23:27 | 9 | 60 | 79268367738 | 79262059374 | 2077 | 24 | 2.8 | 2.8 | 0 | 0 | 0 | 8 | 9C3E0A34 E88611D6 B16F0011 92A63780 | 10 | 642
2164 | 1 | 6 | 154 | 838 | 2011-03-01 10:13:50 | 247 | 300 | 74959884498 | 79262059374 | 2077 | 24 | 2.8 | 14 | 0 | 0 | 0 | 8 | A5F294A2 E88D11D6 B1A00011 92A63780 | 10 | 2198
3252 | 1 | 6 | 154 | 838 | 2011-03-01 10:42:18 | 23 | 60 | 74957480110 | 79262059374 | 2077 | 24 | 2.8 | 2.8 | 0 | 0 | 0 | 8 | A05F1E41 E89111D6 B1C60011 92A63780 | 10 | 3299
4910 | 1 | 6 | 154 | 838 | 2011-03-01 11:18:18 | 63 | 120 | 73000422612 | 79262059374 | 2077 | 24 | 2.8 | 5.6 | 0 | 0 | 0 | 8 | A8115CB0 E89611D6 B1ED0011 92A63780 | 10 | 4987
6503 | 1 | 6 | 154 | 838 | 2011-03-01 11:48:17 | 259 | 300 | 74953359114 | 79262059374 | 2077 | 24 | 2.8 | 14 | 0 | 0 | 0 | 8 | D7E96E46 E89A11D6 B2020011 92A63780 | 10
| 6590
При этом 154 пральный логин, а договор должен быть 868