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-02-27 17:05:02.266793 98.77% [NOTICE] switch_channel.c:1123 New Channel sofia/default/9601606807@46.101.114.158 [c304a027-1897-4671-8a16-992f86aa2960]
  4. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_state_machine.c:581 (sofia/default/9601606807@46.101.114.158) Running State Change CS_NEW (Cur 1 Tot 49)
  5. 2022-02-27 17:05:02.266793 98.77% [INFO] sofia.c:10462 sofia/default/9601606807@46.101.114.158 receiving invite from 46.101.114.158:5077 version: 1.10.7 -release-19-883d2cb662 64bit call-id: 3e553e33-1292-123b-9690-ba05d31eb9f9
  6. 2022-02-27 17:05:02.266793 98.77% [DEBUG] sofia.c:10556 verifying acl "default" for ip/port 46.101.114.158:0.
  7. 2022-02-27 17:05:02.266793 98.77% [DEBUG] sofia.c:10585 IP 46.101.114.158 Approved by acl "default[]". Access Granted.
  8. 2022-02-27 17:05:02.266793 98.77% [DEBUG] sofia.c:7499 Channel sofia/default/9601606807@46.101.114.158 entering state [received][100]
  9. 2022-02-27 17:05:02.266793 98.77% [DEBUG] sofia.c:7509 Remote SDP:
  10. v=0
  11. o=FreeSWITCH 1645953136 1645953137 IN IP4 46.101.114.158
  12. s=FreeSWITCH
  13. c=IN IP4 46.101.114.158
  14. t=0 0
  15. m=audio 28366 RTP/AVP 0 8 101
  16. a=rtpmap:0 PCMU/8000
  17. a=rtpmap:8 PCMA/8000
  18. a=rtpmap:101 telephone-event/8000
  19. a=fmtp:101 0-16
  20. a=ptime:20
  21.  
  22. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_media.c:5650 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
  23. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_media.c:5650 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
  24. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_media.c:5705 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match
  25. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_media.c:5650 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
  26. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_media.c:5705 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
  27. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_media.c:5650 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
  28. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_media.c:5566 Set telephone-event payload to 101@8000
  29. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_media.c:3870 Set Codec sofia/default/9601606807@46.101.114.158 PCMU/8000 20 ms 160 samples 64000 bits 1 channels
  30. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_codec.c:111 sofia/default/9601606807@46.101.114.158 Original read codec set to PCMU:0
  31. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_media.c:5915 Set telephone-event payload to 101@8000
  32. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_media.c:5973 sofia/default/9601606807@46.101.114.158 Set 2833 dtmf send payload to 101 recv payload to 101
  33. 2022-02-27 17:05:02.266793 98.77% [DEBUG] sofia.c:7933 (sofia/default/9601606807@46.101.114.158) State Change CS_NEW -> CS_INIT
  34. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_state_machine.c:600 (sofia/default/9601606807@46.101.114.158) State NEW
  35. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_state_machine.c:581 (sofia/default/9601606807@46.101.114.158) Running State Change CS_INIT (Cur 1 Tot 49)
  36. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_state_machine.c:624 (sofia/default/9601606807@46.101.114.158) State INIT
  37. 2022-02-27 17:05:02.266793 98.77% [DEBUG] mod_sofia.c:97 sofia/default/9601606807@46.101.114.158 SOFIA INIT
  38. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_state_machine.c:40 sofia/default/9601606807@46.101.114.158 Standard INIT
  39. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_state_machine.c:48 (sofia/default/9601606807@46.101.114.158) State Change CS_INIT -> CS_ROUTING
  40. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_state_machine.c:624 (sofia/default/9601606807@46.101.114.158) State INIT going to sleep
  41. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_state_machine.c:581 (sofia/default/9601606807@46.101.114.158) Running State Change CS_ROUTING (Cur 1 Tot 49)
  42. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_channel.c:2380 (sofia/default/9601606807@46.101.114.158) Callstate Change DOWN -> RINGING
  43. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_state_machine.c:640 (sofia/default/9601606807@46.101.114.158) State ROUTING
  44. 2022-02-27 17:05:02.266793 98.77% [DEBUG] mod_sofia.c:158 sofia/default/9601606807@46.101.114.158 SOFIA ROUTING
  45. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_core_state_machine.c:230 sofia/default/9601606807@46.101.114.158 Standard ROUTING
  46. 2022-02-27 17:05:02.266793 98.77% [INFO] mod_dialplan_xml.c:639 Processing 9601606807 <9601606807>->440540 in context default
  47. 2022-02-27 17:05:02.266793 98.77% [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')
  48. 2022-02-27 17:05:02.266793 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  49. 2022-02-27 17:05:02.286795 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [feature_code_call_transfer] Blind Call Flag: 0
  50. 2022-02-27 17:05:02.286795 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Dialed number : 440540
  51. 2022-02-27 17:05:02.286795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [CHECK_FEATURE_CODE] Query :SELECT id,feature_action,feature_code from feature_code where feature_code = '440540' limit 1
  52. 2022-02-27 17:05:02.286795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [DOAUTHORIZATION] Query :SELECT access_number FROM accessnumber WHERE access_number = '440540' AND status=0 limit 1
  53. 2022-02-27 17:05:02.286795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [Functions] [Fifo Condition Check] Query :SELECT id,destination_number,agent_hold_file from pbx_queue WHERE destination_number = '440540' and status=0 LIMIT 1
  54. 2022-02-27 17:05:02.286795 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] SOURCE NUMBERgw+PK-Default-Gateway
  55. 2022-02-27 17:05:02.286795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  56. 2022-02-27 17:05:02.286795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [DOAUTHORIZATION LOCAL SOURCE] Query :SELECT domain,accountid FROM domains WHERE domain = '3.7.66.233' limit 1
  57. 2022-02-27 17:05:02.286795 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Caller Id name / number  : 9601606807 / 9601606807
  58. 2022-02-27 17:05:02.286795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] Interconnect code destination number
  59. 2022-02-27 17:05:02.286795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [get_interconnectcode_info] Query :SELECT * FROM interconnectcode WHERE interconnectcode = 440540 AND status=0 limit 1
  60. 2022-02-27 17:05:02.286795 98.77% [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 FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="440540" LIMIT 1
  61. 2022-02-27 17:05:02.286795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  62. 2022-02-27 17:05:02.286795 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Call direction : inbound
  63. 2022-02-27 17:05:02.286795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [IPAUTHENTICATION] Query :SELECT ip_map.*, (SELECT number FROM accounts where id=accountid AND status=0 AND deleted=0) AS account_code FROM ip_map WHERE INET_ATON("46.101.114.158") BETWEEN(INET_ATON(SUBSTRING_INDEX(`ip`, '/', 1)) & 0xffffffff ^((0x1 <<(32 -  SUBSTRING_INDEX(`ip`, '/', -1))) -1 )) AND(INET_ATON(SUBSTRING_INDEX(`ip`, '/', 1)) |((0x100000000 >> SUBSTRING_INDEX(`ip`,'/', -1)) -1))  AND "440540"  LIKE CONCAT(prefix,'%') ORDER BY LENGTH(prefix) DESC LIMIT 1
  64. 2022-02-27 17:05:02.286795 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Accountcode : 3673942894]
  65. 2022-02-27 17:05:02.286795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [DOAUTHORIZATION] Query :SELECT * FROM accounts WHERE number = "3673942894" AND deleted = 0 limit 1
  66. 2022-02-27 17:05:02.306791 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] Ashish account call balance :SELECT balance FROM accounts WHERE id =7
  67. 2022-02-27 17:05:02.306791 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [IS_CHECK_DID] Query :SELECT * FROM dids WHERE number ="440540" AND (accountid = 0 OR status = 1) LIMIT 1
  68. 2022-02-27 17:05:02.306791 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_PACKAGE_INFO] Call Direction : inbound
  69. 2022-02-27 17:05:02.306791 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_PACKAGE_INFO] DID ACCOUNT ID : 7
  70. 2022-02-27 17:05:02.306791 98.77% [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 = '^440540.*' OR patterns = '^44054.*' OR patterns = '^4405.*' OR patterns = '^440.*' OR patterns = '^44.*' OR patterns = '^4.*' OR patterns ='--') AND accountid = 7 ORDER BY LENGTH(PKGPTR.patterns) DESC
  71. 2022-02-27 17:05:02.306791 98.77% [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 ="440540" AND A.accountid = '3' limit 1
  72. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] SPEED DIAL NUMBER : 440540
  73. 2022-02-27 17:05:02.306791 98.77% [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 FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="440540" LIMIT 1
  74. 2022-02-27 17:05:02.306791 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  75. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] New Call Direction : inbound
  76. 2022-02-27 17:05:02.306791 98.77% [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 = '440540' OR number = '44054' OR number = '4405' OR number = '440' OR number = '44' OR number = '4' OR number ='--') OR (number = '440540*' OR number = '44054*' OR number = '4405*' OR number = '440*' OR number = '44*' OR number = '4*' OR number ='--') OR (number = '9601606807' OR number = '960160680' OR number = '96016068' OR number = '9601606' OR number = '960160' OR number = '96016' OR number = '9601' OR number = '960' OR number = '96' OR number = '9' OR number ='--') OR (number = '9601606807*' OR number = '960160680*' OR number = '96016068*' OR number = '9601606*' OR number = '960160*' OR number = '96016*' OR number = '9601*' OR number = '960*' OR number = '96*' OR number = '9*' OR number ='--')) AND status=0 AND accountid = 0 order by LENGTH(number) DESC,lastchar DESC, modified_date DESC
  77. 2022-02-27 17:05:02.306791 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] Call Barring Status : -1
  78. 2022-02-27 17:05:02.306791 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_PRICELIST_ROUTING_INFO] Query :select id,routing_prefix,pricelist_id_admin from pricelists WHERE (routing_prefix = '440540' OR routing_prefix = '44054' OR routing_prefix = '4405' OR routing_prefix = '440' OR routing_prefix = '44' OR routing_prefix = '4' OR routing_prefix ='--') AND status = 0 and reseller_id = 0 limit 1
  79. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] =============== Account Information ===================
  80. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] User id : 3
  81. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Account code : 3673942894
  82. 2022-02-27 17:05:02.306791 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] Ashish account call balance :SELECT balance FROM accounts WHERE id =7
  83. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Balance : 22
  84. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Type : 0 [0:prepaid,1:postpaid]
  85. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Ratecard id : 1
  86. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] CID Pool : 0
  87. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] ========================================================
  88. 2022-02-27 17:05:02.306791 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_PRICELIST_INFO] Query :select * from pricelists WHERE id = 1 AND status = 0
  89. 2022-02-27 17:05:02.306791 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_RATES] call_direction :inbound
  90. 2022-02-27 17:05:02.306791 98.77% [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 FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="440540" LIMIT 1
  91. 2022-02-27 17:05:02.306791 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  92. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP]  Call Direction : inbound
  93. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Demand_Base_Routing]Going For Check Demand Base Routing
  94. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Demand_Base_Routing] OLD COST:0.00000
  95. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Demand_Base_Routing]pricelist_id:1
  96. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Demand_Base_Routing] Query :SELECT demand_based_condition,holiday from demand_based_routing where pricelist_id = '1' and status=0
  97. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Demand_Base_Routing] NEW COST:0.00000
  98. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] =============== Rates Information ===================
  99. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] ID : 1
  100. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Connectcost : 0.00000
  101. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Includedseconds : 0
  102. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Cost : 0.00000
  103. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Comment : 440540
  104. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Country Id : 88
  105. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Accid : 3
  106. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] ================================================================
  107. 2022-02-27 17:05:02.306791 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] Ashish account call balance :SELECT balance FROM accounts WHERE id =7
  108. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [FIND_MAXLENGTH] Your22 balance Accountid 3 !!!
  109. 2022-02-27 17:05:02.306791 98.77% [NOTICE] switch_cpp.cpp:1465 [ASTPP] [FIND_MAXLENGTH] Call Is Free - Assigning Max Length  :: 100
  110. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Call Max Length Duration : 100 minutes
  111. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [userinfo] INB_FREE:TRUE
  112. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [userinfo] free_inbound:1
  113. 2022-02-27 17:05:02.306791 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_OVERRIDE_CALLERID] Query :SELECT callerid_name as cid_name,callerid_number as cid_number,accountid FROM accounts_callerid WHERE accountid = 3 AND status=0 LIMIT 1
  114. 2022-02-27 17:05:02.306791 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [DOAUTHORIZATION] Query :SELECT * FROM accounts WHERE id = "7" AND deleted = 0 limit 1
  115. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [userinfo] Actual CustomerInfo XML:3
  116. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [userinfo] Userinfo XML:3
  117. 2022-02-27 17:05:02.306791 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [userinfo] Actual CustomerInfo XML : 3
  118. 2022-02-27 17:05:02.306791 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [get_domain_info] Query :SELECT * FROM domains WHERE accountid = 7 limit 1
  119. 2022-02-27 17:05:02.326795 98.77% [WARNING] switch_cpp.cpp:1465 [ASTPP] [user_domain] User Domain : w07version60.astppbilling.org
  120. 2022-02-27 17:05:02.326795 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [TIME_COND] Timecondition Id : 1
  121. 2022-02-27 17:05:02.326795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [Functions] [GET_TIME_CONDITION_QUERY] Query :SELECT * from time_condition WHERE id = '1' and status =0 LIMIT 1
  122. 2022-02-27 17:05:02.326795 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [TIME_COND] Failover Timecondition : [{"extensions":"#","no_answer_call_type":"12"}]
  123. span style="color: green; font-weight: bold;"> 2022-02-27 17:05:02.326795 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [TIME_COND] Timecondition : [{"hour":"00-23","minute":"00-59","wday":"1-2","mday":"1-31","mon":"1-12","year":"2022-2022","extensions":"12","no_answer_call_type":"11","priority":"1"}]
  124. 2022-02-27 17:05:02.326795 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [TIME_COND] Priority : 1
  125. 2022-02-27 17:05:02.326795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [Sipdevice Form Id] Query :SELECT username from sip_devices where id = "12" limit 1
  126. 2022-02-27 17:05:02.326795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [Functions] [GET_TIME_CONDITION_QUERY] Query :SELECT * from timezone WHERE id = '49' LIMIT 1
  127. 2022-02-27 17:05:02.326795 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [TIME_COND] Condition Str :  time-of-day= "00:00-23:59"  wday= "1-2"  mday= "1-31"  mon= "1-12"  year= "2022-2022"
  128. 2022-02-27 17:05:02.326795 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP]  Maxlength : 100
  129. 2022-02-27 17:05:02.326795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  130. 2022-02-27 17:05:02.326795 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [XML] Customer Recording Flag : 0
  131. 2022-02-27 17:05:02.326795 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [PBX] Call Direction : inbound
  132. 2022-02-27 17:05:02.326795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET get_record_info] Query :SELECT sip_device_routing.is_recording FROM sip_devices AS sip_devices, accounts AS accounts ,sip_device_routing AS sip_device_routing  WHERE sip_devices.accountid = accounts.id AND sip_devices.id = sip_device_routing.sip_device_id AND sip_devices.username = "1" AND accounts.status = 0
  133. 2022-02-27 17:05:02.326795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [get_domain_info] Query :SELECT * FROM domains WHERE accountid = 7 limit 1
  134. 2022-02-27 17:05:02.326795 98.77% [WARNING] switch_cpp.cpp:1465 [ASTPP] [XML] User Domain : w07version60.astppbilling.org
  135. 2022-02-27 17:05:02.326795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [get_accounts_info] Query :SELECT * FROM accounts WHERE id = 7  and status = 0 limit 1
  136. 2022-02-27 17:05:02.326795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [XML] Custom Function Name :: custom_inbound_11
  137. 2022-02-27 17:05:02.326795 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [TIME_COND] TimeCondition Id : 1
  138. 2022-02-27 17:05:02.326795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [Functions] [GET_TIME_CONDITION_QUERY] Query :SELECT * from time_condition WHERE id = '1' and status =0 LIMIT 1
  139. 2022-02-27 17:05:02.326795 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Generated XML:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  140. <document type="freeswitch/xml">
  141. <section name="dialplan" description="ASTPP Dialplan">
  142. <context name="default">
  143. <extension name="TimeCond" continue="true">
  144. <condition break="never">
  145. <action application="set" data="timezone=Europe/Sarajevo" inline="true"/>
  146. </condition>
  147. <condition  time-of-day= "00:00-23:59"  wday= "1-2"  mday= "1-31"  mon= "1-12"  year= "2022-2022"  break="never">
  148. <action application="set" data="office_status=open" inline="true"/>
  149. <action application="set" data="extensions=5607944748" inline="true"/>
  150. <action application="set" data="no_answer_did_number=440540" inline="true"/>
  151. <action application="set" data="no_answer_call_type=11" inline="true"/>
  152. </condition>
  153. </extension>
  154. <extension name="tod route, x440540">
  155. <condition field="destination_number" expression="^(\+?)?(440540)$">
  156. <action application="execute_extension" data="440540_${office_status}"/>
  157. </condition>
  158. </extension>
  159. <extension name="office is open">
  160. <condition field="destination_number" expression="^(\+?)?(440540_open)$">
  161. <action application="set" data="domain_name=w07version60.astppbilling.org"/>
  162. <action application="set" data="set_extensions=${extensions}"/>
  163. <action application="set" data="no_answer_flag=true"/>
  164. <action application="set" data="no_answer_did_number=440540" inline="true"/>
  165. <action application="set" data="no_answer_call_type=${no_answer_call_type}"/>
  166. <action application="set" data="no_answer_number=${extensions}" />
  167. <action application="transfer" data="7 XML default"/>
  168. </condition>
  169. </extension>
  170. <extension name="440540">
  171. <condition field="destination_number" expression="440540">
  172. <action application="set" data="effective_destination_number=440540"/>
  173. <action application="set" data="bridge_pre_execute_bleg_app=sched_hangup"/>
  174. <action application="set" data="bridge_pre_execute_bleg_data=+6000 normal_clearing"/>
  175. <action application="set" data="callstart=2022-02-27 17:05:02"/>
  176. <action application="set" data="hangup_after_bridge=true"/>
  177. <action application="set" data="continue_on_fail=TRUE"/>
  178. <action application="set" data="account_id=3"/>
  179. <action application="set" data="parent_id=0"/>
  180. <action application="set" data="entity_id=3"/>
  181. <action application="set" data="call_processed=internal"/>
  182. <action application="set" data="call_direction=inbound"/>
  183. <action application="set" data="accountname=Entdemo"/>
  184. <action application="set" data="origination_rates_did=ID:1|CODE:^440540.*|DESTINATION:440540|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|CT:11|COST:0.00000|INC:0|INITIALBLOCK:0|RATEGROUP:0|MARKUP:0|CI:88|ACCID:7"/>
  185. <action application="set" data="origination_rates=0"/>
  186. <action application="set" data="original_caller_id_name=9601606807"/>
  187. <action application="set" data="original_caller_id_number=9601606807"/>
  188. <action application="export" data="is_recording=1"/>
  189. <action application="export" data="media_bug_answer_req=true"/>
  190. <action application="export" data="RECORD_STEREO=true"/>
  191. <action application="export" data="record_sample_rate=8000"/>
  192. <action application="export" data="execute_on_answer=record_session $${recordings_dir}/${uuid}.wav"/>
  193. <action application="set" data="effective_caller_id_name=9601606807"/>
  194. <action application="set" data="effective_caller_id_number=9601606807"/>
  195. <action application="set" data="receiver_accid=7"/>
  196. <action application="export" data="domain_name=w07version60.astppbilling.org"/>
  197. <action application="export" data="sip_to_host=w07version60.astppbilling.org"/>
  198. <action application="export" data="presence_data=x|||Admin's cust-420(9632960407)|||||||||DID|||46.101.114.158"/>
  199. <action application="export" data="call_type=11"/>
  200. </condition>
  201. </extension>
  202. </context>
  203. </section>
  204. </document>
  205. Dialplan: sofia/default/9601606807@46.101.114.158 parsing [default->TimeCond] continue=true
  206. Dialplan: sofia/default/9601606807@46.101.114.158 Absolute Condition [TimeCond]
  207. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(timezone=Europe/Sarajevo) INLINE
  208. EXECUTE [depth=0] sofia/default/9601606807@46.101.114.158 set(timezone=Europe/Sarajevo)
  209. 2022-02-27 17:05:02.326795 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [timezone]=[Europe/Sarajevo]
  210. Dialplan: sofia/default/9601606807@46.101.114.158 Date/Time Match (PASS) [TimeCond] break=never
  211. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(office_status=open) INLINE
  212. EXECUTE [depth=0] sofia/default/9601606807@46.101.114.158 set(office_status=open)
  213. 2022-02-27 17:05:02.326795 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [office_status]=[open]
  214. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(extensions=5607944748) INLINE
  215. EXECUTE [depth=0] sofia/default/9601606807@46.101.114.158 set(extensions=5607944748)
  216. 2022-02-27 17:05:02.326795 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [extensions]=[5607944748]
  217. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(no_answer_did_number=440540) INLINE
  218. EXECUTE [depth=0] sofia/default/9601606807@46.101.114.158 set(no_answer_did_number=440540)
  219. 2022-02-27 17:05:02.326795 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [no_answer_did_number]=[440540]
  220. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(no_answer_call_type=11) INLINE
  221. EXECUTE [depth=0] sofia/default/9601606807@46.101.114.158 set(no_answer_call_type=11)
  222. 2022-02-27 17:05:02.326795 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [no_answer_call_type]=[11]
  223. Dialplan: sofia/default/9601606807@46.101.114.158 parsing [default->tod route, x440540] continue=false
  224. Dialplan: sofia/default/9601606807@46.101.114.158 Regex (PASS) [tod route, x440540] destination_number(440540) =~ /^(\+?)?(440540)$/ break=on-false
  225. Dialplan: sofia/default/9601606807@46.101.114.158 Action execute_extension(440540_${office_status})
  226. 2022-02-27 17:05:02.326795 98.77% [DEBUG] switch_core_state_machine.c:281 (sofia/default/9601606807@46.101.114.158) State Change CS_ROUTING -> CS_EXECUTE
  227. 2022-02-27 17:05:02.326795 98.77% [DEBUG] switch_core_state_machine.c:640 (sofia/default/9601606807@46.101.114.158) State ROUTING going to sleep
  228. 2022-02-27 17:05:02.326795 98.77% [CONSOLE] sofia_presence.c:1620 Event Thread Started
  229. 2022-02-27 17:05:02.326795 98.77% [DEBUG] switch_core_state_machine.c:581 (sofia/default/9601606807@46.101.114.158) Running State Change CS_EXECUTE (Cur 1 Tot 49)
  230. 2022-02-27 17:05:02.326795 98.77% [DEBUG] switch_core_state_machine.c:647 (sofia/default/9601606807@46.101.114.158) State EXECUTE
  231. 2022-02-27 17:05:02.326795 98.77% [DEBUG] mod_sofia.c:213 sofia/default/9601606807@46.101.114.158 SOFIA EXECUTE
  232. 2022-02-27 17:05:02.326795 98.77% [DEBUG] switch_core_state_machine.c:323 sofia/default/9601606807@46.101.114.158 Standard EXECUTE
  233. EXECUTE [depth=0] sofia/default/9601606807@46.101.114.158 execute_extension(440540_open)
  234. 2022-02-27 17:05:02.326795 98.77% [INFO] mod_dialplan_xml.c:639 Processing 9601606807 <9601606807>->440540_open in context default
  235. 2022-02-27 17:05:02.326795 98.77% [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')
  236. 2022-02-27 17:05:02.346797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  237. 2022-02-27 17:05:02.346797 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [feature_code_call_transfer] Blind Call Flag: 0
  238. 2022-02-27 17:05:02.346797 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Dialed number : 440540
  239. 2022-02-27 17:05:02.346797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [CHECK_FEATURE_CODE] Query :SELECT id,feature_action,feature_code from feature_code where feature_code = '440540' limit 1
  240. 2022-02-27 17:05:02.346797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [DOAUTHORIZATION] Query :SELECT access_number FROM accessnumber WHERE access_number = '440540' AND status=0 limit 1
  241. 2022-02-27 17:05:02.346797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [Functions] [Fifo Condition Check] Query :SELECT id,destination_number,agent_hold_file from pbx_queue WHERE destination_number = '440540' and status=0 LIMIT 1
  242. 2022-02-27 17:05:02.346797 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] SOURCE NUMBERgw+PK-Default-Gateway
  243. 2022-02-27 17:05:02.346797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  244. 2022-02-27 17:05:02.346797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [DOAUTHORIZATION LOCAL SOURCE] Query :SELECT domain,accountid FROM domains WHERE domain = '3.7.66.233' limit 1
  245. 2022-02-27 17:05:02.346797 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Caller Id name / number  : 9601606807 / 9601606807
  246. 2022-02-27 17:05:02.346797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] Interconnect code destination number
  247. 2022-02-27 17:05:02.346797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [get_interconnectcode_info] Query :SELECT * FROM interconnectcode WHERE interconnectcode = 440540 AND status=0 limit 1
  248. 2022-02-27 17:05:02.346797 98.77% [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 FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="440540" LIMIT 1
  249. 2022-02-27 17:05:02.346797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  250. 2022-02-27 17:05:02.346797 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Call direction : inbound
  251. 2022-02-27 17:05:02.346797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [IPAUTHENTICATION] Query :SELECT ip_map.*, (SELECT number FROM accounts where id=accountid AND status=0 AND deleted=0) AS account_code FROM ip_map WHERE INET_ATON("46.101.114.158") BETWEEN(INET_ATON(SUBSTRING_INDEX(`ip`, '/', 1)) & 0xffffffff ^((0x1 <<(32 -  SUBSTRING_INDEX(`ip`, '/', -1))) -1 )) AND(INET_ATON(SUBSTRING_INDEX(`ip`, '/', 1)) |((0x100000000 >> SUBSTRING_INDEX(`ip`,'/', -1)) -1))  AND "440540"  LIKE CONCAT(prefix,'%') ORDER BY LENGTH(prefix) DESC LIMIT 1
  252. 2022-02-27 17:05:02.346797 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Accountcode : 3673942894]
  253. 2022-02-27 17:05:02.346797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [DOAUTHORIZATION] Query :SELECT * FROM accounts WHERE number = "3673942894" AND deleted = 0 limit 1
  254. 2022-02-27 17:05:02.366794 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] Ashish account call balance :SELECT balance FROM accounts WHERE id =7
  255. 2022-02-27 17:05:02.366794 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [IS_CHECK_DID] Query :SELECT * FROM dids WHERE number ="440540" AND (accountid = 0 OR status = 1) LIMIT 1
  256. 2022-02-27 17:05:02.366794 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_PACKAGE_INFO] Call Direction : inbound
  257. 2022-02-27 17:05:02.366794 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_PACKAGE_INFO] DID ACCOUNT ID : 7
  258. 2022-02-27 17:05:02.366794 98.77% [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 = '^440540.*' OR patterns = '^44054.*' OR patterns = '^4405.*' OR patterns = '^440.*' OR patterns = '^44.*' OR patterns = '^4.*' OR patterns ='--') AND accountid = 7 ORDER BY LENGTH(PKGPTR.patterns) DESC
  259. 2022-02-27 17:05:02.366794 98.77% [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 ="440540" AND A.accountid = '3' limit 1
  260. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] SPEED DIAL NUMBER : 440540
  261. 2022-02-27 17:05:02.366794 98.77% [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 FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="440540" LIMIT 1
  262. 2022-02-27 17:05:02.366794 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  263. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] New Call Direction : inbound
  264. 2022-02-27 17:05:02.366794 98.77% [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 = '440540' OR number = '44054' OR number = '4405' OR number = '440' OR number = '44' OR number = '4' OR number ='--') OR (number = '440540*' OR number = '44054*' OR number = '4405*' OR number = '440*' OR number = '44*' OR number = '4*' OR number ='--') OR (number = '9601606807' OR number = '960160680' OR number = '96016068' OR number = '9601606' OR number = '960160' OR number = '96016' OR number = '9601' OR number = '960' OR number = '96' OR number = '9' OR number ='--') OR (number = '9601606807*' OR number = '960160680*' OR number = '96016068*' OR number = '9601606*' OR number = '960160*' OR number = '96016*' OR number = '9601*' OR number = '960*' OR number = '96*' OR number = '9*' OR number ='--')) AND status=0 AND accountid = 0 order by LENGTH(number) DESC,lastchar DESC, modified_date DESC
  265. 2022-02-27 17:05:02.366794 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] Call Barring Status : -1
  266. 2022-02-27 17:05:02.366794 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_PRICELIST_ROUTING_INFO] Query :select id,routing_prefix,pricelist_id_admin from pricelists WHERE (routing_prefix = '440540' OR routing_prefix = '44054' OR routing_prefix = '4405' OR routing_prefix = '440' OR routing_prefix = '44' OR routing_prefix = '4' OR routing_prefix ='--') AND status = 0 and reseller_id = 0 limit 1
  267. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] =============== Account Information ===================
  268. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] User id : 3
  269. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Account code : 3673942894
  270. 2022-02-27 17:05:02.366794 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] Ashish account call balance :SELECT balance FROM accounts WHERE id =7
  271. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Balance : 22
  272. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Type : 0 [0:prepaid,1:postpaid]
  273. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Ratecard id : 1
  274. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] CID Pool : 0
  275. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] ========================================================
  276. 2022-02-27 17:05:02.366794 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_PRICELIST_INFO] Query :select * from pricelists WHERE id = 1 AND status = 0
  277. 2022-02-27 17:05:02.366794 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_RATES] call_direction :inbound
  278. 2022-02-27 17:05:02.366794 98.77% [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 FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="440540" LIMIT 1
  279. 2022-02-27 17:05:02.366794 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  280. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP]  Call Direction : inbound
  281. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Demand_Base_Routing]Going For Check Demand Base Routing
  282. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Demand_Base_Routing] OLD COST:0.00000
  283. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Demand_Base_Routing]pricelist_id:1
  284. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Demand_Base_Routing] Query :SELECT demand_based_condition,holiday from demand_based_routing where pricelist_id = '1' and status=0
  285. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Demand_Base_Routing] NEW COST:0.00000
  286. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] =============== Rates Information ===================
  287. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] ID : 1
  288. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Connectcost : 0.00000
  289. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Includedseconds : 0
  290. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Cost : 0.00000
  291. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Comment : 440540
  292. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Country Id : 88
  293. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Accid : 3
  294. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] ================================================================
  295. 2022-02-27 17:05:02.366794 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] Ashish account call balance :SELECT balance FROM accounts WHERE id =7
  296. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [FIND_MAXLENGTH] Your22 balance Accountid 3 !!!
  297. 2022-02-27 17:05:02.366794 98.77% [NOTICE] switch_cpp.cpp:1465 [ASTPP] [FIND_MAXLENGTH] Call Is Free - Assigning Max Length  :: 100
  298. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] Call Max Length Duration : 100 minutes
  299. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [userinfo] INB_FREE:TRUE
  300. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [userinfo] free_inbound:1
  301. 2022-02-27 17:05:02.366794 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET_OVERRIDE_CALLERID] Query :SELECT callerid_name as cid_name,callerid_number as cid_number,accountid FROM accounts_callerid WHERE accountid = 3 AND status=0 LIMIT 1
  302. 2022-02-27 17:05:02.366794 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [DOAUTHORIZATION] Query :SELECT * FROM accounts WHERE id = "7" AND deleted = 0 limit 1
  303. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [userinfo] Actual CustomerInfo XML:3
  304. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [userinfo] Userinfo XML:3
  305. 2022-02-27 17:05:02.366794 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [userinfo] Actual CustomerInfo XML : 3
  306. 2022-02-27 17:05:02.366794 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [get_domain_info] Query :SELECT * FROM domains WHERE accountid = 7 limit 1
  307. 2022-02-27 17:05:02.386796 98.77% [WARNING] switch_cpp.cpp:1465 [ASTPP] [user_domain] User Domain : w07version60.astppbilling.org
  308. 2022-02-27 17:05:02.386796 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [TIME_COND] Timecondition Id : 1
  309. 2022-02-27 17:05:02.386796 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [Functions] [GET_TIME_CONDITION_QUERY] Query :SELECT * from time_condition WHERE id = '1' and status =0 LIMIT 1
  310. 2022-02-27 17:05:02.386796 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [TIME_COND] Failover Timecondition : [{"extensions":"#","no_answer_call_type":"12"}]
  311. span style="color: green; font-weight: bold;"> 2022-02-27 17:05:02.386796 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [TIME_COND] Timecondition : [{"hour":"00-23","minute":"00-59","wday":"1-2","mday":"1-31","mon":"1-12","year":"2022-2022","extensions":"12","no_answer_call_type":"11","priority":"1"}]
  312. 2022-02-27 17:05:02.386796 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [TIME_COND] Priority : 1
  313. 2022-02-27 17:05:02.386796 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [Sipdevice Form Id] Query :SELECT username from sip_devices where id = "12" limit 1
  314. 2022-02-27 17:05:02.386796 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [Functions] [GET_TIME_CONDITION_QUERY] Query :SELECT * from timezone WHERE id = '49' LIMIT 1
  315. 2022-02-27 17:05:02.386796 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [TIME_COND] Condition Str :  time-of-day= "00:00-23:59"  wday= "1-2"  mday= "1-31"  mon= "1-12"  year= "2022-2022"
  316. 2022-02-27 17:05:02.386796 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP]  Maxlength : 100
  317. 2022-02-27 17:05:02.386796 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  318. 2022-02-27 17:05:02.386796 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [XML] Customer Recording Flag : 0
  319. 2022-02-27 17:05:02.386796 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [PBX] Call Direction : inbound
  320. 2022-02-27 17:05:02.386796 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [GET get_record_info] Query :SELECT sip_device_routing.is_recording FROM sip_devices AS sip_devices, accounts AS accounts ,sip_device_routing AS sip_device_routing  WHERE sip_devices.accountid = accounts.id AND sip_devices.id = sip_device_routing.sip_device_id AND sip_devices.username = "1" AND accounts.status = 0
  321. 2022-02-27 17:05:02.386796 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [get_domain_info] Query :SELECT * FROM domains WHERE accountid = 7 limit 1
  322. 2022-02-27 17:05:02.386796 98.77% [WARNING] switch_cpp.cpp:1465 [ASTPP] [XML] User Domain : w07version60.astppbilling.org
  323. 2022-02-27 17:05:02.386796 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [get_accounts_info] Query :SELECT * FROM accounts WHERE id = 7  and status = 0 limit 1
  324. 2022-02-27 17:05:02.386796 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [XML] Custom Function Name :: custom_inbound_11
  325. 2022-02-27 17:05:02.386796 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [TIME_COND] TimeCondition Id : 1
  326. 2022-02-27 17:05:02.386796 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [Functions] [GET_TIME_CONDITION_QUERY] Query :SELECT * from time_condition WHERE id = '1' and status =0 LIMIT 1
  327. 2022-02-27 17:05:02.386796 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Generated XML:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  328. <document type="freeswitch/xml">
  329. <section name="dialplan" description="ASTPP Dialplan">
  330. <context name="default">
  331. <extension name="TimeCond" continue="true">
  332. <condition break="never">
  333. <action application="set" data="timezone=Europe/Sarajevo" inline="true"/>
  334. </condition>
  335. <condition  time-of-day= "00:00-23:59"  wday= "1-2"  mday= "1-31"  mon= "1-12"  year= "2022-2022"  break="never">
  336. <action application="set" data="office_status=open" inline="true"/>
  337. <action application="set" data="extensions=5607944748" inline="true"/>
  338. <action application="set" data="no_answer_did_number=440540" inline="true"/>
  339. <action application="set" data="no_answer_call_type=11" inline="true"/>
  340. </condition>
  341. </extension>
  342. <extension name="tod route, x440540">
  343. <condition field="destination_number" expression="^(\+?)?(440540)$">
  344. <action application="execute_extension" data="440540_${office_status}"/>
  345. </condition>
  346. </extension>
  347. <extension name="office is open">
  348. <condition field="destination_number" expression="^(\+?)?(440540_open)$">
  349. <action application="set" data="domain_name=w07version60.astppbilling.org"/>
  350. <action application="set" data="set_extensions=${extensions}"/>
  351. <action application="set" data="no_answer_flag=true"/>
  352. <action application="set" data="no_answer_did_number=440540" inline="true"/>
  353. <action application="set" data="no_answer_call_type=${no_answer_call_type}"/>
  354. <action application="set" data="no_answer_number=${extensions}" />
  355. <action application="transfer" data="7 XML default"/>
  356. </condition>
  357. </extension>
  358. <extension name="440540">
  359. <condition field="destination_number" expression="440540">
  360. <action application="set" data="effective_destination_number=440540"/>
  361. <action application="set" data="bridge_pre_execute_bleg_app=sched_hangup"/>
  362. <action application="set" data="bridge_pre_execute_bleg_data=+6000 normal_clearing"/>
  363. <action application="set" data="callstart=2022-02-27 17:05:02"/>
  364. <action application="set" data="hangup_after_bridge=true"/>
  365. <action application="set" data="continue_on_fail=TRUE"/>
  366. <action application="set" data="account_id=3"/>
  367. <action application="set" data="parent_id=0"/>
  368. <action application="set" data="entity_id=3"/>
  369. <action application="set" data="call_processed=internal"/>
  370. <action application="set" data="call_direction=inbound"/>
  371. <action application="set" data="accountname=Entdemo"/>
  372. <action application="set" data="origination_rates_did=ID:1|CODE:^440540.*|DESTINATION:440540|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|CT:11|COST:0.00000|INC:0|INITIALBLOCK:0|RATEGROUP:0|MARKUP:0|CI:88|ACCID:7"/>
  373. <action application="set" data="origination_rates=0"/>
  374. <action application="set" data="original_caller_id_name=9601606807"/>
  375. <action application="set" data="original_caller_id_number=9601606807"/>
  376. <action application="export" data="is_recording=1"/>
  377. <action application="export" data="media_bug_answer_req=true"/>
  378. <action application="export" data="RECORD_STEREO=true"/>
  379. <action application="export" data="record_sample_rate=8000"/>
  380. <action application="export" data="execute_on_answer=record_session $${recordings_dir}/${uuid}.wav"/>
  381. <action application="set" data="effective_caller_id_name=9601606807"/>
  382. <action application="set" data="effective_caller_id_number=9601606807"/>
  383. <action application="set" data="receiver_accid=7"/>
  384. <action application="export" data="domain_name=w07version60.astppbilling.org"/>
  385. <action application="export" data="sip_to_host=w07version60.astppbilling.org"/>
  386. <action application="export" data="presence_data=x|||Admin's cust-420(9632960407)|||||||||DID|||46.101.114.158"/>
  387. <action application="export" data="call_type=11"/>
  388. </condition>
  389. </extension>
  390. </context>
  391. </section>
  392. </document>
  393. Dialplan: sofia/default/9601606807@46.101.114.158 parsing [default->TimeCond] continue=true
  394. Dialplan: sofia/default/9601606807@46.101.114.158 Absolute Condition [TimeCond]
  395. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(timezone=Europe/Sarajevo) INLINE
  396. EXECUTE [depth=1] sofia/default/9601606807@46.101.114.158 set(timezone=Europe/Sarajevo)
  397. 2022-02-27 17:05:02.386796 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [timezone]=[Europe/Sarajevo]
  398. Dialplan: sofia/default/9601606807@46.101.114.158 Date/Time Match (PASS) [TimeCond] break=never
  399. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(office_status=open) INLINE
  400. EXECUTE [depth=1] sofia/default/9601606807@46.101.114.158 set(office_status=open)
  401. 2022-02-27 17:05:02.386796 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [office_status]=[open]
  402. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(extensions=5607944748) INLINE
  403. EXECUTE [depth=1] sofia/default/9601606807@46.101.114.158 set(extensions=5607944748)
  404. 2022-02-27 17:05:02.386796 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [extensions]=[5607944748]
  405. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(no_answer_did_number=440540) INLINE
  406. EXECUTE [depth=1] sofia/default/9601606807@46.101.114.158 set(no_answer_did_number=440540)
  407. 2022-02-27 17:05:02.386796 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [no_answer_did_number]=[440540]
  408. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(no_answer_call_type=11) INLINE
  409. EXECUTE [depth=1] sofia/default/9601606807@46.101.114.158 set(no_answer_call_type=11)
  410. 2022-02-27 17:05:02.386796 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [no_answer_call_type]=[11]
  411. Dialplan: sofia/default/9601606807@46.101.114.158 parsing [default->tod route, x440540] continue=false
  412. Dialplan: sofia/default/9601606807@46.101.114.158 Regex (FAIL) [tod route, x440540] destination_number(440540_open) =~ /^(\+?)?(440540)$/ break=on-false
  413. Dialplan: sofia/default/9601606807@46.101.114.158 parsing [default->office is open] continue=false
  414. Dialplan: sofia/default/9601606807@46.101.114.158 Regex (PASS) [office is open] destination_number(440540_open) =~ /^(\+?)?(440540_open)$/ break=on-false
  415. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(domain_name=w07version60.astppbilling.org)
  416. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(set_extensions=${extensions})
  417. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(no_answer_flag=true)
  418. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(no_answer_did_number=440540) INLINE
  419. EXECUTE [depth=1] sofia/default/9601606807@46.101.114.158 set(no_answer_did_number=440540)
  420. 2022-02-27 17:05:02.386796 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [no_answer_did_number]=[440540]
  421. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(no_answer_call_type=${no_answer_call_type})
  422. Dialplan: sofia/default/9601606807@46.101.114.158 Action set(no_answer_number=${extensions})
  423. Dialplan: sofia/default/9601606807@46.101.114.158 Action transfer(7 XML default)
  424. 2022-02-27 17:05:02.386796 98.77% [NOTICE] switch_core_session.c:3095 Execute [depth=1] set(domain_name=w07version60.astppbilling.org)
  425. EXECUTE [depth=1] sofia/default/9601606807@46.101.114.158 set(domain_name=w07version60.astppbilling.org)
  426. 2022-02-27 17:05:02.386796 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [domain_name]=[w07version60.astppbilling.org]
  427. 2022-02-27 17:05:02.386796 98.77% [NOTICE] switch_core_session.c:3095 Execute [depth=1] set(set_extensions=${extensions})
  428. EXECUTE [depth=1] sofia/default/9601606807@46.101.114.158 set(set_extensions=5607944748)
  429. 2022-02-27 17:05:02.386796 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [set_extensions]=[5607944748]
  430. 2022-02-27 17:05:02.386796 98.77% [NOTICE] switch_core_session.c:3095 Execute [depth=1] set(no_answer_flag=true)
  431. EXECUTE [depth=1] sofia/default/9601606807@46.101.114.158 set(no_answer_flag=true)
  432. 2022-02-27 17:05:02.386796 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [no_answer_flag]=[true]
  433. 2022-02-27 17:05:02.386796 98.77% [NOTICE] switch_core_session.c:3095 Execute [depth=1] set(no_answer_call_type=${no_answer_call_type})
  434. EXECUTE [depth=1] sofia/default/9601606807@46.101.114.158 set(no_answer_call_type=11)
  435. 2022-02-27 17:05:02.386796 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [no_answer_call_type]=[11]
  436. 2022-02-27 17:05:02.386796 98.77% [NOTICE] switch_core_session.c:3095 Execute [depth=1] set(no_answer_number=${extensions})
  437. EXECUTE [depth=1] sofia/default/9601606807@46.101.114.158 set(no_answer_number=5607944748)
  438. 2022-02-27 17:05:02.386796 98.77% [DEBUG] mod_dptools.c:1685 SET sofia/default/9601606807@46.101.114.158 [no_answer_number]=[5607944748]
  439. 2022-02-27 17:05:02.386796 98.77% [NOTICE] switch_core_session.c:3095 Execute [depth=1] transfer(7 XML default)
  440. EXECUTE [depth=1] sofia/default/9601606807@46.101.114.158 transfer(7 XML default)
  441. 2022-02-27 17:05:02.386796 98.77% [DEBUG] switch_ivr.c:2289 (sofia/default/9601606807@46.101.114.158) State Change CS_EXECUTE -> CS_ROUTING
  442. 2022-02-27 17:05:02.386796 98.77% [NOTICE] switch_ivr.c:2296 Transfer sofia/default/9601606807@46.101.114.158 to XML[7@default]
  443. 2022-02-27 17:05:02.386796 98.77% [DEBUG] switch_core_state_machine.c:647 (sofia/default/9601606807@46.101.114.158) State EXECUTE going to sleep
  444. 2022-02-27 17:05:02.386796 98.77% [DEBUG] switch_core_state_machine.c:581 (sofia/default/9601606807@46.101.114.158) Running State Change CS_ROUTING (Cur 1 Tot 49)
  445. 2022-02-27 17:05:02.386796 98.77% [DEBUG] switch_core_state_machine.c:640 (sofia/default/9601606807@46.101.114.158) State ROUTING
  446. 2022-02-27 17:05:02.386796 98.77% [DEBUG] mod_sofia.c:149 Call appears to be already acknowledged
  447. 2022-02-27 17:05:02.386796 98.77% [DEBUG] mod_sofia.c:158 sofia/default/9601606807@46.101.114.158 SOFIA ROUTING
  448. 2022-02-27 17:05:02.386796 98.77% [DEBUG] switch_core_state_machine.c:230 sofia/default/9601606807@46.101.114.158 Standard ROUTING
  449. 2022-02-27 17:05:02.386796 98.77% [INFO] mod_dialplan_xml.c:639 Processing 9601606807 <9601606807>->7 in context default
  450. 2022-02-27 17:05:02.386796 98.77% [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')
  451. 2022-02-27 17:05:02.406796 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  452. 2022-02-27 17:05:02.406796 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [feature_code_call_transfer] Blind Call Flag: 0
  453. 2022-02-27 17:05:02.406796 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Dialed number : 7
  454. 2022-02-27 17:05:02.406796 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [CHECK_FEATURE_CODE] Query :SELECT id,feature_action,feature_code from feature_code where feature_code = '7' limit 1
  455. 2022-02-27 17:05:02.426797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [DOAUTHORIZATION] Query :SELECT access_number FROM accessnumber WHERE access_number = '7' AND status=0 limit 1
  456. 2022-02-27 17:05:02.426797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [Functions] [Fifo Condition Check] Query :SELECT id,destination_number,agent_hold_file from pbx_queue WHERE destination_number = '7' and status=0 LIMIT 1
  457. 2022-02-27 17:05:02.426797 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] SOURCE NUMBERgw+PK-Default-Gateway
  458. 2022-02-27 17:05:02.426797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  459. 2022-02-27 17:05:02.426797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [DOAUTHORIZATION LOCAL SOURCE] Query :SELECT domain,accountid FROM domains WHERE domain = '3.7.66.233' limit 1
  460. 2022-02-27 17:05:02.426797 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Caller Id name / number  : 9601606807 / 9601606807
  461. 2022-02-27 17:05:02.426797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] Interconnect code destination number
  462. 2022-02-27 17:05:02.426797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [get_interconnectcode_info] Query :SELECT * FROM interconnectcode WHERE interconnectcode = 7 AND status=0 limit 1
  463. 2022-02-27 17:05:02.426797 98.77% [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 FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="7" LIMIT 1
  464. 2022-02-27 17:05:02.426797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  465. 2022-02-27 17:05:02.426797 98.77% [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="7"  AND domains.domain="3.7.66.233" limit 1
  466. 2022-02-27 17:05:02.426797 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Dialplan] Call direction : outbound
  467. 2022-02-27 17:05:02.426797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [IPAUTHENTICATION] Query :SELECT ip_map.*, (SELECT number FROM accounts where id=accountid AND status=0 AND deleted=0) AS account_code FROM ip_map WHERE INET_ATON("46.101.114.158") BETWEEN(INET_ATON(SUBSTRING_INDEX(`ip`, '/', 1)) & 0xffffffff ^((0x1 <<(32 -  SUBSTRING_INDEX(`ip`, '/', -1))) -1 )) AND(INET_ATON(SUBSTRING_INDEX(`ip`, '/', 1)) |((0x100000000 >> SUBSTRING_INDEX(`ip`,'/', -1)) -1))  AND "7"  LIKE CONCAT(prefix,'%') ORDER BY LENGTH(prefix) DESC LIMIT 1
  468. 2022-02-27 17:05:02.426797 98.77% [INFO] switch_cpp.cpp:1465 [ASTPP] [Accountcode : 3673942894]
  469. 2022-02-27 17:05:02.426797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [DOAUTHORIZATION] Query :SELECT * FROM accounts WHERE number = "3673942894" AND deleted = 0 limit 1
  470. 2022-02-27 17:05:02.426797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [CHECK_BLOCKED_PREFIX] Query :SELECT * FROM block_patterns WHERE (blocked_patterns = '^7.*' OR blocked_patterns ='--') AND accountid = 3 limit 1
  471. 2022-02-27 17:05:02.426797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [IS_CHECK_DID] Query :SELECT * FROM dids WHERE number ="7" AND (accountid = 0 OR status = 1) LIMIT 1
  472. 2022-02-27 17:05:02.426797 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] ringgroup_no_answer_forward _ no_answer_did_number :440540
  473. 2022-02-27 17:05:02.426797 98.77% [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 FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="440540" LIMIT 1
  474. 2022-02-27 17:05:02.446821 98.77% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
  475. 2022-02-27 17:05:02.446821 98.77% [ERR] mod_lua.cpp:202 .../share/freeswitch/scripts/astpp/lib/addons/astpp.pbx.lua:1696: attempt to concatenate field 'accountid' (a nil value)
  476. stack traceback:
  477.         .../share/freeswitch/scripts/astpp/lib/addons/astpp.pbx.lua:1696: in function 'ringgroup_no_answer_forward'
  478.         ...hare/freeswitch/scripts/astpp/scripts/astpp.dialplan.lua:323: in main chunk
  479.         [C]: in function 'dofile'
  480.         /usr/share/freeswitch/scripts/astpp/astpp.lua:94: in main chunk
  481. 2022-02-27 17:05:02.446821 98.77% [ERR] mod_lua.cpp:270 LUA script parse/execute error!
  482. 2022-02-27 17:05:02.446821 98.77% [WARNING] mod_dialplan_xml.c:669 Context default not found
  483. 2022-02-27 17:05:02.446821 98.77% [INFO] switch_core_state_machine.c:306 No Route, Aborting
  484. 2022-02-27 17:05:02.446821 98.77% [NOTICE] switch_core_state_machine.c:307 Hangup sofia/default/9601606807@46.101.114.158 [CS_ROUTING] [NO_ROUTE_DESTINATION]
  485. 2022-02-27 17:05:02.446821 98.77% [DEBUG] switch_core_state_machine.c:640 (sofia/default/9601606807@46.101.114.158) State ROUTING going to sleep
  486. 2022-02-27 17:05:02.446821 98.77% [DEBUG] switch_core_state_machine.c:581 (sofia/default/9601606807@46.101.114.158) Running State Change CS_HANGUP (Cur 1 Tot 49)
  487. 2022-02-27 17:05:02.446821 98.77% [DEBUG] switch_core_state_machine.c:844 (sofia/default/9601606807@46.101.114.158) Callstate Change RINGING -> HANGUP
  488. 2022-02-27 17:05:02.446821 98.77% [DEBUG] switch_core_state_machine.c:846 (sofia/default/9601606807@46.101.114.158) State HANGUP
  489. 2022-02-27 17:05:02.446821 98.77% [DEBUG] mod_sofia.c:468 Channel sofia/default/9601606807@46.101.114.158 hanging up, cause: NO_ROUTE_DESTINATION
  490. 2022-02-27 17:05:02.446821 98.77% [DEBUG] mod_sofia.c:613 Responding to INVITE with: 404
  491. 2022-02-27 17:05:02.446821 98.77% [DEBUG] switch_core_state_machine.c:59 sofia/default/9601606807@46.101.114.158 Standard HANGUP, cause: NO_ROUTE_DESTINATION
  492. 2022-02-27 17:05:02.446821 98.77% [DEBUG] switch_core_state_machine.c:846 (sofia/default/9601606807@46.101.114.158) State HANGUP going to sleep
  493. 2022-02-27 17:05:02.446821 98.77% [DEBUG] switch_core_state_machine.c:616 (sofia/default/9601606807@46.101.114.158) State Change CS_HANGUP -> CS_REPORTING
  494. 2022-02-27 17:05:02.446821 98.77% [DEBUG] switch_core_state_machine.c:581 (sofia/default/9601606807@46.101.114.158) Running State Change CS_REPORTING (Cur 1 Tot 49)
  495. 2022-02-27 17:05:02.446821 98.77% [DEBUG] switch_core_state_machine.c:932 (sofia/default/9601606807@46.101.114.158) State REPORTING
  496. 2022-02-27 17:05:02.446821 98.77% [INFO] mod_json_cdr.c:271 Process [c304a027-1897-4671-8a16-992f86aa2960.cdr.json]
  497. 2022-02-27 17:05:02.486814 98.77% [DEBUG] switch_core_state_machine.c:168 sofia/default/9601606807@46.101.114.158 Standard REPORTING, cause: NO_ROUTE_DESTINATION
  498. 2022-02-27 17:05:02.486814 98.77% [DEBUG] switch_core_state_machine.c:932 (sofia/default/9601606807@46.101.114.158) State REPORTING going to sleep
  499. 2022-02-27 17:05:02.486814 98.77% [DEBUG] switch_core_state_machine.c:607 (sofia/default/9601606807@46.101.114.158) State Change CS_REPORTING -> CS_DESTROY
  500. 2022-02-27 17:05:02.486814 98.77% [DEBUG] switch_core_session.c:1753 Session 49 (sofia/default/9601606807@46.101.114.158) Locked, Waiting on external entities
  501. 2022-02-27 17:05:02.486814 98.77% [NOTICE] switch_core_session.c:1771 Session 49 (sofia/default/9601606807@46.101.114.158) Ended
  502. 2022-02-27 17:05:02.486814 98.77% [NOTICE] switch_core_session.c:1775 Close Channel sofia/default/9601606807@46.101.114.158 [CS_DESTROY]
  503. 2022-02-27 17:05:02.486814 98.77% [DEBUG] switch_core_state_machine.c:735 (sofia/default/9601606807@46.101.114.158) Running State Change CS_DESTROY (Cur 0 Tot 49)
  504. 2022-02-27 17:05:02.486814 98.77% [DEBUG] switch_core_state_machine.c:745 (sofia/default/9601606807@46.101.114.158) State DESTROY
  505. 2022-02-27 17:05:02.486814 98.77% [DEBUG] mod_sofia.c:379 sofia/default/9601606807@46.101.114.158 SOFIA DESTROY
  506. 2022-02-27 17:05:02.486814 98.77% [DEBUG] switch_core_state_machine.c:175 sofia/default/9601606807@46.101.114.158 Standard DESTROY
  507. 2022-02-27 17:05:02.486814 98.77% [DEBUG] switch_core_state_machine.c:745 (sofia/default/9601606807@46.101.114.158) State DESTROY going to sleep
  508. freeswitch@ip-172-31-14-218>
  509. freeswitch@ip-172-31-14-218>
  510.