2019-10-31 23:01:13.443249 [NOTICE] switch_core_state_machine.c:690 Hangup sofia/default/
9010111...@192.95.6.96 [CS_NEW] [WRONG_CALL_STATE]
2019-10-31 23:01:13.443249 [DEBUG] switch_core_state_machine.c:584 (sofia/default/
9010111...@192.95.6.96) Running State Change CS_HANGUP (Cur 1 Tot 29)
2019-10-31 23:01:13.443249 [DEBUG] switch_core_state_machine.c:850 (sofia/default/
9010111...@192.95.6.96) Callstate Change DOWN -> HANGUP
2019-10-31 23:01:13.443249 [DEBUG] switch_core_state_machine.c:852 (sofia/default/
9010111...@192.95.6.96) State HANGUP
2019-10-31 23:01:13.443249 [DEBUG] mod_sofia.c:438 Channel sofia/default/
9010111...@192.95.6.96 hanging up, cause: WRONG_CALL_STATE
2019-10-31 23:01:13.443249 [DEBUG] switch_core_state_machine.c:60 sofia/default/
9010111...@192.95.6.96 Standard HANGUP, cause: WRONG_CALL_STATE
2019-10-31 23:01:13.443249 [DEBUG] switch_core_state_machine.c:852 (sofia/default/
9010111...@192.95.6.96) State HANGUP going to sleep
2019-10-31 23:01:13.443249 [DEBUG] switch_core_state_machine.c:619 (sofia/default/
9010111...@192.95.6.96) State Change CS_HANGUP -> CS_REPORTING
2019-10-31 23:01:13.443249 [DEBUG] switch_core_state_machine.c:584 (sofia/default/
9010111...@192.95.6.96) Running State Change CS_REPORTING (Cur 1 Tot 29)
2019-10-31 23:01:13.443249 [DEBUG] switch_core_state_machine.c:938 (sofia/default/
9010111...@192.95.6.96) State REPORTING
2019-10-31 23:01:13.443249 [DEBUG] switch_core_state_machine.c:174 sofia/default/
9010111...@192.95.6.96 Standard REPORTING, cause: WRONG_CALL_STATE
2019-10-31 23:01:13.443249 [DEBUG] switch_core_state_machine.c:938 (sofia/default/
9010111...@192.95.6.96) State REPORTING going to sleep
2019-10-31 23:01:13.443249 [DEBUG] switch_core_state_machine.c:610 (sofia/default/
9010111...@192.95.6.96) State Change CS_REPORTING -> CS_DESTROY
2019-10-31 23:01:13.443249 [DEBUG] switch_core_session.c:1665 Session 29 (sofia/default/
9010111...@192.95.6.96) Locked, Waiting on external entities
2019-10-31 23:01:13.443249 [NOTICE] switch_core_session.c:1683 Session 29 (sofia/default/
9010111...@192.95.6.96) Ended
2019-10-31 23:01:13.443249 [NOTICE] switch_core_session.c:1687 Close Channel sofia/default/
9010111...@192.95.6.96 [CS_DESTROY]
2019-10-31 23:01:13.443249 [DEBUG] switch_core_state_machine.c:741 (sofia/default/
9010111...@192.95.6.96) Running State Change CS_DESTROY (Cur 0 Tot 29)
2019-10-31 23:01:13.443249 [DEBUG] switch_core_state_machine.c:751 (sofia/default/
9010111...@192.95.6.96) State DESTROY
2019-10-31 23:01:13.443249 [DEBUG] switch_core_state_machine.c:181 sofia/default/
9010111...@192.95.6.96 Standard DESTROY
2019-10-31 23:01:13.443249 [DEBUG] switch_core_state_machine.c:751 (sofia/default/
9010111...@192.95.6.96) State DESTROY going to sleep
2019-10-31 23:01:19.703255 [NOTICE] switch_channel.c:1104 New Channel sofia/default/
46799...@192.95.6.96 [59d3ce58-fc32-11e9-9f1d-af7a00d51150]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_state_machine.c:584 (sofia/default/
46799...@192.95.6.96) Running State Change CS_NEW (Cur 1 Tot 30)
2019-10-31 23:01:19.703255 [DEBUG] sofia.c:9989 IP 47.11.118.29 Approved by acl "default[]". Access Granted.
2019-10-31 23:01:19.703255 [DEBUG] sofia.c:11168 Setting NAT mode based on via received
2019-10-31 23:01:19.703255 [DEBUG] sofia.c:7084 Channel sofia/default/
46799...@192.95.6.96 entering state [received][100]
2019-10-31 23:01:19.703255 [DEBUG] sofia.c:7094 Remote SDP:
v=0
o=- 7 2 IN IP4 192.168.43.167
s=CounterPath eyeBeam 1.5
c=IN IP4 192.168.43.167
t=0 0
m=audio 37432 RTP/AVP 100 106 0 97 105 8 18 3 101
a=rtpmap:100 SPEEX/16000
a=rtpmap:106 SPEEX-FEC/16000
a=rtpmap:97 SPEEX/8000
a=rtpmap:105 SPEEX-FEC/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=alt:1 1 : wr44IctX l+lZqBzd 192.168.43.167 37432
a=x-rtp-session-id:3C5C4879A1844A3883BEA682A38BD7D2
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [SPEEX:100:16000:20:0:1]/[PCMA:8:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [SPEEX:100:16000:20:0:1]/[PCMU:0:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [SPEEX-FEC:106:16000:20:0:1]/[PCMA:8:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [SPEEX-FEC:106:16000:20:0:1]/[PCMU:0:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4504 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [SPEEX:97:8000:20:0:1]/[PCMA:8:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [SPEEX:97:8000:20:0:1]/[PCMU:0:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [SPEEX-FEC:105:8000:20:0:1]/[PCMA:8:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [SPEEX-FEC:105:8000:20:0:1]/[PCMU:0:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4504 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G729:18:8000:20:8000:1]/[PCMA:8:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G729:18:8000:20:8000:1]/[PCMU:0:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [GSM:3:8000:20:13200:1]/[PCMA:8:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [GSM:3:8000:20:13200:1]/[PCMU:0:8000:20:64000:1]
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4365 Set telephone-event payload to 101@8000
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:3061 Set Codec sofia/default/
46799...@192.95.6.96 PCMU/8000 20 ms 160 samples 64000 bits 1 channels
2019-10-31 23:01:19.703255 [DEBUG] switch_core_codec.c:111 sofia/default/
46799...@192.95.6.96 Original read codec set to PCMU:0
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4708 Set telephone-event payload to 101@8000
2019-10-31 23:01:19.703255 [DEBUG] switch_core_media.c:4767 sofia/default/
46799...@192.95.6.96 Set 2833 dtmf send payload to 101 recv payload to 101
2019-10-31 23:01:19.703255 [DEBUG] sofia.c:7507 (sofia/default/
46799...@192.95.6.96) State Change CS_NEW -> CS_INIT
2019-10-31 23:01:19.703255 [DEBUG] switch_core_state_machine.c:603 (sofia/default/
46799...@192.95.6.96) State NEW
2019-10-31 23:01:19.703255 [DEBUG] switch_core_state_machine.c:584 (sofia/default/
46799...@192.95.6.96) Running State Change CS_INIT (Cur 1 Tot 30)
2019-10-31 23:01:19.703255 [DEBUG] switch_core_state_machine.c:627 (sofia/default/
46799...@192.95.6.96) State INIT
2019-10-31 23:01:19.703255 [DEBUG] switch_core_state_machine.c:40 sofia/default/
46799...@192.95.6.96 Standard INIT
2019-10-31 23:01:19.703255 [DEBUG] switch_core_state_machine.c:48 (sofia/default/
46799...@192.95.6.96) State Change CS_INIT -> CS_ROUTING
2019-10-31 23:01:19.703255 [DEBUG] switch_core_state_machine.c:627 (sofia/default/
46799...@192.95.6.96) State INIT going to sleep
2019-10-31 23:01:19.703255 [DEBUG] switch_core_state_machine.c:584 (sofia/default/
46799...@192.95.6.96) Running State Change CS_ROUTING (Cur 1 Tot 30)
2019-10-31 23:01:19.703255 [DEBUG] switch_channel.c:2249 (sofia/default/
46799...@192.95.6.96) Callstate Change DOWN -> RINGING
2019-10-31 23:01:19.703255 [DEBUG] switch_core_state_machine.c:643 (sofia/default/
46799...@192.95.6.96) State ROUTING
2019-10-31 23:01:19.703255 [DEBUG] switch_core_state_machine.c:236 sofia/default/
46799...@192.95.6.96 Standard ROUTING
2019-10-31 23:01:19.703255 [INFO] mod_dialplan_xml.c:637 Processing 4679949129 <4679949129>->
13239899290 in context default
2019-10-31 23:01:19.703255 [DEBUG] freeswitch_lua.cpp:365 DBH handle 0x7ff0d42008e0 Connected.
2019-10-31 23:01:19.703255 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [LOAD_CONF] Query :SELECT name,value FROM `system` WHERE group_title IN ('global','opensips','callingcard','calls','InternationalPrefixes')
2019-10-31 23:01:19.703255 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [LOAD_ADDON_CONF] Query :SELECT package_name FROM addons
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] [Dialplan] Dialed number :
132398992902019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [DOAUTHORIZATION] Query :SELECT access_number FROM accessnumber WHERE access_number = '
13239899290' AND status=0 limit 1
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] [Dialplan] Caller Id name / number : 4679949129 / 4679949129
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [CHECK_DID] Query :SELECT A.id as id,A.number as did_number,B.id as accountid,B.number as account_code,A.number as did_number,A.connectcost,A.includedseconds,A.cost,A.inc,A.extensions,A.maxchannels,A.call_type,A.city,A.province,A.init_inc,A.leg_timeout,A.status,A.country_id,A.call_type_vm_flag FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="
13239899290" LIMIT 1
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [CHECK_LOCAL_CALL] Query :SELECT sip_devices.username as username,accounts.number as accountcode,sip_devices.accountid as accountid,accounts.did_cid_translation as did_cid_translation FROM sip_devices as sip_devices,accounts as accounts WHERE accounts.status=0 AND accounts.deleted=0 AND
accounts.id=sip_devices.accountid AND sip_devices.username="
13239899290" limit 1
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] [Dialplan] Call direction : outbound
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [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("47.11.118.29") 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 "13239899290" LIKE CONCAT(prefix,'%') ORDER BY LENGTH(prefix) DESC LIMIT 1
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] [Accountcode : 4679949129]
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [DOAUTHORIZATION] Query :SELECT * FROM accounts WHERE number = "4679949129" AND deleted = 0 limit 1
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [CHECK_BLOCKED_PREFIX] Query :SELECT * FROM block_patterns WHERE (blocked_patterns = '^
13239899290.*' OR blocked_patterns = '^1323989929.*' OR blocked_patterns = '^132398992.*' OR blocked_patterns = '^13239899.*' OR blocked_patterns = '^1323989.*' OR blocked_patterns = '^132398.*' OR blocked_patterns = '^13239.*' OR blocked_patterns = '^1323.*' OR blocked_patterns = '^132.*' OR blocked_patterns = '^13.*' OR blocked_patterns = '^1.*' OR blocked_patterns ='--') AND accountid = 13 limit 1
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [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 ="
13239899290" AND A.accountid = '13' limit 1
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] [Dialplan] SPEED DIAL NUMBER :
132398992902019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [CHECK_DID] Query :SELECT A.id as id,A.number as did_number,B.id as accountid,B.number as account_code,A.number as did_number,A.connectcost,A.includedseconds,A.cost,A.inc,A.extensions,A.maxchannels,A.call_type,A.city,A.province,A.init_inc,A.leg_timeout,A.status,A.country_id,A.call_type_vm_flag FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number ="
13239899290" LIMIT 1
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [CHECK_LOCAL_CALL] Query :SELECT sip_devices.username as username,accounts.number as accountcode,sip_devices.accountid as accountid,accounts.did_cid_translation as did_cid_translation FROM sip_devices as sip_devices,accounts as accounts WHERE accounts.status=0 AND accounts.deleted=0 AND
accounts.id=sip_devices.accountid AND sip_devices.username="
13239899290" limit 1
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] [Dialplan] New Call direction : outbound
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [IS_CHECK_DID] Query :SELECT * FROM dids WHERE number ="
13239899290" AND (accountid = 0 OR status = 1) LIMIT 1
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [GET_PACKAGE_INFO] Query :SELECT *,P.id as package_id,P.product_id as product_id FROM packages_view as P inner join package_patterns as PKGPTR on P.product_id = PKGPTR.product_id WHERE (patterns = '^
13239899290.*' OR patterns = '^1323989929.*' OR patterns = '^132398992.*' OR patterns = '^13239899.*' OR patterns = '^1323989.*' OR patterns = '^132398.*' OR patterns = '^13239.*' OR patterns = '^1323.*' OR patterns = '^132.*' OR patterns = '^13.*' OR patterns = '^1.*' OR patterns ='--') AND accountid = 13 ORDER BY LENGTH(PKGPTR.patterns) DESC
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] =============== Account Information ===================
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] User id : 13
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Account code : 4679949129
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Balance : 5
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Type : 0 [0:prepaid,1:postpaid]
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Ratecard id : 5
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] ========================================================
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [GET_PRICELIST_INFO] Query :select * from pricelists WHERE id = 5 AND status = 0
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [GET_RATES] call_direction :outbound
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [GET_RATES] Query :SELECT * FROM routes WHERE (pattern = '^
13239899290.*' OR pattern = '^1323989929.*' OR pattern = '^132398992.*' OR pattern = '^13239899.*' OR pattern = '^1323989.*' OR pattern = '^132398.*' OR pattern = '^13239.*' OR pattern = '^1323.*' OR pattern = '^132.*' OR pattern = '^13.*' OR pattern = '^1.*' OR pattern ='--') AND status = 0 AND (pricelist_id = 5 OR accountid=13) ORDER BY accountid DESC,LENGTH(pattern) DESC,cost DESC LIMIT 1
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] call_direction:::::: outbound
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] =============== Rates Information ===================
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] ID : 7
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Connectcost : 0.00000
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Includedseconds : 0
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Cost : 0.00500
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] comment : usa
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Country Id : 203
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Accid : 13
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Trunk ID: 3
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Routing type:
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] ================================================================
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] [FIND_MAXLENGTH] Your5 balance Accountid 13 !!!
2019-10-31 23:01:19.723239 [NOTICE] switch_cpp.cpp:1365 [ASTPP] [FIND_MAXLENGTH] Limiting call to config max length 100 mins!
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] NIBBLE ID 13
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] NIBBLE RATE 0.00500
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] NIBBLE CONNECT COST 0.00000
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] NIBBLE INITIAL INC 6
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] NIBBLE INC 6
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Call Max length duration : 100 minutes
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] [DIALPLAN] User Rate ID : 7
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [GET_CARRIER_RATES] Query :SELECT TK.id as trunk_id,TK.name as trunk_name,TK.codec,GW.name as path,GW.dialplan_variable,TK.provider_id,TR.init_inc,TK.status,TK.maxchannels,TK.cps,TK.leg_timeout,TR.pattern,TR.id as outbound_route_id,TR.connectcost,TR.comment,TR.includedseconds,TR.cost,TR.inc,TR.prepend,TR.strip,(select name from gateways where status=0 AND id = TK.failover_gateway_id) as path1,(select name from gateways where status=0 AND id = TK.failover_gateway_id1) as path2 FROM outbound_routes as TR,trunks as TK,gateways as GW WHERE GW.status=0 AND GW.id= TK.gateway_id AND TK.status=0 AND TK.id= TR.trunk_id AND (pattern = '^13239899290.*' OR pattern = '^1323989929.*' OR pattern = '^132398992.*' OR pattern = '^13239899.*' OR pattern = '^1323989.*' OR pattern = '^132398.*' OR pattern = '^13239.*' OR pattern = '^1323.*' OR pattern = '^132.*' OR pattern = '^13.*' OR pattern = '^1.*' OR pattern ='--') AND TR.status = 0 AND TR.trunk_id IN (3) ORDER by LENGTH (pattern) DESC,TR.cost ASC,TR.precedence ASC, TK.precedence
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] =============== Termination Rates Information ===================
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] ID : 2
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Code : ^1.*
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Destination : USA and Canada
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Connectcost : 0.00000
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Free Seconds : 0
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Prefix : ^1.*
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Strip :
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Prepend :
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Carrier id : 3
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] carrier_name : VOS224
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] dialplan_variable :
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Failover gateway : VOS224
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Vendor id : 3
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Max channels : 500
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] Trunk Name : VOS224
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] ========================END OF TERMINATION RATES=======================
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [GET_OVERRIDE_CALLERID] Query :SELECT callerid_name as cid_name,callerid_number as cid_number,accountid FROM accounts_callerid WHERE accountid = 13 AND status=0 LIMIT 1
2019-10-31 23:01:19.723239 [INFO] switch_cpp.cpp:1365 [ASTPP] maxlength::::::::: 100
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [GET_PRICELIST_INFO] Query :select * from pricelists WHERE id = 5 AND status = 0
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [GET_LOCALIZATION] Query :SELECT id,out_caller_id_terminate,number_terminate FROM localization WHERE id=(SELECT localization_id from accounts where id = 3) AND status=0 limit 1
2019-10-31 23:01:19.723239 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [Dialplan] Generated XML:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="dialplan" description="ASTPP Dialplan">
<context name="default">
<condition field="destination_number" expression="
13239899290">
<action application="set" data="effective_destination_number=
13239899290"/>
<action application="set" data="bridge_pre_execute_bleg_app=sched_hangup"/>
<action application="set" data="bridge_pre_execute_bleg_data=+6000 normal_clearing"/>
<action application="set" data="nibble_account=13"/>
<action application="set" data="nibble_rate=0.00500"/>
<action application="set" data="nibble_init_inc=6"/>
<action application="set" data="nibble_inc=6"/>
<action application="set" data="nibble_connectcost=0.00000"/>
<action application="nibblebill" data="heartbeat 30"/>
<action application="set" data="callstart=2019-10-31 23:01:19"/>
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="continue_on_fail=TRUE"/>
<action application="set" data="account_id=13"/>
<action application="set" data="parent_id=0"/>
<action application="set" data="entity_id=0"/>
<action application="set" data="call_processed=internal"/>
<action application="set" data="call_direction=outbound"/>
<action application="set" data="accountname=current"/>
<action application="set" data="origination_rates=ID:7|CODE:^1.*|DESTINATION:usa|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|CT:|COST:0.00500|INC:6|INITIALBLOCK:6|RATEGROUP:5|MARKUP:0|CI:203|ACCID:13"/>
<action application="set" data="original_caller_id_name=austin"/>
<action application="set" data="original_caller_id_number=
18002003001"/>
<action application="limit" data="db 4679949129 user_4679949129 50 !SWITCH_CONGESTION"/>
<action application="limit" data="hash CPS_4679949129 CPS_user_4679949129 10/1 !SWITCH_CONGESTION"/>
<action application="set" data="calltype=STANDARD"/>
<action application="set" data="termination_rates=ID:2|CODE:^1.*|DESTINATION:USA and Canada|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|COST:0.00500|INC:6|INITIALBLOCK:6|TRUNK:3|PROVIDER:3"/>
<action application="set" data="trunk_id=3"/>
<action application="set" data="provider_id=3"/>
<action application="set" data="rate_flag=0"/>
<action application="set" data="force_trunk_flag=7"/>
<action application="export" data="presence_data=trunk_id=3"/>
<action application="set" data="intcall=0"/>
<action application="export" data="presence_data=x|||Bitan(4679949129)|||^1.* // usa // 0.00500 // trunk_id=3|||VOS224 // ^1.* // USA and Canada // 0.00500 // trunk_id=3|||STD"/>
<action application="limit" data="hash CPS_3 CPS_trunk_3 250/1 !SWITCH_CONGESTION"/>
<action application="limit_execute" data="db VOS224 gw_VOS224 500 bridge [leg_timeout=60]sofia/gateway/VOS224/
13239899290"/>
</condition>
</extension>
</context>
</section>
</document>
2019-10-31 23:01:19.723239 [DEBUG] freeswitch_lua.cpp:382 DBH handle 0x7ff0d42008e0 released.
Dialplan: sofia/default/
46799...@192.95.6.96 Action set(bridge_pre_execute_bleg_data=+6000 normal_clearing)
Dialplan: sofia/default/
46799...@192.95.6.96 Action set(origination_rates=ID:7|CODE:^1.*|DESTINATION:usa|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|CT:|COST:0.00500|INC:6|INITIALBLOCK:6|RATEGROUP:5|MARKUP:0|CI:203|ACCID:13)
Dialplan: sofia/default/
46799...@192.95.6.96 Action limit(db 4679949129 user_4679949129 50 !SWITCH_CONGESTION)
Dialplan: sofia/default/
46799...@192.95.6.96 Action limit(hash CPS_4679949129 CPS_user_4679949129 10/1 !SWITCH_CONGESTION)
Dialplan: sofia/default/
46799...@192.95.6.96 Action set(termination_rates=ID:2|CODE:^1.*|DESTINATION:USA and Canada|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|COST:0.00500|INC:6|INITIALBLOCK:6|TRUNK:3|PROVIDER:3)
Dialplan: sofia/default/
46799...@192.95.6.96 Action export(presence_data=x|||Bitan(4679949129)|||^1.* // usa // 0.00500 // trunk_id=3|||VOS224 // ^1.* // USA and Canada // 0.00500 // trunk_id=3|||STD)
Dialplan: sofia/default/
46799...@192.95.6.96 Action limit(hash CPS_3 CPS_trunk_3 250/1 !SWITCH_CONGESTION)
2019-10-31 23:01:19.723239 [DEBUG] switch_core_state_machine.c:286 (sofia/default/
46799...@192.95.6.96) State Change CS_ROUTING -> CS_EXECUTE
2019-10-31 23:01:19.723239 [DEBUG] switch_core_state_machine.c:643 (sofia/default/
46799...@192.95.6.96) State ROUTING going to sleep
2019-10-31 23:01:19.723239 [DEBUG] switch_core_state_machine.c:584 (sofia/default/
46799...@192.95.6.96) Running State Change CS_EXECUTE (Cur 1 Tot 30)
2019-10-31 23:01:19.723239 [DEBUG] switch_core_state_machine.c:650 (sofia/default/
46799...@192.95.6.96) State EXECUTE
2019-10-31 23:01:19.723239 [DEBUG] switch_core_state_machine.c:328 sofia/default/
46799...@192.95.6.96 Standard EXECUTE
2019-10-31 23:01:19.723239 [DEBUG] mod_dptools.c:1548 SET sofia/default/
46799...@192.95.6.96 [bridge_pre_execute_bleg_app]=[sched_hangup]
2019-10-31 23:01:19.723239 [DEBUG] mod_dptools.c:1548 SET sofia/default/
46799...@192.95.6.96 [bridge_pre_execute_bleg_data]=[+6000 normal_clearing]
2019-10-31 23:01:19.723239 [DEBUG] mod_dptools.c:1548 SET sofia/default/
46799...@192.95.6.96 [nibble_account]=[13]
2019-10-31 23:01:19.723239 [DEBUG] mod_dptools.c:1548 SET sofia/default/
46799...@192.95.6.96 [nibble_rate]=[0.00500]
2019-10-31 23:01:19.723239 [DEBUG] mod_dptools.c:1548 SET sofia/default/
46799...@192.95.6.96 [nibble_init_inc]=[6]
2019-10-31 23:01:19.723239 [DEBUG] mod_dptools.c:1548 SET sofia/default/
46799...@192.95.6.96 [nibble_inc]=[6]
2019-10-31 23:01:19.723239 [DEBUG] mod_dptools.c:1548 SET sofia/default/
46799...@192.95.6.96 [nibble_connectcost]=[0.00000]
2019-10-31 23:01:19.723239 [ERR] switch_core_session.c:2622 Invalid Application nibblebill
2019-10-31 23:01:19.723239 [NOTICE] switch_core_session.c:2623 Hangup sofia/default/
46799...@192.95.6.96 [CS_EXECUTE] [DESTINATION_OUT_OF_ORDER]
2019-10-31 23:01:19.723239 [DEBUG] switch_core_state_machine.c:650 (sofia/default/
46799...@192.95.6.96) State EXECUTE going to sleep
2019-10-31 23:01:19.723239 [DEBUG] switch_core_state_machine.c:584 (sofia/default/
46799...@192.95.6.96) Running State Change CS_HANGUP (Cur 1 Tot 30)
2019-10-31 23:01:19.723239 [DEBUG] switch_core_state_machine.c:850 (sofia/default/
46799...@192.95.6.96) Callstate Change RINGING -> HANGUP
2019-10-31 23:01:19.723239 [DEBUG] switch_core_state_machine.c:852 (sofia/default/
46799...@192.95.6.96) State HANGUP
2019-10-31 23:01:19.723239 [DEBUG] mod_sofia.c:438 Channel sofia/default/
46799...@192.95.6.96 hanging up, cause: DESTINATION_OUT_OF_ORDER
2019-10-31 23:01:19.723239 [DEBUG] mod_sofia.c:577 Responding to INVITE with: 502
2019-10-31 23:01:19.723239 [DEBUG] switch_core_state_machine.c:60 sofia/default/
46799...@192.95.6.96 Standard HANGUP, cause: DESTINATION_OUT_OF_ORDER
2019-10-31 23:01:19.723239 [DEBUG] switch_core_state_machine.c:852 (sofia/default/
46799...@192.95.6.96) State HANGUP going to sleep
2019-10-31 23:01:19.723239 [DEBUG] switch_core_state_machine.c:619 (sofia/default/
46799...@192.95.6.96) State Change CS_HANGUP -> CS_REPORTING
2019-10-31 23:01:19.723239 [DEBUG] switch_core_state_machine.c:584 (sofia/default/
46799...@192.95.6.96) Running State Change CS_REPORTING (Cur 1 Tot 30)
2019-10-31 23:01:19.723239 [DEBUG] switch_core_state_machine.c:938 (sofia/default/
46799...@192.95.6.96) State REPORTING
2019-10-31 23:01:19.723239 [INFO] mod_json_cdr.c:271 Process [59d3ce58-fc32-11e9-9f1d-af7a00d51150.cdr.json]
2019-10-31 23:01:19.743231 [DEBUG] switch_core_state_machine.c:174 sofia/default/
46799...@192.95.6.96 Standard REPORTING, cause: DESTINATION_OUT_OF_ORDER
2019-10-31 23:01:19.743231 [DEBUG] switch_core_state_machine.c:938 (sofia/default/
46799...@192.95.6.96) State REPORTING going to sleep
2019-10-31 23:01:19.743231 [DEBUG] switch_core_state_machine.c:610 (sofia/default/
46799...@192.95.6.96) State Change CS_REPORTING -> CS_DESTROY
2019-10-31 23:01:19.743231 [DEBUG] switch_core_session.c:1665 Session 30 (sofia/default/
46799...@192.95.6.96) Locked, Waiting on external entities
2019-10-31 23:01:19.743231 [NOTICE] switch_core_session.c:1683 Session 30 (sofia/default/
46799...@192.95.6.96) Ended
2019-10-31 23:01:19.743231 [NOTICE] switch_core_session.c:1687 Close Channel sofia/default/
46799...@192.95.6.96 [CS_DESTROY]
2019-10-31 23:01:19.743231 [DEBUG] switch_core_state_machine.c:741 (sofia/default/
46799...@192.95.6.96) Running State Change CS_DESTROY (Cur 0 Tot 30)
2019-10-31 23:01:19.743231 [DEBUG] switch_core_state_machine.c:751 (sofia/default/
46799...@192.95.6.96) State DESTROY
2019-10-31 23:01:19.743231 [DEBUG] switch_core_state_machine.c:181 sofia/default/
46799...@192.95.6.96 Standard DESTROY
2019-10-31 23:01:19.743231 [DEBUG] switch_core_state_machine.c:751 (sofia/default/
46799...@192.95.6.96) State DESTROY going to sleep