freeswitch@ip-172-31-14-218> freeswitch@ip-172-31-14-218> 2022-04-14 11:50:31.386644 95.60% [WARNING] switch_core_file.c:463 File has 2 channels, muxing to 1 channel will occur. 2022-04-14 11:50:34.166652 98.50% [WARNING] sofia_reg.c:3223 Can't find user [9815051999@3.7.66.233] from 117.247.91.162 You must define a domain called '3.7.66.233' in your directory and add a user with the id="9815051999" attribute and you must configure your device to use the proper domain in its authentication credentials. 2022-04-14 11:50:34.166652 98.50% [WARNING] sofia_reg.c:1806 SIP auth failure (REGISTER) on sofia profile 'default' for [9815051999@3.7.66.233] from ip 117.247.91.162 2022-04-14 11:50:35.266645 98.57% [NOTICE] switch_channel.c:1123 New Channel sofia/default/8694337983@w07version62.astppbilling.org:5066 [aa2dc9d3-1f47-4cd2-9a78-0d42124330b4] 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_state_machine.c:581 (sofia/default/8694337983@w07version62.astppbilling.org:5066) Running State Change CS_NEW (Cur 1 Tot 23) 2022-04-14 11:50:35.266645 98.57% [INFO] sofia.c:10462 sofia/default/8694337983@w07version62.astppbilling.org:5066 receiving invite from 172.31.14.218:5066 version: 1.10.7 -release-19-883d2cb662 64bit call-id: xqSuj4lxR4qfr_ntWEQQ9g.. 2022-04-14 11:50:35.266645 98.57% [DEBUG] sofia.c:10556 verifying acl "default" for ip/port 172.31.14.218:0. 2022-04-14 11:50:35.266645 98.57% [DEBUG] sofia.c:10585 IP 172.31.14.218 Approved by acl "default[]". Access Granted. 2022-04-14 11:50:35.266645 98.57% [DEBUG] sofia.c:11672 Setting NAT mode based on via received 2022-04-14 11:50:35.266645 98.57% [DEBUG] sofia.c:7499 Channel sofia/default/8694337983@w07version62.astppbilling.org:5066 entering state [received][100] 2022-04-14 11:50:35.266645 98.57% [DEBUG] sofia.c:7509 Remote SDP: v=0 o=Z 0 0 IN IP4 103.240.35.46 s=Z c=IN IP4 103.240.35.46 t=0 0 m=audio 8000 RTP/AVP 3 110 8 0 97 101 a=rtpmap:110 speex/8000 a=rtpmap:97 iLBC/8000 a=fmtp:97 mode=30 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5650 Audio Codec Compare [GSM:3:8000:20:13200:1]/[PCMA:8:8000:20:64000:1] 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5650 Audio Codec Compare [GSM:3:8000:20:13200:1]/[PCMU:0:8000:20:64000:1] 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5650 Audio Codec Compare [speex:110:8000:20:0:1]/[PCMA:8:8000:20:64000:1] 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5650 Audio Codec Compare [speex:110:8000:20:0:1]/[PCMU:0:8000:20:64000:1] 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5650 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1] 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5705 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5650 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMU:0:8000:20:64000:1] 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5650 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMA:8:8000:20:64000:1] 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5650 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMU:0:8000:20:64000:1] 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5705 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5650 Audio Codec Compare [iLBC:97:8000:30:0:1]/[PCMA:8:8000:20:64000:1] 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5650 Audio Codec Compare [iLBC:97:8000:30:0:1]/[PCMU:0:8000:20:64000:1] 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5566 Set telephone-event payload to 101@8000 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:3870 Set Codec sofia/default/8694337983@w07version62.astppbilling.org:5066 PCMA/8000 20 ms 160 samples 64000 bits 1 channels 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_codec.c:111 sofia/default/8694337983@w07version62.astppbilling.org:5066 Original read codec set to PCMA:8 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5915 Set telephone-event payload to 101@8000 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5973 sofia/default/8694337983@w07version62.astppbilling.org:5066 Set 2833 dtmf send payload to 101 recv payload to 101 2022-04-14 11:50:35.266645 98.57% [DEBUG] sofia.c:7933 (sofia/default/8694337983@w07version62.astppbilling.org:5066) State Change CS_NEW -> CS_INIT 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_state_machine.c:600 (sofia/default/8694337983@w07version62.astppbilling.org:5066) State NEW 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_state_machine.c:581 (sofia/default/8694337983@w07version62.astppbilling.org:5066) Running State Change CS_INIT (Cur 1 Tot 23) 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_state_machine.c:624 (sofia/default/8694337983@w07version62.astppbilling.org:5066) State INIT 2022-04-14 11:50:35.266645 98.57% [DEBUG] mod_sofia.c:97 sofia/default/8694337983@w07version62.astppbilling.org:5066 SOFIA INIT 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_state_machine.c:40 sofia/default/8694337983@w07version62.astppbilling.org:5066 Standard INIT 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_state_machine.c:48 (sofia/default/8694337983@w07version62.astppbilling.org:5066) State Change CS_INIT -> CS_ROUTING 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_state_machine.c:624 (sofia/default/8694337983@w07version62.astppbilling.org:5066) State INIT going to sleep 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_state_machine.c:581 (sofia/default/8694337983@w07version62.astppbilling.org:5066) Running State Change CS_ROUTING (Cur 1 Tot 23) 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_channel.c:2380 (sofia/default/8694337983@w07version62.astppbilling.org:5066) Callstate Change DOWN -> RINGING 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_state_machine.c:640 (sofia/default/8694337983@w07version62.astppbilling.org:5066) State ROUTING 2022-04-14 11:50:35.266645 98.57% [DEBUG] mod_sofia.c:158 sofia/default/8694337983@w07version62.astppbilling.org:5066 SOFIA ROUTING 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_state_machine.c:230 sofia/default/8694337983@w07version62.astppbilling.org:5066 Standard ROUTING 2022-04-14 11:50:35.266645 98.57% [INFO] mod_dialplan_xml.c:639 Processing 8694337983 <8694337983>->44000086 in context default 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_CONF] Query :SELECT name,value FROM `system` WHERE group_title IN ('global','opensips','callingcard','calls','international_prefixes','interconnect_code') 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons 2022-04-14 11:50:35.286623 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [feature_code_call_transfer] Blind Call Flag: 0 2022-04-14 11:50:35.286623 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Dialed number : 44000086 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [CHECK_FEATURE_CODE] Query :SELECT id,feature_action,feature_code from feature_code where feature_code = '44000086' limit 1 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [DOAUTHORIZATION] Query :SELECT access_number FROM accessnumber WHERE access_number = '44000086' AND status=0 limit 1 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [Functions] [Fifo Condition Check] Query :SELECT id,destination_number,agent_hold_file from pbx_queue WHERE destination_number = '44000086' and status=0 LIMIT 1 2022-04-14 11:50:35.286623 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] SOURCE NUMBER8694337983 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [DOAUTHORIZATION LOCAL SOURCE] Query :SELECT domain,accountid FROM domains WHERE domain = 'w07version62.astppbilling.org' limit 1 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [DOAUTHORIZATION LOCAL DOMAIN] Query :SELECT accountid from sip_devices where accountid = '18' and username = '44000086' limit 1 2022-04-14 11:50:35.286623 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Caller Id name / number : 8694337983 / 8694337983 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] Interconnect code destination number 86 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [get_interconnectcode_info] Query :SELECT * FROM interconnectcode WHERE interconnectcode = 440000 AND status=0 limit 1 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [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, A.codec as did_codec,A.provider_id as provider_id FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="44000086" LIMIT 1 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [CHECK_DID_CALL_TRANSFER] Query :SELECT A.id as id,A.provider_id as provider_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,A.transfer_status,A.busy_status,A.no_answer_status,A.always_status,A.transfer_call_type,A.transfer_extensions FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="44000086" LIMIT 1 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [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,sip_devices.codec as sip_codec 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="44000086" AND domains.domain="w07version62.astppbilling.org" limit 1 2022-04-14 11:50:35.286623 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Call direction : outbound 2022-04-14 11:50:35.286623 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [OPENSIP_FROM_IP] from_ip : 103.240.35.46 2022-04-14 11:50:35.286623 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [Accountcode : 7698420599] 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [DOAUTHORIZATION] Query :SELECT * FROM accounts WHERE number = "7698420599" AND deleted = 0 limit 1 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [CHECK_BLOCKED_PREFIX] Query :SELECT * FROM block_patterns WHERE (blocked_patterns = '^44000086.*' OR blocked_patterns = '^4400008.*' OR blocked_patterns = '^440000.*' OR blocked_patterns = '^44000.*' OR blocked_patterns = '^4400.*' OR blocked_patterns = '^440.*' OR blocked_patterns = '^44.*' OR blocked_patterns = '^4.*' OR blocked_patterns ='--') AND accountid = 18 limit 1 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [IS_CHECK_DID] Query :SELECT * FROM dids WHERE number ="44000086" AND (accountid = 0 OR status = 1) LIMIT 1 2022-04-14 11:50:35.306619 98.57% [NOTICE] switch_cpp.cpp:1465 [ASTPP] Localization Id: 3 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_LOCALIZATION] Query :SELECT id,in_caller_id_originate,out_caller_id_originate,number_originate,dst_base_cid FROM localization WHERE id = 3 AND status=0 limit 1 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_LOCALIZATION] dest_number_len :8 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_LOCALIZATION] 44444 :17 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_LOCALIZATION] Query :"22/33/*/17".....44000086 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [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 P.is_terminated = 0 AND (patterns = '^44000086.*' OR patterns = '^4400008.*' OR patterns = '^440000.*' OR patterns = '^44000.*' OR patterns = '^4400.*' OR patterns = '^440.*' OR patterns = '^44.*' OR patterns = '^4.*' OR patterns ='--') AND accountid = 18 ORDER BY LENGTH(PKGPTR.patterns) DESC 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [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 ="44000086" AND A.accountid = '18' limit 1 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] SPEED DIAL NUMBER : 44000086 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [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, A.codec as did_codec,A.provider_id as provider_id FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="44000086" LIMIT 1 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [CHECK_DID_CALL_TRANSFER] Query :SELECT A.id as id,A.provider_id as provider_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,A.transfer_status,A.busy_status,A.no_answer_status,A.always_status,A.transfer_call_type,A.transfer_extensions FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="44000086" LIMIT 1 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [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,sip_devices.codec as sip_codec 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="44000086" AND domains.domain="w07version62.astppbilling.org" limit 1 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] New Call Direction : outbound 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [CHECK_CALL_BARRING] Query :SELECT number,RIGHT(number,1) as lastchar,type as status_type,number_type,accountid FROM call_barring WHERE ((number = '44000086' OR number = '4400008' OR number = '440000' OR number = '44000' OR number = '4400' OR number = '440' OR number = '44' OR number = '4' OR number ='--') OR (number = '44000086*' OR number = '4400008*' OR number = '440000*' OR number = '44000*' OR number = '4400*' OR number = '440*' OR number = '44*' OR number = '4*' OR number ='--') OR (number = '8694337983' OR number = '869433798' OR number = '86943379' OR number = '8694337' OR number = '869433' OR number = '86943' OR number = '8694' OR number = '869' OR number = '86' OR number = '8' OR number ='--') OR (number = '8694337983*' OR number = '869433798*' OR number = '86943379*' OR number = '8694337*' OR number = '869433*' OR number = '86943*' OR number = '8694*' OR number = '869*' OR number = '86*' OR number = '8*' OR number ='--')) AND status=0 AND accountid = 0 order by LENGTH(number) DESC,lastchar DESC, modified_date DESC 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] Call Barring Status : -1 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_PRICELIST_ROUTING_INFO] Query :select id,routing_prefix,pricelist_id_admin from pricelists WHERE (routing_prefix = '44000086' OR routing_prefix = '4400008' OR routing_prefix = '440000' OR routing_prefix = '44000' OR routing_prefix = '4400' OR routing_prefix = '440' OR routing_prefix = '44' OR routing_prefix = '4' OR routing_prefix ='--') AND status = 0 and reseller_id = 0 limit 1 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] =============== Account Information =================== 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] User id : 18 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Account code : 7698420599 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Balance : 160.6 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Type : 0 [0:prepaid,1:postpaid] 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Ratecard id : 5 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] CID Pool : 0 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] ======================================================== 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_PRICELIST_INFO] Query :select * from pricelists WHERE id = 5 AND status = 0 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_RATES] call_direction :outbound 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_PRICELIST_INFO] Query :select * from pricelists WHERE id = 5 AND status = 0 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_RATES] Query :SELECT * FROM routes WHERE (pattern = '^44000086.*' OR pattern = '^4400008.*' OR pattern = '^440000.*' OR pattern = '^44000.*' OR pattern = '^4400.*' OR pattern = '^440.*' OR pattern = '^44.*' OR pattern = '^4.*' OR pattern ='--') AND (caller_id_pattern = '^8694337983.*' OR caller_id_pattern = '^869433798.*' OR caller_id_pattern = '^86943379.*' OR caller_id_pattern = '^8694337.*' OR caller_id_pattern = '^869433.*' OR caller_id_pattern = '^86943.*' OR caller_id_pattern = '^8694.*' OR caller_id_pattern = '^869.*' OR caller_id_pattern = '^86.*' OR caller_id_pattern = '^8.*' OR caller_id_pattern ='^.*') AND status = 0 AND effective_date <= UTC_TIMESTAMP() AND (pricelist_id = 5 OR accountid=18) ORDER BY accountid DESC,LENGTH(pattern),LENGTH(caller_id_pattern) DESC,cost DESC,effective_date DESC LIMIT 1 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Call Direction : outbound 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] =============== Rates Information =================== 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] ID : 36 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Connectcost : 0.00000 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Includedseconds : 0 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Cost : 0.60000 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Comment : percentage 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Country Id : 151 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Accid : 18 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Trunk ID: 1,3,7 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Routing type: 3 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] ================================================================ 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [FIND_MAXLENGTH] Your160.6 balance Accountid 18 !!! 2022-04-14 11:50:35.306619 98.57% [NOTICE] switch_cpp.cpp:1465 [ASTPP] [FIND_MAXLENGTH] Limiting Call To Config Max Length 100 mins! 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Call Max Length Duration : 100 minutes 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [DIALPLAN] User Rate ID : 36 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_COUNTER_INFO] Force Trunk Type Here :1 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_CARRIER_RATES] Query Rate Carrier Id :1,3,7 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_CARRIER_RATES] Query :SELECT TK.id as trunk_id,TK.sip_cid_type,TK.codec,GW.name as path,GW.dialplan_variable,TK.provider_id,TR.init_inc,TK.status,TK.leg_timeout,TK.maxchannels,TR.effective_date as effective_date,TR.pattern,TR.id as outbound_route_id,TR.connectcost,TR.comment,TR.includedseconds,TR.cost,TR.inc,TR.prepend,TR.strip,(select percentage from routing where routes_id=(select id from routes where (pattern = '^44000086.*' OR pattern = '^4400008.*' OR pattern = '^440000.*' OR pattern = '^44000.*' OR pattern = '^4400.*' OR pattern = '^440.*' OR pattern = '^44.*' OR pattern = '^4.*' OR pattern ='--') and pricelist_id=5 ORDER BY LENGTH(pattern) DESC,cost DESC limit 1) AND trunk_id = TR.trunk_id limit 1) as percentage,(select call_count from routing where routes_id=(select id from routes where (pattern = '^44000086.*' OR pattern = '^4400008.*' OR pattern = '^440000.*' OR pattern = '^44000.*' OR pattern = '^4400.*' OR pattern = '^440.*' OR pattern = '^44.*' OR pattern = '^4.*' OR pattern ='--') and pricelist_id=5 ORDER BY LENGTH(pattern) DESC,cost DESC limit 1) AND trunk_id = TR.trunk_id) as trunk_count,(select call_count from routes where (pattern = '^44000086.*' OR pattern = '^4400008.*' OR pattern = '^440000.*' OR pattern = '^44000.*' OR pattern = '^4400.*' OR pattern = '^440.*' OR pattern = '^44.*' OR pattern = '^4.*' OR pattern ='--') and pricelist_id=5 ORDER BY LENGTH(pattern) DESC,cost DESC limit 1 ) as routes_count,100 * (select call_count from routing where routes_id=(select id from routes where (pattern = '^44000086.*' OR pattern = '^4400008.*' OR pattern = '^440000.*' OR pattern = '^44000.*' OR pattern = '^4400.*' OR pattern = '^440.*' OR pattern = '^44.*' OR pattern = '^4.*' OR pattern ='--') and pricelist_id=5 ORDER BY LENGTH(pattern) DESC,cost DESC limit 1) AND trunk_id = TR.trunk_id) / (select call_count from routes where (pattern = '^44000086.*' OR pattern = '^4400008.*' OR pattern = '^440000.*' OR pattern = '^44000.*' OR pattern = '^4400.*' OR pattern = '^440.*' OR pattern = '^44.*' OR pattern = '^4.*' OR pattern ='--') and pricelist_id=5 ORDER BY LENGTH(pattern) DESC,cost DESC limit 1 ) AS percent_atual,(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 = '^44000086.*' OR pattern = '^4400008.*' OR pattern = '^440000.*' OR pattern = '^44000.*' OR pattern = '^4400.*' OR pattern = '^440.*' OR pattern = '^44.*' OR pattern = '^4.*' OR pattern ='--') AND TR.status = 0 AND TR.trunk_id IN (1,3,7) AND TR.effective_date <= UTC_TIMESTAMP() ORDER by IF( percent_atual >= percentage, percentage, '' ) ASC , IF( percent_atual <= percentage, percentage, '' ) DESC,TR.effective_date DESC 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] =============== Termination Rates Information =================== 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] ID : 12 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Code : ^44.* 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Destination : PK-Destination percentage 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Connectcost : 0.00000 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Free Seconds : 0 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Prefix : ^44.* 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Strip : 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Prepend : 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Carrier id : 3 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] carrier_name : YourProvider 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] dialplan_variable : 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Failover gateway : 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Vendor id : 3 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Max channels : 0 2022-04-14 11:50:35.326626 98.57% [ERR] mod_lua.cpp:202 ...hare/freeswitch/scripts/astpp/scripts/astpp.dialplan.lua:861: attempt to concatenate field 'trunk_name' (a nil value) stack traceback: ...hare/freeswitch/scripts/astpp/scripts/astpp.dialplan.lua:861: in main chunk [C]: in function 'dofile' /usr/share/freeswitch/scripts/astpp/astpp.lua:94: in main chunk 2022-04-14 11:50:35.326626 98.57% [ERR] mod_lua.cpp:270 LUA script parse/execute error! 2022-04-14 11:50:35.326626 98.57% [WARNING] mod_dialplan_xml.c:669 Context default not found 2022-04-14 11:50:35.326626 98.57% [INFO] switch_core_state_machine.c:306 No Route, Aborting 2022-04-14 11:50:35.326626 98.57% [NOTICE] switch_core_state_machine.c:307 Hangup sofia/default/8694337983@w07version62.astppbilling.org:5066 [CS_ROUTING] [NO_ROUTE_DESTINATION] 2022-04-14 11:50:35.326626 98.57% [DEBUG] switch_core_state_machine.c:640 (sofia/default/8694337983@w07version62.astppbilling.org:5066) State ROUTING going to sleep 2022-04-14 11:50:35.326626 98.57% [DEBUG] switch_core_state_machine.c:581 (sofia/default/8694337983@w07version62.astppbilling.org:5066) Running State Change CS_HANGUP (Cur 1 Tot 23) 2022-04-14 11:50:35.326626 98.57% [DEBUG] switch_core_state_machine.c:844 (sofia/default/8694337983@w07version62.astppbilling.org:5066) Callstate Change RINGING -> HANGUP 2022-04-14 11:50:35.326626 98.57% [DEBUG] switch_core_state_machine.c:846 (sofia/default/8694337983@w07version62.astppbilling.org:5066) State HANGUP 2022-04-14 11:50:35.326626 98.57% [DEBUG] mod_sofia.c:468 Channel sofia/default/8694337983@w07version62.astppbilling.org:5066 hanging up, cause: NO_ROUTE_DESTINATION 2022-04-14 11:50:35.326626 98.57% [DEBUG] mod_sofia.c:613 Responding to INVITE with: 404 2022-04-14 11:50:35.326626 98.57% [DEBUG] switch_core_state_machine.c:59 sofia/default/8694337983@w07version62.astppbilling.org:5066 Standard HANGUP, cause: NO_ROUTE_DESTINATION 2022-04-14 11:50:35.326626 98.57% [DEBUG] switch_core_state_machine.c:846 (sofia/default/8694337983@w07version62.astppbilling.org:5066) State HANGUP going to sleep 2022-04-14 11:50:35.326626 98.57% [DEBUG] switch_core_state_machine.c:616 (sofia/default/8694337983@w07version62.astppbilling.org:5066) State Change CS_HANGUP -> CS_REPORTING 2022-04-14 11:50:35.326626 98.57% [DEBUG] switch_core_state_machine.c:581 (sofia/default/8694337983@w07version62.astppbilling.org:5066) Running State Change CS_REPORTING (Cur 1 Tot 23) 2022-04-14 11:50:35.326626 98.57% [DEBUG] switch_core_state_machine.c:932 (sofia/default/8694337983@w07version62.astppbilling.org:5066) State REPORTING 2022-04-14 11:50:35.326626 98.57% [INFO] mod_json_cdr.c:271 Process [aa2dc9d3-1f47-4cd2-9a78-0d42124330b4.cdr.json] 2022-04-14 11:50:35.346629 98.57% [DEBUG] switch_core_state_machine.c:168 sofia/default/8694337983@w07version62.astppbilling.org:5066 Standard REPORTING, cause: NO_ROUTE_DESTINATION 2022-04-14 11:50:35.346629 98.57% [DEBUG] switch_core_state_machine.c:932 (sofia/default/8694337983@w07version62.astppbilling.org:5066) State REPORTING going to sleep 2022-04-14 11:50:35.346629 98.57% [DEBUG] switch_core_state_machine.c:607 (sofia/default/8694337983@w07version62.astppbilling.org:5066) State Change CS_REPORTING -> CS_DESTROY 2022-04-14 11:50:35.346629 98.57% [DEBUG] switch_core_session.c:1753 Session 23 (sofia/default/8694337983@w07version62.astppbilling.org:5066) Locked, Waiting on external entities 2022-04-14 11:50:35.346629 98.57% [NOTICE] switch_core_session.c:1771 Session 23 (sofia/default/8694337983@w07version62.astppbilling.org:5066) Ended 2022-04-14 11:50:35.346629 98.57% [NOTICE] switch_core_session.c:1775 Close Channel sofia/default/8694337983@w07version62.astppbilling.org:5066 [CS_DESTROY] 2022-04-14 11:50:35.346629 98.57% [DEBUG] switch_core_state_machine.c:735 (sofia/default/8694337983@w07version62.astppbilling.org:5066) Running State Change CS_DESTROY (Cur 0 Tot 23) 2022-04-14 11:50:35.346629 98.57% [DEBUG] switch_core_state_machine.c:745 (sofia/default/8694337983@w07version62.astppbilling.org:5066) State DESTROY 2022-04-14 11:50:35.346629 98.57% [DEBUG] mod_sofia.c:379 sofia/default/8694337983@w07version62.astppbilling.org:5066 SOFIA DESTROY 2022-04-14 11:50:35.346629 98.57% [DEBUG] switch_core_state_machine.c:175 sofia/default/8694337983@w07version62.astppbilling.org:5066 Standard DESTROY 2022-04-14 11:50:35.346629 98.57% [DEBUG] switch_core_state_machine.c:745 (sofia/default/8694337983@w07version62.astppbilling.org:5066) State DESTROY going to sleep freeswitch@ip-172-31-14-218> freeswitch@ip-172-31-14-218> freeswitch@ip-172-31-14-218> freeswitch@ip-172-31-14-218> freeswitch@ip-172-31-14-218>