2021-02-11 10:52:41.334582 [DEBUG] switch_channel.c:2332 (sofia/default/4134577391@Kamal58.appcaption.com) Callstate Change DOWN -> RINGING 2021-02-11 10:52:41.334582 [DEBUG] switch_core_state_machine.c:644 (sofia/default/4134577391@Kamal58.appcaption.com) State ROUTING 2021-02-11 10:52:41.334582 [DEBUG] mod_sofia.c:154 sofia/default/4134577391@Kamal58.appcaption.com SOFIA ROUTING 2021-02-11 10:52:41.334582 [DEBUG] switch_core_state_machine.c:236 sofia/default/4134577391@Kamal58.appcaption.com Standard ROUTING 2021-02-11 10:52:41.334582 [INFO] mod_dialplan_xml.c:637 Processing 4134577391 <4134577391>->447943550553 in context default 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [LOAD_CONF] Query :SELECT name,value FROM `system` WHERE group_title IN ('global','opensips','callingcard','calls','InternationalPrefixes') 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons 2021-02-11 10:52:41.355041 [INFO] switch_cpp.cpp:1447 [ASTPP] [Dialplan] blind_flag: 0 2021-02-11 10:52:41.355041 [INFO] switch_cpp.cpp:1447 [ASTPP] [Dialplan] Dialed number : 447943550553 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [CHECK_FEATURE_CODE] Query :SELECT id,feature_action,feature_code from feature_code where feature_code = '447943550553' limit 1 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [DOAUTHORIZATION] Query :SELECT access_number FROM accessnumber WHERE access_number = '447943550553' AND status=0 limit 1 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [Functions] [GET_queue_INFO] Query :SELECT id,destination_number,agent_hold_file from pbx_queue WHERE destination_number = '447943550553' and status=0 LIMIT 1 2021-02-11 10:52:41.355041 [WARNING] switch_cpp.cpp:1447 [ASTPP] [FAXER] in custom Caller ID 2021-02-11 10:52:41.355041 [INFO] switch_cpp.cpp:1447 [ASTPP] [Dialplan] Caller Id name / number : Kamal 05.02.21 / 03333058000 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [CHECK_DID] Query :SELECT A.id as id,A.number as did_number,B.id as accountid,B.number as account_code,A.number as did_number,A.connectcost,A.includedseconds,A.cost,A.inc,A.extensions,A.maxchannels,A.call_type,A.city,A.province,A.init_inc,A.leg_timeout,A.status,A.country_id,A.call_type_vm_flag FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="447943550553" LIMIT 1 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [CHECK_LOCAL_CALL] Query :SELECT sip_devices.id as sip_id,sip_devices.username as username,accounts.number as accountcode,sip_devices.accountid as accountid,accounts.did_cid_translation as did_cid_translation FROM sip_devices as sip_devices,accounts as accounts ,domains WHERE accounts.id=domains.accountid AND accounts.status=0 AND accounts.deleted=0 AND accounts.id=sip_devices.accountid AND sip_devices.username="447943550553" AND domains.domain="Kamal58.appcaption.com" limit 1 2021-02-11 10:52:41.355041 [INFO] switch_cpp.cpp:1447 [ASTPP] [Dialplan] Call direction : outbound 2021-02-11 10:52:41.355041 [INFO] switch_cpp.cpp:1447 [ASTPP] [Accountcode : 816776] 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [DOAUTHORIZATION] Query :SELECT * FROM accounts WHERE number = "816776" AND deleted = 0 limit 1 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [CHECK_BLOCKED_PREFIX] Query :SELECT * FROM block_patterns WHERE (blocked_patterns = '^447943550553.*' OR blocked_patterns = '^44794355055.*' OR blocked_patterns = '^4479435505.*' OR blocked_patterns = '^447943550.*' OR blocked_patterns = '^44794355.*' OR blocked_patterns = '^4479435.*' OR blocked_patterns = '^447943.*' OR blocked_patterns = '^44794.*' OR blocked_patterns = '^4479.*' OR blocked_patterns = '^447.*' OR blocked_patterns = '^44.*' OR blocked_patterns = '^4.*' OR blocked_patterns ='--') AND accountid = 76 limit 1 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [CHECK_SPEEDDIAL] Query :SELECT A.number FROM speed_dial as A,accounts as B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.speed_num ="447943550553" AND A.accountid = '76' limit 1 2021-02-11 10:52:41.355041 [INFO] switch_cpp.cpp:1447 [ASTPP] [Dialplan] SPEED DIAL NUMBER : 447943550553 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [CHECK_DID] Query :SELECT A.id as id,A.number as did_number,B.id as accountid,B.number as account_code,A.number as did_number,A.connectcost,A.includedseconds,A.cost,A.inc,A.extensions,A.maxchannels,A.call_type,A.city,A.province,A.init_inc,A.leg_timeout,A.status,A.country_id,A.call_type_vm_flag FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="447943550553" LIMIT 1 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [CHECK_LOCAL_CALL] Query :SELECT sip_devices.id as sip_id,sip_devices.username as username,accounts.number as accountcode,sip_devices.accountid as accountid,accounts.did_cid_translation as did_cid_translation FROM sip_devices as sip_devices,accounts as accounts ,domains WHERE accounts.id=domains.accountid AND accounts.status=0 AND accounts.deleted=0 AND accounts.id=sip_devices.accountid AND sip_devices.username="447943550553" AND domains.domain="Kamal58.appcaption.com" limit 1 2021-02-11 10:52:41.355041 [INFO] switch_cpp.cpp:1447 [ASTPP] [Dialplan] New Call direction : outbound 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [IS_CHECK_DID] Query :SELECT * FROM dids WHERE number ="447943550553" AND (accountid = 0 OR status = 1) LIMIT 1 2021-02-11 10:52:41.355041 [NOTICE] switch_cpp.cpp:1447 [ASTPP] Localization Id: 1 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [GET_LOCALIZATION] Query :SELECT id,in_caller_id_originate,out_caller_id_originate,number_originate,dst_base_cid FROM localization WHERE id = 1 AND status=0 limit 1 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [GET_LOCALIZATION] Query :"0/44".....447943550553 2021-02-11 10:52:41.355041 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [GET_PACKAGE_INFO] Query :SELECT *,P.id as package_id,P.product_id as product_id FROM packages_view as P inner join package_patterns as PKGPTR on P.product_id = PKGPTR.product_id WHERE (patterns = '^447943550553.*' OR patterns = '^44794355055.*' OR patterns = '^4479435505.*' OR patterns = '^447943550.*' OR patterns = '^44794355.*' OR patterns = '^4479435.*' OR patterns = '^447943.*' OR patterns = '^44794.*' OR patterns = '^4479.*' OR patterns = '^447.*' OR patterns = '^44.*' OR patterns = '^4.*' OR patterns ='--') AND accountid = 76 ORDER BY LENGTH(PKGPTR.patterns) DESC 2021-02-11 10:52:41.394538 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [CHECK_CALL_BARRING] Query :SELECT number,RIGHT(number,1) as lastchar,type as status_type,number_type FROM call_barring WHERE ((number = '447943550553' OR number = '44794355055' OR number = '4479435505' OR number = '447943550' OR number = '44794355' OR number = '4479435' OR number = '447943' OR number = '44794' OR number = '4479' OR number = '447' OR number = '44' OR number = '4' OR number ='--') OR (number = '447943550553*' OR number = '44794355055*' OR number = '4479435505*' OR number = '447943550*' OR number = '44794355*' OR number = '4479435*' OR number = '447943*' OR number = '44794*' OR number = '4479*' OR number = '447*' OR number = '44*' OR number = '4*' OR number ='--') OR (number = '03333058000' OR number = '0333305800' OR number = '033330580' OR number = '03333058' OR number = '0333305' OR number = '033330' OR number = '03333' OR number = '0333' OR number = '033' OR number = '03' OR number = '0' OR number ='--') OR (number = '03333058000*' OR number = '0333305800*' OR number = '033330580*' OR number = '03333058*' OR number = '0333305*' OR number = '033330*' OR number = '03333*' OR number = '0333*' OR number = '033*' OR number = '03*' OR number = '0*' OR number ='--')) AND status=0 order by LENGTH(number) DESC,lastchar DESC, modified_date DESC 2021-02-11 10:52:41.394538 [DEBUG] switch_cpp.cpp:1447 [ASTPP] Call Barring Status : -1 2021-02-11 10:52:41.394538 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [GET_PRICELIST_ROUTING_INFO] Query :select id,routing_prefix,pricelist_id_admin from pricelists WHERE (routing_prefix = '447943550553' OR routing_prefix = '44794355055' OR routing_prefix = '4479435505' OR routing_prefix = '447943550' OR routing_prefix = '44794355' OR routing_prefix = '4479435' OR routing_prefix = '447943' OR routing_prefix = '44794' OR routing_prefix = '4479' OR routing_prefix = '447' OR routing_prefix = '44' OR routing_prefix = '4' OR routing_prefix ='--') AND status = 0 and reseller_id = 0 limit 1 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] =============== Account Information =================== 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] User id : 76 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] Account code : 816776 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] Balance : 19.2 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] Type : 0 [0:prepaid,1:postpaid] 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] Ratecard id : 3 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] CID Pool : 0 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] ======================================================== 2021-02-11 10:52:41.394538 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [GET_PRICELIST_INFO] Query :select * from pricelists WHERE id = 3 AND status = 0 2021-02-11 10:52:41.394538 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [GET_RATES] call_direction :outbound 2021-02-11 10:52:41.394538 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [GET_PRICELIST_INFO] Query :select * from pricelists WHERE id = 3 AND status = 0 2021-02-11 10:52:41.394538 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [GET_RATES] Query :SELECT * FROM routes WHERE (pattern = '^447943550553.*' OR pattern = '^44794355055.*' OR pattern = '^4479435505.*' OR pattern = '^447943550.*' OR pattern = '^44794355.*' OR pattern = '^4479435.*' OR pattern = '^447943.*' OR pattern = '^44794.*' OR pattern = '^4479.*' OR pattern = '^447.*' OR pattern = '^44.*' OR pattern = '^4.*' OR pattern ='--') AND status = 0 AND (pricelist_id = 3 OR accountid=76) ORDER BY accountid DESC,cost ASC LIMIT 1 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] call_direction:::::: outbound 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] =============== Rates Information =================== 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] ID : 7829 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] Connectcost : 0.00000 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] Includedseconds : 0 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] Cost : 0.02415 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] comment : UK EE(T-Mobile) Mobile 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] Country Id : 0 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] Accid : 76 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] Trunk ID: 4 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] Routing type: 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] ================================================================ 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] [FIND_MAXLENGTH] Your19.2 balance Accountid 76 !!! 2021-02-11 10:52:41.394538 [NOTICE] switch_cpp.cpp:1447 [ASTPP] [FIND_MAXLENGTH] Limiting call to config max length 100 mins! 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] Call Max length duration : 100 minutes 2021-02-11 10:52:41.394538 [INFO] switch_cpp.cpp:1447 [ASTPP] [DIALPLAN] User Rate ID : 7829 2021-02-11 10:52:41.394538 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [GET_CARRIER_RATES]123131 Query rate_carrier_id :4 2021-02-11 10:52:41.394538 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [GET_CARRIER_RATES] Query :SELECT TK.id as trunk_id,TK.name as trunk_name,TK.codec,GW.name as path,GW.dialplan_variable,TK.provider_id,TR.init_inc,TK.status,TK.maxchannels,TK.cps,TK.leg_timeout,TR.pattern,TR.id as outbound_route_id,TR.connectcost,TR.comment,TR.includedseconds,TR.cost,TR.inc,TR.prepend,TR.strip,(select name from gateways where status=0 AND id = TK.failover_gateway_id) as path1,(select name from gateways where status=0 AND id = TK.failover_gateway_id1) as path2 FROM outbound_routes as TR,trunks as TK,gateways as GW WHERE GW.status=0 AND GW.id= TK.gateway_id AND TK.status=0 AND TK.id= TR.trunk_id AND (pattern = '^447943550553.*' OR pattern = '^44794355055.*' OR pattern = '^4479435505.*' OR pattern = '^447943550.*' OR pattern = '^44794355.*' OR pattern = '^4479435.*' OR pattern = '^447943.*' OR pattern = '^44794.*' OR pattern = '^4479.*' OR pattern = '^447.*' OR pattern = '^44.*' OR pattern = '^4.*' OR pattern ='--') AND TR.status = 0 AND TR.trunk_id IN (4) ORDER by FIELD(TR.trunk_id,4),LENGTH (pattern) DESC,TR.cost ASC,TR.precedence ASC 2021-02-11 10:52:41.394538 [NOTICE] switch_cpp.cpp:1447 [ASTPP] [Dialplan] No termination rates found...!!! 2021-02-11 10:52:41.394538 [DEBUG] switch_cpp.cpp:1447 [ASTPP] post_cdrs:::0 2021-02-11 10:52:41.394538 [DEBUG] switch_cpp.cpp:1447 [ASTPP] [GET RESELLERID] Query :SELECT reseller_id FROM accounts WHERE id = 76 2021-02-11 10:52:41.394538 [DEBUG] switch_cpp.cpp:1447 [ASTPP] Generated XML:
Dialplan: sofia/default/4134577391@Kamal58.appcaption.com parsing [default->447943550553] continue=false Dialplan: sofia/default/4134577391@Kamal58.appcaption.com Regex (PASS) [447943550553] destination_number(447943550553) =~ /447943550553/ break=on-false Dialplan: sofia/default/4134577391@Kamal58.appcaption.com Action log(WARNING Accountcode 816776. Dialed number (447943550553) termination rates not found!!) Dialplan: sofia/default/4134577391@Kamal58.appcaption.com Action set(original_caller_id_name=Kamal 05.02.21) Dialplan: sofia/default/4134577391@Kamal58.appcaption.com Action set(original_caller_id_number=Kamal 05.02.21) Dialplan: sofia/default/4134577391@Kamal58.appcaption.com Action set(error_cdr=1) Dialplan: sofia/default/4134577391@Kamal58.appcaption.com Action set(callstart=2021-02-11 10:52:41) Dialplan: sofia/default/4134577391@Kamal58.appcaption.com Action set(account_id=76) Dialplan: sofia/default/4134577391@Kamal58.appcaption.com Action set(parent_id=0) Dialplan: sofia/default/4134577391@Kamal58.appcaption.com Action set(call_direction=outbound) Dialplan: sofia/default/4134577391@Kamal58.appcaption.com Action set(sip_ignore_remote_cause=true) Dialplan: sofia/default/4134577391@Kamal58.appcaption.com Action set(call_processed=internal) Dialplan: sofia/default/4134577391@Kamal58.appcaption.com Action set(effective_destination_number=447943550553) Dialplan: sofia/default/4134577391@Kamal58.appcaption.com Action set(last_bridge_hangup_cause=TERMINATION_RATE_NOT_FOUND) Dialplan: sofia/default/4134577391@Kamal58.appcaption.com Action hangup(TERMINATION_RATE_NOT_FOUND) 2021-02-11 10:52:41.394538 [DEBUG] switch_core_state_machine.c:287 (sofia/default/4134577391@Kamal58.appcaption.com) State Change CS_ROUTING -> CS_EXECUTE 2021-02-11 10:52:41.394538 [DEBUG] switch_core_state_machine.c:644 (sofia/default/4134577391@Kamal58.appcaption.com) State ROUTING going to sleep 2021-02-11 10:52:41.394538 [DEBUG] switch_core_state_machine.c:585 (sofia/default/4134577391@Kamal58.appcaption.com) Running State Change CS_EXECUTE (Cur 1 Tot 37117) 2021-02-11 10:52:41.394538 [DEBUG] switch_core_state_machine.c:651 (sofia/default/4134577391@Kamal58.appcaption.com) State EXECUTE 2021-02-11 10:52:41.394538 [DEBUG] mod_sofia.c:209 sofia/default/4134577391@Kamal58.appcaption.com SOFIA EXECUTE 2021-02-11 10:52:41.394538 [DEBUG] switch_core_state_machine.c:329 sofia/default/4134577391@Kamal58.appcaption.com Standard EXECUTE EXECUTE [depth=0] sofia/default/4134577391@Kamal58.appcaption.com log(WARNING Accountcode 816776. Dialed number (447943550553) termination rates not found!!) 2021-02-11 10:52:41.394538 [WARNING] mod_dptools.c:1866 Accountcode 816776. Dialed number (447943550553) termination rates not found!! EXECUTE [depth=0] sofia/default/4134577391@Kamal58.appcaption.com set(original_caller_id_name=Kamal 05.02.21) 2021-02-11 10:52:41.394538 [DEBUG] mod_dptools.c:1672 SET sofia/default/4134577391@Kamal58.appcaption.com [original_caller_id_name]=[Kamal 05.02.21] EXECUTE [depth=0] sofia/default/4134577391@Kamal58.appcaption.com set(original_caller_id_number=Kamal 05.02.21) 2021-02-11 10:52:41.394538 [DEBUG] mod_dptools.c:1672 SET sofia/default/4134577391@Kamal58.appcaption.com [original_caller_id_number]=[Kamal 05.02.21] EXECUTE [depth=0] sofia/default/4134577391@Kamal58.appcaption.com set(error_cdr=1) 2021-02-11 10:52:41.394538 [DEBUG] mod_dptools.c:1672 SET sofia/default/4134577391@Kamal58.appcaption.com [error_cdr]=[1] EXECUTE [depth=0] sofia/default/4134577391@Kamal58.appcaption.com set(callstart=2021-02-11 10:52:41) 2021-02-11 10:52:41.394538 [DEBUG] mod_dptools.c:1672 SET sofia/default/4134577391@Kamal58.appcaption.com [callstart]=[2021-02-11 10:52:41] EXECUTE [depth=0] sofia/default/4134577391@Kamal58.appcaption.com set(account_id=76) 2021-02-11 10:52:41.394538 [DEBUG] mod_dptools.c:1672 SET sofia/default/4134577391@Kamal58.appcaption.com [account_id]=[76] EXECUTE [depth=0] sofia/default/4134577391@Kamal58.appcaption.com set(parent_id=0) 2021-02-11 10:52:41.394538 [DEBUG] mod_dptools.c:1672 SET sofia/default/4134577391@Kamal58.appcaption.com [parent_id]=[0] EXECUTE [depth=0] sofia/default/4134577391@Kamal58.appcaption.com set(call_direction=outbound) 2021-02-11 10:52:41.394538 [DEBUG] mod_dptools.c:1672 SET sofia/default/4134577391@Kamal58.appcaption.com [call_direction]=[outbound] EXECUTE [depth=0] sofia/default/4134577391@Kamal58.appcaption.com set(sip_ignore_remote_cause=true) 2021-02-11 10:52:41.394538 [DEBUG] mod_dptools.c:1672 SET sofia/default/4134577391@Kamal58.appcaption.com [sip_ignore_remote_cause]=[true] EXECUTE [depth=0] sofia/default/4134577391@Kamal58.appcaption.com set(call_processed=internal) 2021-02-11 10:52:41.394538 [DEBUG] mod_dptools.c:1672 SET sofia/default/4134577391@Kamal58.appcaption.com [call_processed]=[internal] EXECUTE [depth=0] sofia/default/4134577391@Kamal58.appcaption.com set(effective_destination_number=447943550553) 2021-02-11 10:52:41.394538 [DEBUG] mod_dptools.c:1672 SET sofia/default/4134577391@Kamal58.appcaption.com [effective_destination_number]=[447943550553] EXECUTE [depth=0] sofia/default/4134577391@Kamal58.appcaption.com set(last_bridge_hangup_cause=TERMINATION_RATE_NOT_FOUND) 2021-02-11 10:52:41.394538 [DEBUG] mod_dptools.c:1672 SET sofia/default/4134577391@Kamal58.appcaption.com [last_bridge_hangup_cause]=[TERMINATION_RATE_NOT_FOUND] EXECUTE [depth=0] sofia/default/4134577391@Kamal58.appcaption.com hangup(TERMINATION_RATE_NOT_FOUND) 2021-02-11 10:52:41.394538 [NOTICE] mod_dptools.c:1380 Hangup sofia/default/4134577391@Kamal58.appcaption.com [CS_EXECUTE] [NORMAL_CLEARING] 2021-02-11 10:52:41.394538 [DEBUG] switch_core_session.c:2905 sofia/default/4134577391@Kamal58.appcaption.com skip receive message [APPLICATION_EXEC_COMPLETE] (channel is hungup already) 2021-02-11 10:52:41.394538 [DEBUG] switch_core_state_machine.c:651 (sofia/default/4134577391@Kamal58.appcaption.com) State EXECUTE going to sleep 2021-02-11 10:52:41.394538 [DEBUG] switch_core_state_machine.c:585 (sofia/default/4134577391@Kamal58.appcaption.com) Running State Change CS_HANGUP (Cur 1 Tot 37117) 2021-02-11 10:52:41.394538 [DEBUG] switch_core_state_machine.c:848 (sofia/default/4134577391@Kamal58.appcaption.com) Callstate Change RINGING -> HANGUP 2021-02-11 10:52:41.394538 [DEBUG] switch_core_state_machine.c:850 (sofia/default/4134577391@Kamal58.appcaption.com) State HANGUP 2021-02-11 10:52:41.394538 [DEBUG] mod_sofia.c:453 Channel sofia/default/4134577391@Kamal58.appcaption.com hanging up, cause: NORMAL_CLEARING 2021-02-11 10:52:41.394538 [DEBUG] mod_sofia.c:598 Responding to INVITE with: 480 2021-02-11 10:52:41.394538 [DEBUG] switch_core_state_machine.c:60 sofia/default/4134577391@Kamal58.appcaption.com Standard HANGUP, cause: NORMAL_CLEARING 2021-02-11 10:52:41.394538 [DEBUG] switch_core_state_machine.c:850 (sofia/default/4134577391@Kamal58.appcaption.com) State HANGUP going to sleep 2021-02-11 10:52:41.394538 [DEBUG] switch_core_state_machine.c:620 (sofia/default/4134577391@Kamal58.appcaption.com) State Change CS_HANGUP -> CS_REPORTING 2021-02-11 10:52:41.394538 [DEBUG] switch_core_state_machine.c:585 (sofia/default/4134577391@Kamal58.appcaption.com) Running State Change CS_REPORTING (Cur 1 Tot 37117) 2021-02-11 10:52:41.394538 [DEBUG] switch_core_state_machine.c:936 (sofia/default/4134577391@Kamal58.appcaption.com) State REPORTING 2021-02-11 10:52:41.394538 [INFO] mod_json_cdr.c:271 Process [0a434d3d-917b-439a-b7a3-11031f0c9e03.cdr.json] 2021-02-11 10:52:41.414570 [DEBUG] switch_core_state_machine.c:174 sofia/default/4134577391@Kamal58.appcaption.com Standard REPORTING, cause: NORMAL_CLEARING 2021-02-11 10:52:41.414570 [DEBUG] switch_core_state_machine.c:936 (sofia/default/4134577391@Kamal58.appcaption.com) State REPORTING going to sleep 2021-02-11 10:52:41.414570 [DEBUG] switch_core_state_machine.c:611 (sofia/default/4134577391@Kamal58.appcaption.com) State Change CS_REPORTING -> CS_DESTROY 2021-02-11 10:52:41.414570 [DEBUG] switch_core_session.c:1726 Session 37117 (sofia/default/4134577391@Kamal58.appcaption.com) Locked, Waiting on external entities 2021-02-11 10:52:41.414570 [NOTICE] switch_core_session.c:1744 Session 37117 (sofia/default/4134577391@Kamal58.appcaption.com) Ended 2021-02-11 10:52:41.414570 [NOTICE] switch_core_session.c:1748 Close Channel sofia/default/4134577391@Kamal58.appcaption.com [CS_DESTROY] 2021-02-11 10:52:41.414570 [DEBUG] switch_core_state_machine.c:739 (sofia/default/4134577391@Kamal58.appcaption.com) Running State Change CS_DESTROY (Cur 0 Tot 37117) 2021-02-11 10:52:41.414570 [DEBUG] switch_core_state_machine.c:749 (sofia/default/4134577391@Kamal58.appcaption.com) State DESTROY 2021-02-11 10:52:41.414570 [DEBUG] mod_sofia.c:364 sofia/default/4134577391@Kamal58.appcaption.com SOFIA DESTROY 2021-02-11 10:52:41.414570 [DEBUG] switch_core_state_machine.c:181 sofia/default/4134577391@Kamal58.appcaption.com Standard DESTROY 2021-02-11 10:52:41.414570 [DEBUG] switch_core_state_machine.c:749 (sofia/default/4134577391@Kamal58.appcaption.com) State DESTROY going to sleep 2021-02-11 10:52:49.094533 [NOTICE] switch_channel.c:1118 New Channel sofia/default/1001135176176116@35.176.176.116 [afc21b24-8187-4a86-819d-bf4f846b70fd] 2021-02-11 10:52:49.094533 [DEBUG] switch_core_state_machine.c:585 (sofia/default/1001135176176116@35.176.176.116) Running State Change CS_NEW (Cur 1 Tot 37118) 2021-02-11 10:52:49.094533 [DEBUG] sofia.c:10280 sofia/default/1001135176176116@35.176.176.116 receiving invite from 45.89.174.86:60427 version: 1.10.5 -release-17-25569c1631 64bit 2021-02-11 10:52:49.094533 [DEBUG] sofia.c:10374 verifying acl "default" for ip/port 45.89.174.86:0. 2021-02-11 10:52:49.094533 [WARNING] sofia_reg.c:1794 SIP auth challenge (INVITE) on sofia profile 'default' for [10011972595725668@35.176.176.116] from ip 45.89.174.86 2021-02-11 10:52:49.094533 [DEBUG] switch_core_state_machine.c:604 (sofia/default/1001135176176116@35.176.176.116) State NEW 2021-02-11 10:52:49.094533 [DEBUG] sofia.c:2434 detaching session afc21b24-8187-4a86-819d-bf4f846b70fd 2021-02-11 10:52:59.134545 [WARNING] switch_core_state_machine.c:688 afc21b24-8187-4a86-819d-bf4f846b70fd sofia/default/1001135176176116@35.176.176.116 Abandoned 2021-02-11 10:52:59.134545 [NOTICE] switch_core_state_machine.c:691 Hangup sofia/default/1001135176176116@35.176.176.116 [CS_NEW] [WRONG_CALL_STATE] 2021-02-11 10:52:59.134545 [DEBUG] switch_core_state_machine.c:585 (sofia/default/1001135176176116@35.176.176.116) Running State Change CS_HANGUP (Cur 1 Tot 37118) 2021-02-11 10:52:59.134545 [DEBUG] switch_core_state_machine.c:848 (sofia/default/1001135176176116@35.176.176.116) Callstate Change DOWN -> HANGUP 2021-02-11 10:52:59.134545 [DEBUG] switch_core_state_machine.c:850 (sofia/default/1001135176176116@35.176.176.116) State HANGUP 2021-02-11 10:52:59.134545 [DEBUG] mod_sofia.c:453 Channel sofia/default/1001135176176116@35.176.176.116 hanging up, cause: WRONG_CALL_STATE 2021-02-11 10:52:59.134545 [DEBUG] switch_core_state_machine.c:60 sofia/default/1001135176176116@35.176.176.116 Standard HANGUP, cause: WRONG_CALL_STATE 2021-02-11 10:52:59.134545 [DEBUG] switch_core_state_machine.c:850 (sofia/default/1001135176176116@35.176.176.116) State HANGUP going to sleep 2021-02-11 10:52:59.134545 [DEBUG] switch_core_state_machine.c:620 (sofia/default/1001135176176116@35.176.176.116) State Change CS_HANGUP -> CS_REPORTING 2021-02-11 10:52:59.134545 [DEBUG] switch_core_state_machine.c:585 (sofia/default/1001135176176116@35.176.176.116) Running State Change CS_REPORTING (Cur 1 Tot 37118) 2021-02-11 10:52:59.134545 [DEBUG] switch_core_state_machine.c:936 (sofia/default/1001135176176116@35.176.176.116) State REPORTING 2021-02-11 10:52:59.134545 [DEBUG] switch_core_state_machine.c:174 sofia/default/1001135176176116@35.176.176.116 Standard REPORTING, cause: WRONG_CALL_STATE 2021-02-11 10:52:59.134545 [DEBUG] switch_core_state_machine.c:936 (sofia/default/1001135176176116@35.176.176.116) State REPORTING going to sleep 2021-02-11 10:52:59.134545 [DEBUG] switch_core_state_machine.c:611 (sofia/default/1001135176176116@35.176.176.116) State Change CS_REPORTING -> CS_DESTROY 2021-02-11 10:52:59.134545 [DEBUG] switch_core_session.c:1726 Session 37118 (sofia/default/1001135176176116@35.176.176.116) Locked, Waiting on external entities 2021-02-11 10:52:59.134545 [NOTICE] switch_core_session.c:1744 Session 37118 (sofia/default/1001135176176116@35.176.176.116) Ended 2021-02-11 10:52:59.134545 [NOTICE] switch_core_session.c:1748 Close Channel sofia/default/1001135176176116@35.176.176.116 [CS_DESTROY] 2021-02-11 10:52:59.134545 [DEBUG] switch_core_state_machine.c:739 (sofia/default/1001135176176116@35.176.176.116) Running State Change CS_DESTROY (Cur 0 Tot 37118) 2021-02-11 10:52:59.134545 [DEBUG] switch_core_state_machine.c:749 (sofia/default/1001135176176116@35.176.176.116) State DESTROY 2021-02-11 10:52:59.134545 [DEBUG] mod_sofia.c:364 sofia/default/1001135176176116@35.176.176.116 SOFIA DESTROY 2021-02-11 10:52:59.134545 [DEBUG] switch_core_state_machine.c:181 sofia/default/1001135176176116@35.176.176.116 Standard DESTROY 2021-02-11 10:52:59.134545 [DEBUG] switch_core_state_machine.c:749 (sofia/default/1001135176176116@35.176.176.116) State DESTROY going to sleep 2021-02-11 10:53:04.094548 [WARNING] sofia_reg.c:1794 SIP auth challenge (REGISTER) on sofia profile 'default' for [4134577391@Kamal58.appcaption.com] from ip 117.247.91.162 2021-02-11 10:53:36.494577 [WARNING] sofia_reg.c:1794 SIP auth challenge (REGISTER) on sofia profile 'default' for [4134577391@Kamal58.appcaption.com] from ip 117.247.91.162 2021-02-11 10:53:44.034576 [NOTICE] switch_channel.c:1118 New Channel sofia/default/3241@35.176.176.116 [7e43cc4f-c222-4036-a877-564b39a3a88b] 2021-02-11 10:53:44.034576 [DEBUG] switch_core_state_machine.c:585 (sofia/default/3241@35.176.176.116) Running State Change CS_NEW (Cur 1 Tot 37119) 2021-02-11 10:53:44.034576 [DEBUG] sofia.c:10280 sofia/default/3241@35.176.176.116 receiving invite from 23.146.241.14:59222 version: 1.10.5 -release-17-25569c1631 64bit 2021-02-11 10:53:44.034576 [DEBUG] sofia.c:10374 verifying acl "default" for ip/port 23.146.241.14:0. 2021-02-11 10:53:44.034576 [WARNING] sofia_reg.c:1794 SIP auth challenge (INVITE) on sofia profile 'default' for [9442037694911@35.176.176.116] from ip 23.146.241.14 2021-02-11 10:53:44.034576 [DEBUG] switch_core_state_machine.c:604 (sofia/default/3241@35.176.176.116) State NEW 2021-02-11 10:53:44.034576 [DEBUG] sofia.c:2434 detaching session 7e43cc4f-c222-4036-a877-564b39a3a88b 2021-02-11 10:53:49.734556 [NOTICE] switch_channel.c:1118 New Channel sofia/default/1001@35.176.176.116 [73190bdc-ccb2-4385-8b09-79479b83031c] 2021-02-11 10:53:49.734556 [DEBUG] switch_core_state_machine.c:585 (sofia/default/1001@35.176.176.116) Running State Change CS_NEW (Cur 2 Tot 37120) 2021-02-11 10:53:49.734556 [DEBUG] sofia.c:10280 sofia/default/1001@35.176.176.116 receiving invite from 5.196.33.177:51376 version: 1.10.5 -release-17-25569c1631 64bit 2021-02-11 10:53:49.734556 [DEBUG] sofia.c:10374 verifying acl "default" for ip/port 5.196.33.177:0. 2021-02-11 10:53:49.734556 [WARNING] sofia_reg.c:1794 SIP auth challenge (INVITE) on sofia profile 'default' for [0013205370708@35.176.176.116] from ip 5.196.33.177 2021-02-11 10:53:49.734556 [DEBUG] switch_core_state_machine.c:604 (sofia/default/1001@35.176.176.116) State NEW 2021-02-11 10:53:49.734556 [DEBUG] sofia.c:2434 detaching session 73190bdc-ccb2-4385-8b09-79479b83031c 2021-02-11 10:53:49.754541 [DEBUG] sofia.c:2544 Re-attaching to session 73190bdc-ccb2-4385-8b09-79479b83031c 2021-02-11 10:53:49.774546 [DEBUG] sofia.c:10280 sofia/default/1001@35.176.176.116 receiving invite from 5.196.33.177:51376 version: 1.10.5 -release-17-25569c1631 64bit 2021-02-11 10:53:49.774546 [DEBUG] sofia.c:10374 verifying acl "default" for ip/port 5.196.33.177:0. 2021-02-11 10:53:49.794537 [WARNING] sofia_reg.c:2930 Can't find user [1001@35.176.176.116] from 5.196.33.177 You must define a domain called '35.176.176.116' in your directory and add a user with the id="1001" attribute and you must configure your device to use the proper domain in its authentication credentials. 2021-02-11 10:53:49.794537 [WARNING] sofia_reg.c:1739 SIP auth failure (INVITE) on sofia profile 'default' for [0013205370708@35.176.176.116] from ip 5.196.33.177 2021-02-11 10:53:49.794537 [NOTICE] sofia.c:2432 Hangup sofia/default/1001@35.176.176.116 [CS_NEW] [CALL_REJECTED] 2021-02-11 10:53:49.814715 [DEBUG] sofia.c:1548 Channel is already hungup. 2021-02-11 10:53:49.814715 [DEBUG] switch_core_state_machine.c:585 (sofia/default/1001@35.176.176.116) Running State Change CS_HANGUP (Cur 2 Tot 37120) 2021-02-11 10:53:49.814715 [DEBUG] switch_core_state_machine.c:848 (sofia/default/1001@35.176.176.116) Callstate Change DOWN -> HANGUP 2021-02-11 10:53:49.814715 [DEBUG] switch_core_state_machine.c:850 (sofia/default/1001@35.176.176.116) State HANGUP 2021-02-11 10:53:49.814715 [DEBUG] mod_sofia.c:453 Channel sofia/default/1001@35.176.176.116 hanging up, cause: CALL_REJECTED 2021-02-11 10:53:49.814715 [DEBUG] switch_core_state_machine.c:60 sofia/default/1001@35.176.176.116 Standard HANGUP, cause: CALL_REJECTED 2021-02-11 10:53:49.814715 [DEBUG] switch_core_state_machine.c:850 (sofia/default/1001@35.176.176.116) State HANGUP going to sleep 2021-02-11 10:53:49.814715 [DEBUG] switch_core_state_machine.c:620 (sofia/default/1001@35.176.176.116) State Change CS_HANGUP -> CS_REPORTING 2021-02-11 10:53:49.814715 [DEBUG] switch_core_state_machine.c:585 (sofia/default/1001@35.176.176.116) Running State Change CS_REPORTING (Cur 2 Tot 37120) 2021-02-11 10:53:49.814715 [DEBUG] switch_core_state_machine.c:936 (sofia/default/1001@35.176.176.116) State REPORTING 2021-02-11 10:53:49.814715 [DEBUG] switch_core_state_machine.c:174 sofia/default/1001@35.176.176.116 Standard REPORTING, cause: CALL_REJECTED 2021-02-11 10:53:49.814715 [DEBUG] switch_core_state_machine.c:936 (sofia/default/1001@35.176.176.116) State REPORTING going to sleep 2021-02-11 10:53:49.814715 [DEBUG] switch_core_state_machine.c:611 (sofia/default/1001@35.176.176.116) State Change CS_REPORTING -> CS_DESTROY 2021-02-11 10:53:49.814715 [DEBUG] switch_core_session.c:1726 Session 37120 (sofia/default/1001@35.176.176.116) Locked, Waiting on external entities 2021-02-11 10:53:49.814715 [NOTICE] switch_core_session.c:1744 Session 37120 (sofia/default/1001@35.176.176.116) Ended 2021-02-11 10:53:49.814715 [NOTICE] switch_core_session.c:1748 Close Channel sofia/default/1001@35.176.176.116 [CS_DESTROY] 2021-02-11 10:53:49.814715 [DEBUG] switch_core_state_machine.c:739 (sofia/default/1001@35.176.176.116) Running State Change CS_DESTROY (Cur 1 Tot 37120) 2021-02-11 10:53:49.814715 [DEBUG] switch_core_state_machine.c:749 (sofia/default/1001@35.176.176.116) State DESTROY 2021-02-11 10:53:49.814715 [DEBUG] mod_sofia.c:364 sofia/default/1001@35.176.176.116 SOFIA DESTROY 2021-02-11 10:53:49.814715 [DEBUG] switch_core_state_machine.c:181 sofia/default/1001@35.176.176.116 Standard DESTROY 2021-02-11 10:53:49.814715 [DEBUG] switch_core_state_machine.c:749 (sofia/default/1001@35.176.176.116) State DESTROY going to sleep 2021-02-11 10:53:54.094559 [WARNING] switch_core_state_machine.c:688 7e43cc4f-c222-4036-a877-564b39a3a88b sofia/default/3241@35.176.176.116 Abandoned 2021-02-11 10:53:54.094559 [NOTICE] switch_core_state_machine.c:691 Hangup sofia/default/3241@35.176.176.116 [CS_NEW] [WRONG_CALL_STATE] 2021-02-11 10:53:54.094559 [DEBUG] switch_core_state_machine.c:585 (sofia/default/3241@35.176.176.116) Running State Change CS_HANGUP (Cur 1 Tot 37120) 2021-02-11 10:53:54.094559 [DEBUG] switch_core_state_machine.c:848 (sofia/default/3241@35.176.176.116) Callstate Change DOWN -> HANGUP 2021-02-11 10:53:54.094559 [DEBUG] switch_core_state_machine.c:850 (sofia/default/3241@35.176.176.116) State HANGUP 2021-02-11 10:53:54.094559 [DEBUG] mod_sofia.c:453 Channel sofia/default/3241@35.176.176.116 hanging up, cause: WRONG_CALL_STATE 2021-02-11 10:53:54.094559 [DEBUG] switch_core_state_machine.c:60 sofia/default/3241@35.176.176.116 Standard HANGUP, cause: WRONG_CALL_STATE 2021-02-11 10:53:54.094559 [DEBUG] switch_core_state_machine.c:850 (sofia/default/3241@35.176.176.116) State HANGUP going to sleep 2021-02-11 10:53:54.094559 [DEBUG] switch_core_state_machine.c:620 (sofia/default/3241@35.176.176.116) State Change CS_HANGUP -> CS_REPORTING 2021-02-11 10:53:54.094559 [DEBUG] switch_core_state_machine.c:585 (sofia/default/3241@35.176.176.116) Running State Change CS_REPORTING (Cur 1 Tot 37120) 2021-02-11 10:53:54.094559 [DEBUG] switch_core_state_machine.c:936 (sofia/default/3241@35.176.176.116) State REPORTING 2021-02-11 10:53:54.094559 [DEBUG] switch_core_state_machine.c:174 sofia/default/3241@35.176.176.116 Standard REPORTING, cause: WRONG_CALL_STATE 2021-02-11 10:53:54.094559 [DEBUG] switch_core_state_machine.c:936 (sofia/default/3241@35.176.176.116) State REPORTING going to sleep 2021-02-11 10:53:54.094559 [DEBUG] switch_core_state_machine.c:611 (sofia/default/3241@35.176.176.116) State Change CS_REPORTING -> CS_DESTROY 2021-02-11 10:53:54.094559 [DEBUG] switch_core_session.c:1726 Session 37119 (sofia/default/3241@35.176.176.116) Locked, Waiting on external entities 2021-02-11 10:53:54.094559 [NOTICE] switch_core_session.c:1744 Session 37119 (sofia/default/3241@35.176.176.116) Ended 2021-02-11 10:53:54.094559 [NOTICE] switch_core_session.c:1748 Close Channel sofia/default/3241@35.176.176.116 [CS_DESTROY] 2021-02-11 10:53:54.094559 [DEBUG] switch_core_state_machine.c:739 (sofia/default/3241@35.176.176.116) Running State Change CS_DESTROY (Cur 0 Tot 37120) 2021-02-11 10:53:54.094559 [DEBUG] switch_core_state_machine.c:749 (sofia/default/3241@35.176.176.116) State DESTROY 2021-02-11 10:53:54.094559 [DEBUG] mod_sofia.c:364 sofia/default/3241@35.176.176.116 SOFIA DESTROY 2021-02-11 10:53:54.094559 [DEBUG] switch_core_state_machine.c:181 sofia/default/3241@35.176.176.116 Standard DESTROY 2021-02-11 10:53:54.094559 [DEBUG] switch_core_state_machine.c:749 (sofia/default/3241@35.176.176.116) State DESTROY going to sleep 2021-02-11 10:54:08.594638 [WARNING] sofia_reg.c:1794 SIP auth challenge (REGISTER) on sofia profile 'default' for [4134577391@Kamal58.appcaption.com] from ip 117.247.91.162 2021-02-11 10:54:36.134639 [NOTICE] switch_channel.c:1118 New Channel sofia/default/2013@35.176.176.116 [57944acf-084c-45a2-aa24-6eb7499bd458] 2021-02-11 10:54:36.134639 [DEBUG] switch_core_state_machine.c:585 (sofia/default/2013@35.176.176.116) Running State Change CS_NEW (Cur 1 Tot 37121) 2021-02-11 10:54:36.134639 [DEBUG] sofia.c:10280 sofia/default/2013@35.176.176.116 receiving invite from 54.38.92.66:63762 version: 1.10.5 -release-17-25569c1631 64bit 2021-02-11 10:54:36.134639 [DEBUG] sofia.c:10374 verifying acl "default" for ip/port 54.38.92.66:0. 2021-02-11 10:54:36.134639 [WARNING] sofia_reg.c:1794 SIP auth challenge (INVITE) on sofia profile 'default' for [00516506493066@35.176.176.116] from ip 54.38.92.66 2021-02-11 10:54:36.134639 [DEBUG] switch_core_state_machine.c:604 (sofia/default/2013@35.176.176.116) State NEW 2021-02-11 10:54:36.134639 [DEBUG] sofia.c:2434 detaching session 57944acf-084c-45a2-aa24-6eb7499bd458 Type control-D or /exit or /quit or /bye to exit. 2021-02-11 10:54:40.834554 [WARNING] sofia_reg.c:1794 SIP auth challenge (REGISTER) on sofia profile 'default' for [4134577391@Kamal58.appcaption.com] from ip 117.247.91.162 freeswitch@ip-172-31-7-52> /exit root@ip-172-31-7-52:/home/support# mysql -pNfnT*UrQYuKNk6irJHfA mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 69749 Server version: 8.0.21 MySQL Community Server - GPL Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use astpp Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> SELECT * FROM routes WHERE (pattern = '^447943550553.*' OR pattern = '^44794355055.*' OR pattern = '^4479435505.*' OR pattern = '^447943550.*' OR pattern = '^44794355.*' OR pattern = '^4479435.*' OR pattern = '^447943.*' OR pattern = '^44794.*' OR pattern = '^4479.*' OR pattern = '^447.*' OR pattern = '^44.*' OR pattern = '^4.*' OR pattern ='--') AND status = 0 AND (pricelist_id = 3 OR accountid=76) ORDER BY accountid DESC,cost ASC LIMIT 1; +------+-----------+------------------------+-------------+-----------------+---------+--------------+------+------------+-----------+--------------+------------+------------+-----------+-------------+------------+--------+----------+----------+---------------------+---------------------+ | id | pattern | comment | connectcost | includedseconds | cost | pricelist_id | inc | country_id | call_type | routing_type | percentage | call_count | accountid | reseller_id | precedence | status | trunk_id | init_inc | creation_date | last_modified_date | +------+-----------+------------------------+-------------+-----------------+---------+--------------+------+------------+-----------+--------------+------------+------------+-----------+-------------+------------+--------+----------+----------+---------------------+---------------------+ | 7829 | ^447943.* | UK EE(T-Mobile) Mobile | 0.00000 | 0 | 0.02415 | 3 | 60 | 0 | | | | -10 | 0 | 0 | 0 | 0 | 4 | 60 | 2021-01-25 21:16:22 | 2021-01-25 21:16:22 | +------+-----------+------------------------+-------------+-----------------+---------+--------------+------+------------+-----------+--------------+------------+------------+-----------+-------------+------------+--------+----------+----------+---------------------+---------------------+ 1 row in set (0.01 sec) mysql> SELECT * FROM routes WHERE (pattern = '^447943550553.*' OR pattern = '^44794355055.*' OR pattern = '^4479435505.*' OR pattern = '^447943550.*' OR pattern = '^44794355.*' OR pattern = '^4479435.*' OR pattern = '^447943.*' OR pattern = '^44794.*' OR pattern = '^4479.*' OR pattern = '^447.*' OR pattern = '^44.*' OR pattern = '^4.*' OR pattern ='--') AND status = 0 AND (pricelist_id = 3 OR accountid=76) ORDER BY accountid DESC,cost ASC LIMIT 1 \G; *************************** 1. row *************************** id: 7829 pattern: ^447943.* comment: UK EE(T-Mobile) Mobile connectcost: 0.00000 includedseconds: 0 cost: 0.02415 pricelist_id: 3 inc: 60 country_id: 0 call_type: routing_type: percentage: call_count: -10 accountid: 0 reseller_id: 0 precedence: 0 status: 0 trunk_id: 4 init_inc: 60 creation_date: 2021-01-25 21:16:22 last_modified_date: 2021-01-25 21:16:22 1 row in set (0.00 sec) ERROR: No query specified mysql> ^C mysql> SELECT TK.id as trunk_id,TK.name as trunk_name,TK.codec,GW.name as path,GW.dialplan_variable,TK.provider_id,TR.init_inc,TK.status,TK.maxchannels,TK.cps,TK.leg_timeout,TR.pattern,TR.id as outbound_route_id,TR.connectcost,TR.comment,TR.includedseconds,TR.cost,TR.inc,TR.prepend,TR.strip,(select name from gateways where status=0 AND id = TK.failover_gateway_id) as path1,(select name from gateways where status=0 AND id = TK.failover_gateway_id1) as path2 FROM outbound_routes as TR,trunks as TK,gateways as GW WHERE GW.status=0 AND GW.id= TK.gateway_id AND TK.status=0 AND TK.id= TR.trunk_id AND (pattern = '^447943550553.*' OR pattern = '^44794355055.*' OR pattern = '^4479435505.*' OR pattern = '^447943550.*' OR pattern = '^44794355.*' OR pattern = '^4479435.*' OR pattern = '^447943.*' OR pattern = '^44794.*' OR pattern = '^4479.*' OR pattern = '^447.*' OR pattern = '^44.*' OR pattern = '^4.*' OR pattern ='--') AND TR.status = 0 AND TR.trunk_id IN (4) ORDER by FIELD(TR.trunk_id,4),LENGTH (pattern) DESC,TR.cost ASC,TR.precedence ASC \G; *************************** 1. row *************************** trunk_id: 4 trunk_name: Trunk_M1 codec: PCMA,PCMU,G729 path: Magrathea_Gateway dialplan_variable: provider_id: 3 init_inc: 60 status: 0 maxchannels: 0 cps: 0 leg_timeout: 0 pattern: ^447943.* outbound_route_id: 37405 connectcost: 0.00000 comment: UK EE(T-Mobile) Mobile includedseconds: 0 cost: 0.00690 inc: 1 prepend: strip: path1: NSN_Gateway path2: NULL 1 row in set (0.00 sec) ERROR: No query specified mysql>