Ограничение списка телефонных зон
Ограничение списка телефонных зон
Можно ли запретить клиентам (имеется в виду SIP-телефония) звонки на определенные зоны/направления (или задать список разрешенных зон/направлений) средствами биллинга?
Смысл - в желании разрешить пользователям одного тарифного плана звонить только на городские номера, а пользователям другого тарифного плана - и на межгород/сотовые тоже.
Пробовали в тарифном плане (в услуге телефонии) в редакторе цен оставить только нужные зоны, но тогда при звонке на зоны вне этого списка радиус все равно разрешает звонок, просто тарифицирует по 0.00 руб. При этом он правильно определяет зону и направление.
Смысл - в желании разрешить пользователям одного тарифного плана звонить только на городские номера, а пользователям другого тарифного плана - и на межгород/сотовые тоже.
Пробовали в тарифном плане (в услуге телефонии) в редакторе цен оставить только нужные зоны, но тогда при звонке на зоны вне этого списка радиус все равно разрешает звонок, просто тарифицирует по 0.00 руб. При этом он правильно определяет зону и направление.
шлюз отправляет все, что требуется и от радиуса получает тоже все необходимое. проблема именно в том, что билинг определяет зону и направление вызова (хотя они не включены в тарифный план того номера. с которого осуществляется вызов), вычисляет количество доступных для разговора денег и пропускает этот вызов. но т.к. в тарифном плане зоны и направления нет, тарифицирует вызов с нулевой стоимостью.serjk писал(а): Судя по всему, Ваш шлюз не отправляет Access-Request запросов на RADIUS. Т.е. дело в настройках шлюза.
в следующем сообщении выведу листинг радиус дебага такого вызова
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: User <2148084> with realm <*.*.*.*> connecting
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Realm *.*.*.* is internal, dropping it
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Session for sessionid <2148084@*.*.*.*> not found in <10.0.2.1> cache
?Debug : Apr 02 09:44:42 b7f78b90 RADIUS DBA: Info for login <2148084> found. type <3>
?Debug : Apr 02 09:44:42 b7f78b90 RADIUS DBA: Password found for tel login:2148084
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Auth scheme: Digest
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <2148084> type <10> length <9>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <*.*.*.*> type <1> length <15>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <UzuHzlM7hqLY1alRhTygvTcMDpgymLvGDjZVmZ3Pekgv7vP+gEr7Qw==> type <2> length <58>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <sip:89226150586@*.*.*.*> type <4> length <31>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <INVITE> type <3> length <8>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <auth> type <5> length <6>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <00000001> type <9> length <10>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <7994e943> type <8> length <10>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Hash1 <e0155fbc82cb0726c4381271da7bfa6b>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Hash2 <1e019f11a42e6b4c2a4a74c746fe4e9a>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: kd <e0155fbc82cb0726c4381271da7bfa6b:UzuHzlM7hqLY1alRhTygvTcMDpgymLvGDjZVmZ3Pekgv7vP+gEr7Qw==:00000001:7994e943
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: kd hash <58bd4b4519c42748164345a69ebd8c4e>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Responce <58bd4b4519c42748164345a69ebd8c4e>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Responce success!
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Tel session limit:1 session count:0 for user:2148084
?Debug : Apr 02 09:44:42 b7f78b90 UT: slink_id 1000027437 tarif_key_common 166
Info : Apr 02 09:44:42 b7f78b90 UT: calc timeout
Info : Apr 02 09:44:42 b7f78b90 UT: t 1396410282, left money 11126.650000
Info : Apr 02 09:44:42 b7f78b90 UT: tr_id 1, mult 0.000000, next 1396461600
Info : Apr 02 09:44:42 b7f78b90 UT: quantity 51318 for borders
Info : Apr 02 09:44:42 b7f78b90 UT: border 0 cost 0.000000
Info : Apr 02 09:44:42 b7f78b90 UT: after borders q=51318, downloaded=51322, downed_as_prepaid=0 cost_info size <1>
Info : Apr 02 09:44:42 b7f78b90 UT: added entire 51318
Info : Apr 02 09:44:42 b7f78b90 UT: i==cost_info->end()
Info : Apr 02 09:44:42 b7f78b90 UT: session_timeout <51318> session_limit <210909> old_session_timeout <0>
Info : Apr 02 09:44:42 b7f78b90 UT: t 1396461600, left money 11126.650000
Info : Apr 02 09:44:42 b7f78b90 UT: tr_id 1, mult 0.000000, next 1396548000
Info : Apr 02 09:44:42 b7f78b90 UT: quantity 86400 for borders
Info : Apr 02 09:44:42 b7f78b90 UT: border 0 cost 0.000000
Info : Apr 02 09:44:42 b7f78b90 UT: after borders q=86400, downloaded=137722, downed_as_prepaid=0 cost_info size <1>
Info : Apr 02 09:44:42 b7f78b90 UT: added entire 86400
Info : Apr 02 09:44:42 b7f78b90 UT: i==cost_info->end()
Info : Apr 02 09:44:42 b7f78b90 UT: session_timeout <137718> session_limit <210909> old_session_timeout <51318>
Info : Apr 02 09:44:42 b7f78b90 UT: t 1396548000, left money 11126.650000
Info : Apr 02 09:44:42 b7f78b90 UT: tr_id 1, mult 0.000000, next 1396634400
Info : Apr 02 09:44:42 b7f78b90 UT: quantity 86400 for borders
Info : Apr 02 09:44:42 b7f78b90 UT: border 0 cost 0.000000
Info : Apr 02 09:44:42 b7f78b90 UT: after borders q=86400, downloaded=224122, downed_as_prepaid=0 cost_info size <1>
Info : Apr 02 09:44:42 b7f78b90 UT: added entire 86400
Info : Apr 02 09:44:42 b7f78b90 UT: i==cost_info->end()
Info : Apr 02 09:44:42 b7f78b90 UT: session_timeout <224118> session_limit <210909> old_session_timeout <137718>
Info : Apr 02 09:44:42 b7f78b90 UT: session_timeout > session_limit or session_timeout - old_session_timeout too small. Breaking ...
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Calculated maximum session time: 210909 zoneid: 166 dir id: 4005124
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Tel num:<2148084>. Setting xpgk-ep-number/h323-ivr-in ...
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Tel num:<>. Setting xpgk-ep-number/h323-ivr-in ...
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Sending timeout h323-credit-time=210909
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Sending h323-credit-amount=11126.65
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Calling fill radius attributes for service. Attr storage size <0>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Calling fill radius attributes for slink. Attr storage size <0>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Calling fill radius attributes for NAS. Attr storage size <0>
Notice: Apr 02 09:44:42 b7f78b90 AuthServer: Login OK <2148084> from NAS <10.0.2.1> CLID <2148084> Calling-station <89226150586>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Realm *.*.*.* is internal, dropping it
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Session for sessionid <2148084@*.*.*.*> not found in <10.0.2.1> cache
?Debug : Apr 02 09:44:42 b7f78b90 RADIUS DBA: Info for login <2148084> found. type <3>
?Debug : Apr 02 09:44:42 b7f78b90 RADIUS DBA: Password found for tel login:2148084
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Auth scheme: Digest
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <2148084> type <10> length <9>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <*.*.*.*> type <1> length <15>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <UzuHzlM7hqLY1alRhTygvTcMDpgymLvGDjZVmZ3Pekgv7vP+gEr7Qw==> type <2> length <58>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <sip:89226150586@*.*.*.*> type <4> length <31>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <INVITE> type <3> length <8>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <auth> type <5> length <6>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <00000001> type <9> length <10>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Attributes value <7994e943> type <8> length <10>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Hash1 <e0155fbc82cb0726c4381271da7bfa6b>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Hash2 <1e019f11a42e6b4c2a4a74c746fe4e9a>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: kd <e0155fbc82cb0726c4381271da7bfa6b:UzuHzlM7hqLY1alRhTygvTcMDpgymLvGDjZVmZ3Pekgv7vP+gEr7Qw==:00000001:7994e943
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: kd hash <58bd4b4519c42748164345a69ebd8c4e>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Responce <58bd4b4519c42748164345a69ebd8c4e>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Digest-Responce success!
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Tel session limit:1 session count:0 for user:2148084
?Debug : Apr 02 09:44:42 b7f78b90 UT: slink_id 1000027437 tarif_key_common 166
Info : Apr 02 09:44:42 b7f78b90 UT: calc timeout
Info : Apr 02 09:44:42 b7f78b90 UT: t 1396410282, left money 11126.650000
Info : Apr 02 09:44:42 b7f78b90 UT: tr_id 1, mult 0.000000, next 1396461600
Info : Apr 02 09:44:42 b7f78b90 UT: quantity 51318 for borders
Info : Apr 02 09:44:42 b7f78b90 UT: border 0 cost 0.000000
Info : Apr 02 09:44:42 b7f78b90 UT: after borders q=51318, downloaded=51322, downed_as_prepaid=0 cost_info size <1>
Info : Apr 02 09:44:42 b7f78b90 UT: added entire 51318
Info : Apr 02 09:44:42 b7f78b90 UT: i==cost_info->end()
Info : Apr 02 09:44:42 b7f78b90 UT: session_timeout <51318> session_limit <210909> old_session_timeout <0>
Info : Apr 02 09:44:42 b7f78b90 UT: t 1396461600, left money 11126.650000
Info : Apr 02 09:44:42 b7f78b90 UT: tr_id 1, mult 0.000000, next 1396548000
Info : Apr 02 09:44:42 b7f78b90 UT: quantity 86400 for borders
Info : Apr 02 09:44:42 b7f78b90 UT: border 0 cost 0.000000
Info : Apr 02 09:44:42 b7f78b90 UT: after borders q=86400, downloaded=137722, downed_as_prepaid=0 cost_info size <1>
Info : Apr 02 09:44:42 b7f78b90 UT: added entire 86400
Info : Apr 02 09:44:42 b7f78b90 UT: i==cost_info->end()
Info : Apr 02 09:44:42 b7f78b90 UT: session_timeout <137718> session_limit <210909> old_session_timeout <51318>
Info : Apr 02 09:44:42 b7f78b90 UT: t 1396548000, left money 11126.650000
Info : Apr 02 09:44:42 b7f78b90 UT: tr_id 1, mult 0.000000, next 1396634400
Info : Apr 02 09:44:42 b7f78b90 UT: quantity 86400 for borders
Info : Apr 02 09:44:42 b7f78b90 UT: border 0 cost 0.000000
Info : Apr 02 09:44:42 b7f78b90 UT: after borders q=86400, downloaded=224122, downed_as_prepaid=0 cost_info size <1>
Info : Apr 02 09:44:42 b7f78b90 UT: added entire 86400
Info : Apr 02 09:44:42 b7f78b90 UT: i==cost_info->end()
Info : Apr 02 09:44:42 b7f78b90 UT: session_timeout <224118> session_limit <210909> old_session_timeout <137718>
Info : Apr 02 09:44:42 b7f78b90 UT: session_timeout > session_limit or session_timeout - old_session_timeout too small. Breaking ...
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Calculated maximum session time: 210909 zoneid: 166 dir id: 4005124
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Tel num:<2148084>. Setting xpgk-ep-number/h323-ivr-in ...
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Tel num:<>. Setting xpgk-ep-number/h323-ivr-in ...
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Sending timeout h323-credit-time=210909
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Sending h323-credit-amount=11126.65
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Calling fill radius attributes for service. Attr storage size <0>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Calling fill radius attributes for slink. Attr storage size <0>
?Debug : Apr 02 09:44:42 b7f78b90 AuthServer: Calling fill radius attributes for NAS. Attr storage size <0>
Notice: Apr 02 09:44:42 b7f78b90 AuthServer: Login OK <2148084> from NAS <10.0.2.1> CLID <2148084> Calling-station <89226150586>
пожоже разобрались.
софт-свитч (камалио, если кому интересно) для авторизации выдавал данные по таким параметрам:
Calling-Station-Id=$tU; Called-Station-Id=$fU
а нужно было наоборот:
Calling-Station-Id=$fU; Called-Station-Id=$tU
по названию переменных, думаю, всем понятно что они содержат.
на авторизацию это не влияло, т.к. юзернейм и пассворд передавались другими переменными.
софт-свитч (камалио, если кому интересно) для авторизации выдавал данные по таким параметрам:
Calling-Station-Id=$tU; Called-Station-Id=$fU
а нужно было наоборот:
Calling-Station-Id=$fU; Called-Station-Id=$tU
по названию переменных, думаю, всем понятно что они содержат.
на авторизацию это не влияло, т.к. юзернейм и пассворд передавались другими переменными.