From Prashant kumar, 2 Years ago, written in FreeSWITCH.
- view diff
Embed
  1. freeswitch@ip-172-31-14-218>
  2. freeswitch@ip-172-31-14-218>
  3. 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.
  4. 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
  5. You must define a domain called '3.7.66.233' in your directory and add a user with the id="9815051999" attribute
  6. and you must configure your device to use the proper domain in its authentication credentials.
  7. 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
  8. 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]
  9. 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)
  10. 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..
  11. 2022-04-14 11:50:35.266645 98.57% [DEBUG] sofia.c:10556 verifying acl "default" for ip/port 172.31.14.218:0.
  12. 2022-04-14 11:50:35.266645 98.57% [DEBUG] sofia.c:10585 IP 172.31.14.218 Approved by acl "default[]". Access Granted.
  13. 2022-04-14 11:50:35.266645 98.57% [DEBUG] sofia.c:11672 Setting NAT mode based on via received
  14. 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]
  15. 2022-04-14 11:50:35.266645 98.57% [DEBUG] sofia.c:7509 Remote SDP:
  16. v=0
  17. o=Z 0 0 IN IP4 103.240.35.46
  18. s=Z
  19. c=IN IP4 103.240.35.46
  20. t=0 0
  21. m=audio 8000 RTP/AVP 3 110 8 0 97 101
  22. a=rtpmap:110 speex/8000
  23. a=rtpmap:97 iLBC/8000
  24. a=fmtp:97 mode=30
  25. a=rtpmap:101 telephone-event/8000
  26. a=fmtp:101 0-16
  27.  
  28. 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]
  29. 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]
  30. 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]
  31. 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]
  32. 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]
  33. 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
  34. 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]
  35. 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]
  36. 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]
  37. 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
  38. 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]
  39. 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]
  40. 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5566 Set telephone-event payload to 101@8000
  41. 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
  42. 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
  43. 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_core_media.c:5915 Set telephone-event payload to 101@8000
  44. 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
  45. 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
  46. 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
  47. 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)
  48. 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
  49. 2022-04-14 11:50:35.266645 98.57% [DEBUG] mod_sofia.c:97 sofia/default/8694337983@w07version62.astppbilling.org:5066 SOFIA INIT
  50. 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
  51. 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
  52. 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
  53. 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)
  54. 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
  55. 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
  56. 2022-04-14 11:50:35.266645 98.57% [DEBUG] mod_sofia.c:158 sofia/default/8694337983@w07version62.astppbilling.org:5066 SOFIA ROUTING
  57. 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
  58. 2022-04-14 11:50:35.266645 98.57% [INFO] mod_dialplan_xml.c:639 Processing 8694337983 <8694337983>->44000086 in context default
  59. 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')
  60. 2022-04-14 11:50:35.266645 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  61. 2022-04-14 11:50:35.286623 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [feature_code_call_transfer] Blind Call Flag: 0
  62. 2022-04-14 11:50:35.286623 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Dialed number : 44000086
  63. 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
  64. 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
  65. 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
  66. 2022-04-14 11:50:35.286623 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] SOURCE NUMBER8694337983
  67. 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  68. 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
  69. 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
  70. 2022-04-14 11:50:35.286623 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Caller Id name / number  : 8694337983 / 8694337983
  71. 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] Interconnect code destination number 86
  72. 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
  73. 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
  74. 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
  75. 2022-04-14 11:50:35.286623 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  76. 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
  77. 2022-04-14 11:50:35.286623 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Call direction : outbound
  78. 2022-04-14 11:50:35.286623 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [OPENSIP_FROM_IP] from_ip : 103.240.35.46
  79. 2022-04-14 11:50:35.286623 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [Accountcode : 7698420599]
  80. 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
  81. 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
  82. 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
  83. 2022-04-14 11:50:35.306619 98.57% [NOTICE] switch_cpp.cpp:1465 [ASTPP] Localization Id: 3
  84. 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
  85. 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_LOCALIZATION] dest_number_len :8
  86. 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_LOCALIZATION] 44444 :17
  87. 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_LOCALIZATION] Query :"22/33/*/17".....44000086
  88. 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
  89. 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
  90. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] SPEED DIAL NUMBER : 44000086
  91. 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
  92. 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
  93. 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  94. 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
  95. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] New Call Direction : outbound
  96. 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
  97. 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] Call Barring Status : -1
  98. 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
  99. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] =============== Account Information ===================
  100. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] User id : 18
  101. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Account code : 7698420599
  102. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Balance : 160.6
  103. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Type : 0 [0:prepaid,1:postpaid]
  104. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Ratecard id : 5
  105. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] CID Pool : 0
  106. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] ========================================================
  107. 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
  108. 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_RATES] call_direction :outbound
  109. 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
  110. 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
  111. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP]  Call Direction : outbound
  112. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] =============== Rates Information ===================
  113. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] ID : 36
  114. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Connectcost : 0.00000
  115. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Includedseconds : 0
  116. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Cost : 0.60000
  117. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Comment : percentage
  118. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Country Id : 151
  119. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Accid : 18
  120. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Trunk ID: 1,3,7
  121. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Routing type: 3
  122. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] ================================================================
  123. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [FIND_MAXLENGTH] Your160.6 balance Accountid 18 !!!
  124. 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!
  125. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Call Max Length Duration : 100 minutes
  126. 2022-04-14 11:50:35.306619 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] [DIALPLAN] User Rate ID : 36
  127. 2022-04-14 11:50:35.306619 98.57% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_COUNTER_INFO] Force Trunk Type Here :1
  128. 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
  129. 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
  130. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] =============== Termination Rates Information ===================
  131. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] ID : 12
  132. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Code : ^44.*
  133. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Destination : PK-Destination percentage
  134. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Connectcost : 0.00000
  135. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Free Seconds : 0
  136. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Prefix : ^44.*
  137. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Strip :
  138. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Prepend :
  139. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Carrier id : 3
  140. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] carrier_name : YourProvider
  141. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] dialplan_variable :
  142. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Failover gateway :
  143. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Vendor id : 3
  144. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_cpp.cpp:1465 [ASTPP] Max channels : 0
  145. 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)
  146. stack traceback:
  147.         ...hare/freeswitch/scripts/astpp/scripts/astpp.dialplan.lua:861: in main chunk
  148.         [C]: in function 'dofile'
  149.         /usr/share/freeswitch/scripts/astpp/astpp.lua:94: in main chunk
  150. 2022-04-14 11:50:35.326626 98.57% [ERR] mod_lua.cpp:270 LUA script parse/execute error!
  151. 2022-04-14 11:50:35.326626 98.57% [WARNING] mod_dialplan_xml.c:669 Context default not found
  152. 2022-04-14 11:50:35.326626 98.57% [INFO] switch_core_state_machine.c:306 No Route, Aborting
  153. 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]
  154. 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
  155. 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)
  156. 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
  157. 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
  158. 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
  159. 2022-04-14 11:50:35.326626 98.57% [DEBUG] mod_sofia.c:613 Responding to INVITE with: 404
  160. 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
  161. 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
  162. 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
  163. 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)
  164. 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
  165. 2022-04-14 11:50:35.326626 98.57% [INFO] mod_json_cdr.c:271 Process [aa2dc9d3-1f47-4cd2-9a78-0d42124330b4.cdr.json]
  166. 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
  167. 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
  168. 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
  169. 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
  170. 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
  171. 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]
  172. 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)
  173. 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
  174. 2022-04-14 11:50:35.346629 98.57% [DEBUG] mod_sofia.c:379 sofia/default/8694337983@w07version62.astppbilling.org:5066 SOFIA DESTROY
  175. 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
  176. 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
  177. freeswitch@ip-172-31-14-218>
  178. freeswitch@ip-172-31-14-218>
  179. freeswitch@ip-172-31-14-218>
  180. freeswitch@ip-172-31-14-218>
  181. freeswitch@ip-172-31-14-218>