Voip... Не определяются направления...

Технические вопросы по UTM 5.0
Ответить
Аватара пользователя
GodDamned
Сообщения: 11
Зарегистрирован: Пн июл 31, 2006 15:45
Откуда: Оттуда

Voip... Не определяются направления...

Сообщение GodDamned »

У меня опять проблема...
В общем завожу фиктивную услугу "Телефония" добавляю ее в тарифный план "voip". Завожу юзера, прицепляю к нему тарифный план, регистрирую номер. звоню на номер 78124491716 говорю какоето время.
Получаю запись в астериске:
"","129","78124491716","default","""129"" <129>","SIP/129-d254","SIP/freecall-5d83","Dial","SIP/freecall/78124491716|60","2006-10-05
17:17:07","2006-10-05 17:17:10","2006-10-05 17:17:15",8,5,"ANSWERED","DOCUMENTATION"
превращаю ее в:
2006-10-05 17:17:10|5|129|78124491716
скармливаю utm_unif.


лог радиуса:
?Debug : Oct 05 17:18:19 RadiusSocket: RADIUS packet successfully received
?Debug : Oct 05 17:18:19 RadiusSocket: RADIUS raw data obtained
?Debug : Oct 05 17:18:19 RADIUS Packet: Size <118>; HDR.Size <118>
?Debug : Oct 05 17:18:19 AcctServer: Recv...
?Debug : Oct 05 17:18:19 AcctServer: Packet from <10.0.0.12> packet dump: RPacket:
Code: 4; ID: 1
<Vendor: 0; Attr: 5>[4]: 00000000
<Vendor: 0; Attr: 30>[11]: 3738313234343931373136
<Vendor: 0; Attr: 31>[3]: 313239
<Vendor: 0; Attr: 32>[4]: 766f6970
<Vendor: 0; Attr: 40>[4]: 00000001
<Vendor: 0; Attr: 44>[4]: 38313938
<Vendor: 9; Attr: 24>[4]: 38313938
<Vendor: 9; Attr: 25>[36]: 683332332d73657475702d74696d653d2a323030362d31302d30352031373a31373a3130

?Debug : Oct 05 17:18:19 RADIUS DBA: NAS found. Data size <0>
?Debug : Oct 05 17:18:19 AcctServer: Acct packet with session ID: 8198
?Debug : Oct 05 17:18:19 RADIUS DBA: NAS found. Data size <0>
?Debug : Oct 05 17:18:19 AcctServer: Acct-Start packet
?Debug : Oct 05 17:18:19 AcctServer: Setting interim interval <0> for session id <8198>
?Debug : Oct 05 17:18:19 AcctServer: Acct-Start: User <129>
?Debug : Oct 05 17:18:19 AcctServer: Acct-Session-Time (46) not present in accountg packet ! Setting session_time_not_present flag ...
?Debug : Oct 05 17:18:19 RADIUS DBA: Info for login <129> found. type <3>
?Debug : Oct 05 17:18:19 RADIUS DBA: Password found for tel login:129
?Debug : Oct 05 17:18:19 RADIUS DBA: info for user found. type <3> info addr <135335936>
?Debug : Oct 05 17:18:19 RADIUS DBA: search_user_info return info <135335936>
?Debug : Oct 05 17:18:19 RADIUS DBA: search_user_info return valid info
?Debug : Oct 05 17:18:19 RADIUS DBA: TELTARIFF: called number <78124491716> calling number <129> direction id <2> zone id <1>
?Debug : Oct 05 17:18:19 RADIUS DBA: Calling send_session_log_init_sync ...
?Debug : Oct 05 17:18:19 RADIUS Stream[plugin]: send_session_log_init_sync
?Debug : Oct 05 17:18:19 RADIUS Stream[plugin]: init log id <51>
?Debug : Oct 05 17:18:19 AcctServer: Reply packet dump: RPacket:
Code: 5; ID: 1

?Debug : Oct 05 17:18:19 RadiusSocket: Moving RADIUS packet into send queue
?Debug : Oct 05 17:18:19 AcctServer: Next...
?Debug : Oct 05 17:18:19 RadiusSocket: Waiting for RADIUS raw data
?Debug : Oct 05 17:18:19 RadiusSocket: RADIUS raw data sent
?Debug : Oct 05 17:18:19 RadiusSocket: RADIUS packet successfully received
?Debug : Oct 05 17:18:19 RadiusSocket: RADIUS raw data obtained
?Debug : Oct 05 17:18:19 RADIUS Packet: Size <124>; HDR.Size <124>
?Debug : Oct 05 17:18:19 AcctServer: Recv...
?Debug : Oct 05 17:18:19 AcctServer: Packet from <10.0.0.12> packet dump: RPacket:
Code: 4; ID: 2
<Vendor: 0; Attr: 5>[4]: 00000000
<Vendor: 0; Attr: 30>[11]: 3738313234343931373136
<Vendor: 0; Attr: 31>[3]: 313239
<Vendor: 0; Attr: 32>[4]: 766f6970
<Vendor: 0; Attr: 40>[4]: 00000002
<Vendor: 0; Attr: 44>[4]: 38313938
<Vendor: 0; Attr: 46>[4]: 00000005
<Vendor: 9; Attr: 24>[4]: 38313938
<Vendor: 9; Attr: 25>[36]: 683332332d73657475702d74696d653d2a323030362d31302d30352031373a31373a3130

?Debug : Oct 05 17:18:19 RADIUS DBA: NAS found. Data size <0>
?Debug : Oct 05 17:18:19 AcctServer: Acct packet with session ID: 8198
?Debug : Oct 05 17:18:19 RADIUS DBA: NAS found. Data size <0>
?Debug : Oct 05 17:18:19 AcctServer: Acct-Stop packet
?Debug : Oct 05 17:18:19 RADIUS DBA: Session erase ... login type <3>
?Debug : Oct 05 17:18:19 RADIUS DBA: login type login_tel
?Debug : Oct 05 17:18:19 RADIUS DBA: Calling tel_calculate cost. session_time_not_present <0> NOW <1160054299>
?Debug : Oct 05 17:18:19 RADIUS Tarif: UT for telephony called. tkey:2 start:1160054299 stop:1160054304
?Debug : Oct 05 17:18:19 RADIUS Tarif: Telephony service <42> free time <0>
Info : Oct 05 17:18:19 UT: session_addon <0>
Info : Oct 05 17:18:19 UT: tarification for slink 9, tr_id 1, mult 0.000000, next 1160054304
Info : Oct 05 17:18:19 UT: cost info:
Info : Oct 05 17:18:19 UT: type 0 deny 0 base_cost 1.000000 size 5 tr_id 1 mult 0.000000 added 0 sum 0.000000
?Debug : Oct 05 17:18:19 RADIUS Tarif: UT cost_info sum:0.0000 setup_time <1160054299>
?Debug : Oct 05 17:18:19 RADIUS DBA: VoIP Discount: TR ID 2: 0.000 for 5 sec setup_time <1160054299>
?Debug : Oct 05 17:18:19 RADIUS Tarif: UT tkey <2> downloaded <5>
?Debug : Oct 05 17:18:19 RADIUS DBA: VoIP calculated cost: 0.000
?Debug : Oct 05 17:18:19 RADIUS Stream[plugin]: finish log id <51>
?Debug : Oct 05 17:18:19 AcctServer: Reply packet dump: RPacket:
Code: 5; ID: 2

?Debug : Oct 05 17:18:19 RadiusSocket: Moving RADIUS packet into send queue
?Debug : Oct 05 17:18:19 AcctServer: Next...
?Debug : Oct 05 17:18:19 RadiusSocket: Waiting for RADIUS raw data
?Debug : Oct 05 17:18:19 RADIUS Stream[plugin]: Account <1> with balance <9308.000>
?Debug : Oct 05 17:18:19 StreamConnection: Message id <0x2003>, handler returns 0
?Debug : Oct 05 17:18:19 RadiusSocket: RADIUS raw data sent



из строчки:
?Debug : Oct 05 17:18:19 RADIUS DBA: TELTARIFF: called number <78124491716> calling number <129> direction id <2> zone id <1>
видим что направление не определяется (точнее определяется неправильно, ибо в базе даже нет направления с id=1)... Нет у меня направления с id=2 и уж темболее зона с id=1 не включает никакого направления с id=2.


в базе есть направление:
mysql> select * from tel_directions where prefix='^7812';
+---------+--------+-------------------------------+-------------+------------+
| id | prefix | name | create_date | is_deleted |
+---------+--------+-------------------------------+-------------+------------+
| 1005168 | ^7812 | Санкт-Петербург | 1128675536 | 0 |
+---------+--------+-------------------------------+-------------+------------+


лог debug.log:
?Debug : Oct 06 14:26:30 Radius: init_session_log id <62>
?Debug : Oct 06 14:26:30 DBCtx: SQL query: INSERT INTO tel_sessions_log(account_id,slink_id,recv_date,last_update_date,NAS_Port,Acct_Delay_Time,
Acct_Session_Id,NAS_Port_Type,User_Name,Service_Type,Framed_Protocol,NAS_IP_Address,NAS_Id,Acct_Status_Type,
Acct_Input_Packets,Acct_Input_Octets,Acct_Input_Gigawords,Acct_Output_Packets,Acct_Output_Octets,Acct_Output_Gigawords,
Acct_Session_Time,Acct_Terminate_Cause,Called_Station_Id,Calling_Station_Id,h323_remote_address,h323_conf_id, h323_setup_time,h323_call_origin,
h323_call_type,h323_connect_time,h323_disconnect_time,h323_disconnect_cause, h323_gw_id,zone_id,did,session_start_date)
VALUES('1','9','1160130390','1160130390','0','0','8198','0','129','0','0','201326602','10.0.0.12','1','0','0','0','0','0','0','0','0','78124491716','129','','8198','h323-setup-time=*2006-10-06
14\:25\:17','','','','','','','1','2','1160130390')
?Debug : Oct 06 14:26:30 Radius: Dynamic IP binding not called because ip or slink is null ! ip <0> slink <9>
?Debug : Oct 06 14:26:30 StreamConnection: Message id <0x1005>, handler returns -1124136192
?Debug : Oct 06 14:26:30 DBCtx: SQL query: INSERT INTO
tel_sessions_detail(dhs_sess_id,disc_per_id,slink_id,recv_date,account_id,trange_id,duration,base_cost,sum_cost)
VALUES('26','2','9','1160130390','1','2','6','1','6')
?Debug : Oct 06 14:26:30 UTM5 DBA: Discount:6.000000 p.u. for link:9 account 1
?Debug : Oct 06 14:26:30 UTM5 DBA: Checking for rehash: flags 3, balance 9299.000 (old 9305.000), credit 0.000
?Debug : Oct 06 14:26:30 DBAGiga: Rehash: Target: 10; Action: 1; Ptr: bcff0980
?Debug : Oct 06 14:26:30 Radius: Account '1': 9299.000/0.000 send...
?Debug : Oct 06 14:26:30 DBCtx: SQL query: UPDATE accounts SET balance='9299' WHERE id = '1'
?Debug : Oct 06 14:26:30 DBCtx: SQL query: INSERT INTO
discount_transactions_all(account_id,incoming_rest,outgoing_rest,discount,discount_without_tax,discount_with_tax,service_id,service_type,slink_id,discount_date,comment,discount_period_id)
VALUES('1','9305','9299','6','6','6','42','6','9','1160130390','Telephony Discount','2')
?Debug : Oct 06 14:26:30 BusLogic: BLM(37) pushed (comment: ruh block)
?Debug : Oct 06 14:26:30 BusLogic: try to execute 37
?Debug : Oct 06 14:26:30 UTM5 DBA: discount_from_account tel zoneid <2> h.base_cost <1.000000>
?Debug : Oct 06 14:26:30 BusLogic: hw_block_handler with code 37
?Debug : Oct 06 14:26:30 DBCtx: SQL query: UPDATE dtagg_telephony SET discounted='9.000000',discounted_without_tax='9.000000', duration='9.000000' WHERE
id='9'
?Debug : Oct 06 14:26:30 BusLogic: finished unknown
?Debug : Oct 06 14:26:30 StreamConnection: Message id <0x1008>, handler returns -1124135920
?Debug : Oct 06 14:26:30 Radius: edit_session_log id <62>
?Debug : Oct 06 14:26:30 Radius: session log with id <62> found in the cache
?Debug : Oct 06 14:26:30 DBCtx: SQL query: UPDATE tel_sessions_log SET account_id='1', slink_id='9', last_update_date='1160130390',
Acct_Status_Type='2', Acct_Input_Packets ='0', Acct_Input_Octets ='0', Acct_Input_Gigawords ='0', Acct_Output_Packets ='0', Acct_Output_Octets ='0',
Acct_Output_Gigawords ='0', h323_connect_time='', Acct_Terminate_Cause='0', h323_disconnect_cause='', Acct_Session_Time ='6' WHERE id='26'
?Debug : Oct 06 14:26:30 Radius: id2core removing key <62>
?Debug : Oct 06 14:26:30 DBCtx: SQL SELECT query: SELECT value FROM utm5_settings WHERE variable='radius_do_accounting'
?Debug : Oct 06 14:26:30 StreamConnection: Message id <0x1006>, handler returns -1124136272



поможите ктонибудь плизз... победить эту балалайку(UTM)....

Ответить