From Ketan Kothari, 6 Years ago, written in Plain Text.
- view diff
Embed
  1. [2018-02-12 02:31:17] *********************** OUTBOUND CALL ENTRY START *************
  2. [2018-02-12 02:31:17] INSERT INTO cdrs (uniqueid,accountid,type,callerid,callednum,billseconds,trunk_id,trunkip,callerip,disposition,callstart,debit,cost,provider_id,pricelist_id,package_id,pattern,notes,rate_cost,reseller_id,reseller_code,reseller_code_destination,reseller_cost,provider_code,provider_code_destination,provider_cost,provider_call_cost,call_direction,calltype,profile_start_stamp,answer_stamp,bridge_stamp,progress_stamp,progress_media_stamp,end_stamp,billmsec,answermsec,waitmsec,progress_mediamsec,flow_billmsec)  values ('655f9c95-7e47-49d0-87d9-6f75ea6004cc','0','0',' <>','','5',0,"",'72.15.219.140','NORMAL_CLEARING','','0.0000','0.0000',0,'','0','','','0','0','0','',0,'','',0,'0.0000','internal','STANDARD','2018-02-12 02:31:11','2018-02-12 02:31:12','2018-02-12 02:31:12','','2018-02-12 02:31:12','2018-02-12 02:31:17',5100,'1360','1240','1220','6460')
  3. [2018-02-12 02:31:17] Array
  4. (
  5.     [core-uuid] => d80f0abf-f491-4ded-8163-c7874125345b
  6.     [switchname] => FS01
  7.     [channel_data] => Array
  8.         (
  9.             [state] => CS_REPORTING
  10.             [direction] => inbound
  11.             [state_number] => 11
  12.             [flags] => 0=1;1=1;3=1;37=1;38=1;40=1;43=1;48=1;53=1;94=1;105=1;111=1;112=1;121=1
  13.             [caps] => 1=1;2=1;3=1;4=1;5=1;6=1
  14.         )
  15.  
  16.     [callStats] => Array
  17.         (
  18.             [audio] => Array
  19.                 (
  20.                     [inbound] => Array
  21.                         (
  22.                             [raw_bytes] => 33368
  23.                             [media_bytes] => 33368
  24.                             [packet_count] => 194
  25.                             [media_packet_count] => 194
  26.                             [skip_packet_count] => 68
  27.                             [jitter_packet_count] => 0
  28.                             [dtmf_packet_count] => 0
  29.                             [cng_packet_count] => 0
  30.                             [flush_packet_count] => 0
  31.                             [largest_jb_size] => 0
  32.                             [jitter_min_variance] => 4.347826
  33.                             [jitter_max_variance] => 27.586207
  34.                             [jitter_loss_rate] => 0
  35.                             [jitter_burst_rate] => 0
  36.                             [mean_interval] => 20
  37.                             [flaw_total] => 0
  38.                             [quality_percentage] => 100
  39.                             [mos] => 4.5
  40.                         )
  41.  
  42.                     [outbound] => Array
  43.                         (
  44.                             [raw_bytes] => 44204
  45.                             [media_bytes] => 44204
  46.                             [packet_count] => 257
  47.                             [media_packet_count] => 257
  48.                             [skip_packet_count] => 0
  49.                             [dtmf_packet_count] => 0
  50.                             [cng_packet_count] => 0
  51.                             [rtcp_packet_count] => 0
  52.                             [rtcp_octet_count] => 0
  53.                         )
  54.  
  55.                 )
  56.  
  57.         )
  58.  
  59.     [variables] => Array
  60.         (
  61.             [direction] => inbound
  62.             [uuid] => 85126565-0fe4-4cd5-8993-384269e69f82
  63.             [session_id] => 36099
  64.             [sip_from_params] => transport=UDP
  65.             [sip_from_user] => 999999
  66.             [sip_from_uri] => 999999@138.197.236.58
  67.             [sip_from_host] => 138.197.236.58
  68.             [video_media_flow] => sendrecv
  69.             [channel_name] => sofia/default/999999@138.197.236.58
  70.             [ep_codec_string] => CORE_PCM_MODULE.PCMA@8000h@20i@64000b,CORE_PCM_MODULE.PCMU@8000h@20i@64000b
  71.             [sip_local_network_addr] => 138.68.252.67
  72.             [sip_network_ip] => 138.197.236.58
  73.             [sip_network_port] => 5060
  74.             [sip_received_ip] => 138.197.236.58
  75.             [sip_received_port] => 5060
  76.             [sip_via_protocol] => udp
  77.             [sip_authorized] => true
  78.             [sip_acl_authed_by] => default
  79.             [sip_from_user_stripped] => 999999
  80.             [sofia_profile_name] => default
  81.             [recovery_profile_name] => default
  82.             [sip_invite_route_uri] => <sip:138.197.236.58;lr;did=931.7b577e03>
  83.             [sip_invite_record_route] => <sip:138.197.236.58;lr;did=931.7b577e03>
  84.             [sip_allow] => INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
  85.             [sip_req_params] => transport=UDP
  86.             [sip_req_user] => 17027777777
  87.             [sip_req_uri] => 17027777777@138.197.236.58
  88.             [sip_req_host] => 138.197.236.58
  89.             [sip_to_params] => transport=UDP
  90.             [sip_to_user] => 17027777777
  91.             [sip_to_uri] => 17027777777@138.197.236.58
  92.             [sip_to_host] => 138.197.236.58
  93.             [sip_contact_params] => transport=UDP
  94.             [sip_contact_user] => 999999
  95.             [sip_contact_port] => 44498
  96.             [sip_contact_uri] => 999999@117.247.91.162:44498
  97.             [sip_contact_host] => 117.247.91.162
  98.             [sip_via_host] => 138.197.236.58
  99.             [sip_via_port] => 5060
  100.             [max_forwards] => 30
  101.             [presence_id] => 999999@138.197.236.58
  102.             [sip_h_X-AUTH-IP] => 117.247.91.162
  103.             [sip_h_P-Accountcode] => 333320
  104.             [sip_h_P-effective_caller_id_name] => 999
  105.             [sip_h_P-effective_caller_id_number] => 9999999999
  106.             [switch_r_sdp] => v=0
  107. o=Z 0 0 IN IP4 117.247.91.162
  108. s=Z
  109. c=IN IP4 117.247.91.162
  110. t=0 0
  111. m=audio 8000 RTP/AVP 3 110 8 0 98 101
  112. a=rtpmap:110 speex/8000
  113. a=rtpmap:98 iLBC/8000
  114. a=fmtp:98 mode=20
  115. a=rtpmap:101 telephone-event/8000
  116. a=fmtp:101 0-15
  117.  
  118.             [call_uuid] => 85126565-0fe4-4cd5-8993-384269e69f82
  119.             [effective_destination_number] => 17027777777
  120.             [callstart] => 2018-02-12 10:31:11
  121.             [hangup_after_bridge] => true
  122.             [continue_on_fail] => true
  123.             [account_id] => 131
  124.             [parent_id] => 0
  125.             [entity_id] => 0
  126.             [call_processed] => internal
  127.             [call_direction] => outbound
  128.             [accountname] => default
  129.             [origination_rates] => ID:192|CODE:^1702.*|DESTINATION:USA|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|COST:0.03000|INC:60|INITIALBLOCK:60|RATEGROUP:2|MARKUP:0|ACCID:131
  130.             [limit_usage_333320_user_333320] => 1
  131.             [original_caller_id_name] => 999
  132.             [original_caller_id_number] => 999
  133.             [limit_usage_OV_GW_gw_OV_GW] => 1
  134.             [originated_legs] => ARRAY::c086d718-5d65-41fb-b7c6-9b1b3102e29f;Outbound Call;17027777777|:655f9c95-7e47-49d0-87d9-6f75ea6004cc;Outbound Call;17027777777
  135.             [sip_hangup_phrase] => Temporarily not available
  136.             [last_bridge_hangup_cause] => NO_USER_RESPONSE
  137.             [last_bridge_proto_specific_hangup_cause] => sip:480
  138.             [originate_causes] => ARRAY::c086d718-5d65-41fb-b7c6-9b1b3102e29f;NO_USER_RESPONSE|:655f9c95-7e47-49d0-87d9-6f75ea6004cc;NONE
  139.             [originate_failed_cause] => NO_USER_RESPONSE
  140.             [effective_caller_id_name] => 999
  141.             [effective_caller_id_number] => 9999999999
  142.             [calltype] => STANDARD
  143.             [termination_rates] => ID:27163|CODE:^1702777.*|DESTINATION:|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|COST:0.00110|INC:6|INITIALBLOCK:6|TRUNK:7|PROVIDER:8
  144.             [trunk_id] => 7
  145.             [provider_id] => 8
  146.             [absolute_codec_string] => PCMU,PCMA
  147.             [limit_realm] => TQ_GW
  148.             [limit_id] => gw_TQ_GW
  149.             [limit_max] => 25
  150.             [limit_usage] => 1
  151.             [limit_usage_TQ_GW_gw_TQ_GW] => 1
  152.             [current_application_data] => [leg_timeout=30]sofia/gateway/TQ_GW/17027777777
  153.             [current_application] => bridge
  154.             [switch_m_sdp] => v=0
  155. o=Sonus_UAC 65012 777673 IN IP4 68.68.124.82
  156. s=SIP Media Capabilities
  157. c=IN IP4 68.68.124.84
  158. t=0 0
  159. m=audio 35010 RTP/AVP 0 101
  160. a=rtpmap:0 PCMU/8000
  161. a=rtpmap:101 telephone-event/8000
  162. a=fmtp:101 0-15
  163. a=ptime:20
  164.  
  165.             [audio_media_flow] => sendrecv
  166.             [rtp_use_codec_string] => PCMU,PCMA
  167.             [rtp_audio_recv_pt] => 8
  168.             [rtp_use_codec_name] => PCMA
  169.             [rtp_use_codec_rate] => 8000
  170.             [rtp_use_codec_ptime] => 20
  171.             [rtp_use_codec_channels] => 1
  172.             [rtp_last_audio_codec_string] => PCMA@8000h@20i@1c
  173.             [read_codec] => PCMA
  174.             [original_read_codec] => PCMA
  175.             [read_rate] => 8000
  176.             [original_read_rate] => 8000
  177.             [write_codec] => PCMA
  178.             [write_rate] => 8000
  179.             [dtmf_type] => rfc2833
  180.             [local_media_ip] => 138.68.252.67
  181.             [local_media_port] => 31388
  182.             [advertised_media_ip] => 138.68.252.67
  183.             [rtp_use_timer_name] => soft
  184.             [rtp_use_pt] => 8
  185.             [rtp_use_ssrc] => 1585545727
  186.             [rtp_2833_send_payload] => 101
  187.             [rtp_2833_recv_payload] => 101
  188.             [remote_media_ip] => 117.247.91.162
  189.             [remote_media_port] => 8000
  190.             [originate_disposition] => SUCCESS
  191.             [DIALSTATUS] => SUCCESS
  192.             [last_bridge_to] => 655f9c95-7e47-49d0-87d9-6f75ea6004cc
  193.             [bridge_channel] => sofia/default/17027777777
  194.             [bridge_uuid] => 655f9c95-7e47-49d0-87d9-6f75ea6004cc
  195.             [signal_bond] => 655f9c95-7e47-49d0-87d9-6f75ea6004cc
  196.             [rtp_local_sdp_str] => v=0
  197. o=FreeSWITCH 1518400084 1518400086 IN IP4 138.68.252.67
  198. s=FreeSWITCH
  199. c=IN IP4 138.68.252.67
  200. t=0 0
  201. m=audio 31388 RTP/AVP 8 101
  202. a=rtpmap:8 PCMA/8000
  203. a=rtpmap:101 telephone-event/8000
  204. a=fmtp:101 0-16
  205. a=ptime:20
  206. a=sendrecv
  207.  
  208.             [endpoint_disposition] => ANSWER
  209.             [sip_to_tag] => 3maHXmQN3QvgD
  210.             [sip_from_tag] => deb61560
  211.             [sip_cseq] => 2
  212.             [sip_call_id] => MjNiZjRkMjVjY2JlNDg5NTU0YWIzNWIyOGRhMTlhMjk.
  213.             [sip_full_via] => SIP/2.0/UDP 138.197.236.58:5060;branch=z9hG4bKd611.3efe2a84.2,SIP/2.0/UDP 117.247.91.162:44498;branch=z9hG4bK-d8754z-dc6ba4dc63cdcd2f-1---d8754z-
  214.             [sip_full_from] => <sip:999999@138.197.236.58;transport=UDP>;tag=deb61560
  215.             [sip_full_to] => <sip:17027777777@138.197.236.58;transport=UDP>;tag=3maHXmQN3QvgD
  216.             [last_sent_callee_id_name] => Outbound Call
  217.             [last_sent_callee_id_number] => 17027777777
  218.             [sip_term_status] => 200
  219.             [proto_specific_hangup_cause] => sip:200
  220.             [sip_term_cause] => 16
  221.             [sip_bye_h_P-hint] => rr-enforced
  222.             [sip_bye_h_X-AUTH-IP] => 117.247.91.162
  223.             [sip_bye_h_P-Accountcode] => 333320
  224.             [sip_bye_h_P-effective_caller_id_name] => 999
  225.             [sip_bye_h_P-effective_caller_id_number] => 9999999999
  226.             [last_bridge_role] => originator
  227.             [sip_user_agent] => Z 3.3.25608 r25552
  228.             [sip_hangup_disposition] => recv_bye
  229.             [bridge_hangup_cause] => NORMAL_CLEARING
  230.             [hangup_cause] => NORMAL_CLEARING
  231.             [hangup_cause_q850] => 16
  232.             [digits_dialed] => none
  233.             [start_stamp] => 2018-02-12 02:31:11
  234.             [profile_start_stamp] => 2018-02-12 02:31:11
  235.             [answer_stamp] => 2018-02-12 02:31:12
  236.             [bridge_stamp] => 2018-02-12 02:31:12
  237.             [progress_media_stamp] => 2018-02-12 02:31:12
  238.             [end_stamp] => 2018-02-12 02:31:17
  239.             [start_epoch] => 1518431471
  240.             [start_uepoch] => 1518431471225841
  241.             [profile_start_epoch] => 1518431471
  242.             [profile_start_uepoch] => 1518431471225841
  243.             [answer_epoch] => 1518431472
  244.             [answer_uepoch] => 1518431472745859
  245.             [bridge_epoch] => 1518431472
  246.             [bridge_uepoch] => 1518431472605857
  247.             [last_hold_epoch] => 0
  248.             [last_hold_uepoch] => 0
  249.             [hold_accum_seconds] => 0
  250.             [hold_accum_usec] => 0
  251.             [hold_accum_ms] => 0
  252.             [resurrect_epoch] => 0
  253.             [resurrect_uepoch] => 0
  254.             [progress_epoch] => 0
  255.             [progress_uepoch] => 0
  256.             [progress_media_epoch] => 1518431472
  257.             [progress_media_uepoch] => 1518431472605857
  258.             [end_epoch] => 1518431477
  259.             [end_uepoch] => 1518431477825836
  260.             [last_app] => bridge
  261.             [last_arg] => [leg_timeout=30]sofia/gateway/TQ_GW/17027777777
  262.             [caller_id] => "999999" <999999>
  263.             [duration] => 6
  264.             [billsec] => 5
  265.             [progresssec] => 0
  266.             [answersec] => 1
  267.             [waitsec] => 1
  268.             [progress_mediasec] => 1
  269.             [flow_billsec] => 6
  270.             [mduration] => 6600
  271.             [billmsec] => 5080
  272.             [progressmsec] => 0
  273.             [answermsec] => 1520
  274.             [waitmsec] => 1380
  275.             [progress_mediamsec] => 1380
  276.             [flow_billmsec] => 6600
  277.             [uduration] => 6599995
  278.             [billusec] => 5079977
  279.             [progressusec] => 0
  280.             [answerusec] => 1520018
  281.             [waitusec] => 1380016
  282.             [progress_mediausec] => 1380016
  283.             [flow_billusec] => 6599995
  284.             [rtp_audio_in_raw_bytes] => 33368
  285.             [rtp_audio_in_media_bytes] => 33368
  286.             [rtp_audio_in_packet_count] => 194
  287.             [rtp_audio_in_media_packet_count] => 194
  288.             [rtp_audio_in_skip_packet_count] => 68
  289.             [rtp_audio_in_jitter_packet_count] => 0
  290.             [rtp_audio_in_dtmf_packet_count] => 0
  291.             [rtp_audio_in_cng_packet_count] => 0
  292.             [rtp_audio_in_flush_packet_count] => 0
  293.             [rtp_audio_in_largest_jb_size] => 0
  294.             [rtp_audio_in_jitter_min_variance] => 4.35
  295.             [rtp_audio_in_jitter_max_variance] => 27.59
  296.             [rtp_audio_in_jitter_loss_rate] => 0.00
  297.             [rtp_audio_in_jitter_burst_rate] => 0.00
  298.             [rtp_audio_in_mean_interval] => 20.00
  299.             [rtp_audio_in_flaw_total] => 0
  300.             [rtp_audio_in_quality_percentage] => 100.00
  301.             [rtp_audio_in_mos] => 4.50
  302.             [rtp_audio_out_raw_bytes] => 44204
  303.             [rtp_audio_out_media_bytes] => 44204
  304.             [rtp_audio_out_packet_count] => 257
  305.             [rtp_audio_out_media_packet_count] => 257
  306.             [rtp_audio_out_skip_packet_count] => 0
  307.             [rtp_audio_out_dtmf_packet_count] => 0
  308.             [rtp_audio_out_cng_packet_count] => 0
  309.             [rtp_audio_rtcp_packet_count] => 0
  310.             [rtp_audio_rtcp_octet_count] => 0
  311.         )
  312.  
  313.     [app_log] => Array
  314.         (
  315.             [applications] => Array
  316.                 (
  317.                     [0] => Array
  318.                         (
  319.                             [app_name] => set
  320.                             [app_data] => effective_destination_number=17027777777
  321.                             [app_stamp] => 1518431471280282
  322.                         )
  323.  
  324.                     [1] => Array
  325.                         (
  326.                             [app_name] => sched_hangup
  327.                             [app_data] => +7200 normal_clearing
  328.                             [app_stamp] => 1518431471280931
  329.                         )
  330.  
  331.                     [2] => Array
  332.                         (
  333.                             [app_name] => set
  334.                             [app_data] => callstart=2018-02-12 10:31:11
  335.                             [app_stamp] => 1518431471281253
  336.                         )
  337.  
  338.                     [3] => Array
  339.                         (
  340.                             [app_name] => set
  341.                             [app_data] => hangup_after_bridge=true
  342.                             [app_stamp] => 1518431471281488
  343.                         )
  344.  
  345.                     [4] => Array
  346.                         (
  347.                             [app_name] => set
  348.                             [app_data] => continue_on_fail=true
  349.                             [app_stamp] => 1518431471281698
  350.                         )
  351.  
  352.                     [5] => Array
  353.                         (
  354.                             [app_name] => set
  355.                             [app_data] => account_id=131
  356.                             [app_stamp] => 1518431471281911
  357.                         )
  358.  
  359.                     [6] => Array
  360.                         (
  361.                             [app_name] => set
  362.                             [app_data] => parent_id=0
  363.                             [app_stamp] => 1518431471282128
  364.                         )
  365.  
  366.                     [7] => Array
  367.                         (
  368.                             [app_name] => set
  369.                             [app_data] => entity_id=0
  370.                             [app_stamp] => 1518431471282363
  371.                         )
  372.  
  373.                     [8] => Array
  374.                         (
  375.                             [app_name] => set
  376.                             [app_data] => call_processed=internal
  377.                             [app_stamp] => 1518431471282588
  378.                         )
  379.  
  380.                     [9] => Array
  381.                         (
  382.                             [app_name] => set
  383.                             [app_data] => call_direction=outbound
  384.                             [app_stamp] => 1518431471282836
  385.                         )
  386.  
  387.                     [10] => Array
  388.                         (
  389.                             [app_name] => set
  390.                             [app_data] => accountname=default
  391.                             [app_stamp] => 1518431471283077
  392.                         )
  393.  
  394.                     [11] => Array
  395.                         (
  396.                             [app_name] => set
  397.                             [app_data] => origination_rates=ID:192|CODE:^1702.*|DESTINATION:USA|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|COST:0.03000|INC:60|INITIALBLOCK:60|RATEGROUP:2|MARKUP:0|ACCID:131
  398.                             [app_stamp] => 1518431471283294
  399.                         )
  400.  
  401.                     [12] => Array
  402.                         (
  403.                             [app_name] => limit
  404.                             [app_data] => db 333320 user_333320 20/0 !SWITCH_CONGESTION
  405.                             [app_stamp] => 1518431471283523
  406.                         )
  407.  
  408.                     [13] => Array
  409.                         (
  410.                             [app_name] => set
  411.                             [app_data] => original_caller_id_name=999
  412.                             [app_stamp] => 1518431471284405
  413.                         )
  414.  
  415.                     [14] => Array
  416.                         (
  417.                             [app_name] => set
  418.                             [app_data] => original_caller_id_number=999
  419.                             [app_stamp] => 1518431471284641
  420.                         )
  421.  
  422.                     [15] => Array
  423.                         (
  424.                             [app_name] => set
  425.                             [app_data] => effective_caller_id_name=999
  426.                             [app_stamp] => 1518431471284878
  427.                         )
  428.  
  429.                     [16] => Array
  430.                         (
  431.                             [app_name] => set
  432.                             [app_data] => effective_caller_id_number=9999999999
  433.                             [app_stamp] => 1518431471285124
  434.                         )
  435.  
  436.                     [17] => Array
  437.                         (
  438.                             [app_name] => set
  439.                             [app_data] => calltype=STANDARD
  440.                             [app_stamp] => 1518431471285363
  441.                         )
  442.  
  443.                     [18] => Array
  444.                         (
  445.                             [app_name] => set
  446.                             [app_data] => termination_rates=ID:228938|CODE:^1702777.*|DESTINATION:PAHRUMP NEVADA|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|COST:0.00088|INC:6|INITIALBLOCK:6|TRUNK:6|PROVIDER:7
  447.                             [app_stamp] => 1518431471285606
  448.                         )
  449.  
  450.                     [19] => Array
  451.                         (
  452.                             [app_name] => set
  453.                             [app_data] => trunk_id=6
  454.                             [app_stamp] => 1518431471285912
  455.                         )
  456.  
  457.                     [20] => Array
  458.                         (
  459.                             [app_name] => set
  460.                             [app_data] => provider_id=7
  461.                             [app_stamp] => 1518431471286158
  462.                         )
  463.  
  464.                     [21] => Array
  465.                         (
  466.                             [app_name] => set
  467.                             [app_data] => absolute_codec_string=PCMU,PCMA
  468.                             [app_stamp] => 1518431471286434
  469.                         )
  470.  
  471.                     [22] => Array
  472.                         (
  473.                             [app_name] => limit_execute
  474.                             [app_data] => db OV_GW gw_OV_GW 25 bridge [leg_timeout=30]sofia/gateway/OV_GW/17027777777
  475.                             [app_stamp] => 1518431471286725
  476.                         )
  477.  
  478.                     [23] => Array
  479.                         (
  480.                             [app_name] => bridge
  481.                             [app_data] => [leg_timeout=30]sofia/gateway/OV_GW/17027777777
  482.                             [app_stamp] => 1518431471287235
  483.                         )
  484.  
  485.                     [24] => Array
  486.                         (
  487.                             [app_name] => set
  488.                             [app_data] => effective_caller_id_name=999
  489.                             [app_stamp] => 1518431471371134
  490.                         )
  491.  
  492.                     [25] => Array
  493.                         (
  494.                             [app_name] => set
  495.                             [app_data] => effective_caller_id_number=9999999999
  496.                             [app_stamp] => 1518431471371440
  497.                         )
  498.  
  499.                     [26] => Array
  500.                         (
  501.                             [app_name] => set
  502.                             [app_data] => calltype=STANDARD
  503.                             [app_stamp] => 1518431471371680
  504.                         )
  505.  
  506.                     [27] => Array
  507.                         (
  508.                             [app_name] => set
  509.                             [app_data] => termination_rates=ID:27163|CODE:^1702777.*|DESTINATION:|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|COST:0.00110|INC:6|INITIALBLOCK:6|TRUNK:7|PROVIDER:8
  510.                             [app_stamp] => 1518431471371938
  511.                         )
  512.  
  513.                     [28] => Array
  514.                         (
  515.                             [app_name] => set
  516.                             [app_data] => trunk_id=7
  517.                             [app_stamp] => 1518431471372269
  518.                         )
  519.  
  520.                     [29] => Array
  521.                         (
  522.                             [app_name] => set
  523.                             [app_data] => provider_id=8
  524.                             [app_stamp] => 1518431471372528
  525.                         )
  526.  
  527.                     [30] => Array
  528.                         (
  529.                             [app_name] => set
  530.                             [app_data] => absolute_codec_string=PCMU,PCMA
  531.                             [app_stamp] => 1518431471372799
  532.                         )
  533.  
  534.                     [31] => Array
  535.                         (
  536.                             [app_name] => limit_execute
  537.                             [app_data] => db TQ_GW gw_TQ_GW 25 bridge [leg_timeout=30]sofia/gateway/TQ_GW/17027777777
  538.                             [app_stamp] => 1518431471373061
  539.                         )
  540.  
  541.                     [32] => Array
  542.                         (
  543.                             [app_name] => bridge
  544.                             [app_data] => [leg_timeout=30]sofia/gateway/TQ_GW/17027777777
  545.                             [app_stamp] => 1518431471373563
  546.                         )
  547.  
  548.                 )
  549.  
  550.         )
  551.  
  552.     [callflow] => Array
  553.         (
  554.             [0] => Array
  555.                 (
  556.                     [dialplan] => XML
  557.                     [profile_index] => 1
  558.                     [extension] => Array
  559.                         (
  560.                             [name] => 17027777777
  561.                             [number] => 17027777777
  562.                             [applications] => Array
  563.                                 (
  564.                                     [0] => Array
  565.                                         (
  566.                                             [app_name] => set
  567.                                             [app_data] => effective_destination_number=17027777777
  568.                                         )
  569.  
  570.                                     [1] => Array
  571.                                         (
  572.                                             [app_name] => sched_hangup
  573.                                             [app_data] => +7200 normal_clearing
  574.                                         )
  575.  
  576.                                     [2] => Array
  577.                                         (
  578.                                             [app_name] => set
  579.                                             [app_data] => callstart=2018-02-12 10:31:11
  580.                                         )
  581.  
  582.                                     [3] => Array
  583.                                         (
  584.                                             [app_name] => set
  585.                                             [app_data] => hangup_after_bridge=true
  586.                                         )
  587.  
  588.                                     [4] => Array
  589.                                         (
  590.                                             [app_name] => set
  591.                                             [app_data] => continue_on_fail=true
  592.                                         )
  593.  
  594.                                     [5] => Array
  595.                                         (
  596.                                             [app_name] => set
  597.                                             [app_data] => account_id=131
  598.                                         )
  599.  
  600.                                     [6] => Array
  601.                                         (
  602.                                             [app_name] => set
  603.                                             [app_data] => parent_id=0
  604.                                         )
  605.  
  606.                                     [7] => Array
  607.                                         (
  608.                                             [app_name] => set
  609.                                             [app_data] => entity_id=0
  610.                                         )
  611.  
  612.                                     [8] => Array
  613.                                         (
  614.                                             [app_name] => set
  615.                                             [app_data] => call_processed=internal
  616.                                         )
  617.  
  618.                                     [9] => Array
  619.                                         (
  620.                                             [app_name] => set
  621.                                             [app_data] => call_direction=outbound
  622.                                         )
  623.  
  624.                                     [10] => Array
  625.                                         (
  626.                                             [app_name] => set
  627.                                             [app_data] => accountname=default
  628.                                         )
  629.  
  630.                                     [11] => Array
  631.                                         (
  632.                                             [app_name] => set
  633.                                             [app_data] => origination_rates=ID:192|CODE:^1702.*|DESTINATION:USA|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|COST:0.03000|INC:60|INITIALBLOCK:60|RATEGROUP:2|MARKUP:0|ACCID:131
  634.                                         )
  635.  
  636.                                     [12] => Array
  637.                                         (
  638.                                             [app_name] => limit
  639.                                             [app_data] => db 333320 user_333320 20/0 !SWITCH_CONGESTION
  640.                                         )
  641.  
  642.                                     [13] => Array
  643.                                         (
  644.                                             [app_name] => set
  645.                                             [app_data] => original_caller_id_name=999
  646.                                         )
  647.  
  648.                                     [14] => Array
  649.                                         (
  650.                                             [app_name] => set
  651.                                             [app_data] => original_caller_id_number=999
  652.                                         )
  653.  
  654.                                     [15] => Array
  655.                                         (
  656.                                             [app_name] => set
  657.                                             [app_data] => effective_caller_id_name=999
  658.                                         )
  659.  
  660.                                     [16] => Array
  661.                                         (
  662.                                             [app_name] => set
  663.                                             [app_data] => effective_caller_id_number=9999999999
  664.                                         )
  665.  
  666.                                     [17] => Array
  667.                                         (
  668.                                             [app_name] => set
  669.                                             [app_data] => calltype=STANDARD
  670.                                         )
  671.  
  672.                                     [18] => Array
  673.                                         (
  674.                                             [app_name] => set
  675.                                             [app_data] => termination_rates=ID:228938|CODE:^1702777.*|DESTINATION:PAHRUMP NEVADA|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|COST:0.00088|INC:6|INITIALBLOCK:6|TRUNK:6|PROVIDER:7
  676.                                         )
  677.  
  678.                                     [19] => Array
  679.                                         (
  680.                                             [app_name] => set
  681.                                             [app_data] => trunk_id=6
  682.                                         )
  683.  
  684.                                     [20] => Array
  685.                                         (
  686.                                             [app_name] => set
  687.                                             [app_data] => provider_id=7
  688.                                         )
  689.  
  690.                                     [21] => Array
  691.                                         (
  692.                                             [app_name] => set
  693.                                             [app_data] => absolute_codec_string=PCMU,PCMA
  694.                                         )
  695.  
  696.                                     [22] => Array
  697.                                         (
  698.                                             [app_name] => limit_execute
  699.                                             [app_data] => db OV_GW gw_OV_GW 25 bridge [leg_timeout=30]sofia/gateway/OV_GW/17027777777
  700.                                         )
  701.  
  702.                                     [23] => Array
  703.                                         (
  704.                                             [app_name] => set
  705.                                             [app_data] => effective_caller_id_name=999
  706.                                         )
  707.  
  708.                                     [24] => Array
  709.                                         (
  710.                                             [app_name] => set
  711.                                             [app_data] => effective_caller_id_number=9999999999
  712.                                         )
  713.  
  714.                                     [25] => Array
  715.                                         (
  716.                                             [app_name] => set
  717.                                             [app_data] => calltype=STANDARD
  718.                                         )
  719.  
  720.                                     [26] => Array
  721.                                         (
  722.                                             [app_name] => set
  723.                                             [app_data] => termination_rates=ID:27163|CODE:^1702777.*|DESTINATION:|CONNECTIONCOST:0.00000|INCLUDEDSECONDS:0|COST:0.00110|INC:6|INITIALBLOCK:6|TRUNK:7|PROVIDER:8
  724.                                         )
  725.  
  726.                                     [27] => Array
  727.                                         (
  728.                                             [app_name] => set
  729.                                             [app_data] => trunk_id=7
  730.                                         )
  731.  
  732.                                     [28] => Array
  733.                                         (
  734.                                             [app_name] => set
  735.                                             [app_data] => provider_id=8
  736.                                         )
  737.  
  738.                                     [29] => Array
  739.                                         (
  740.                                             [app_name] => set
  741.                                             [app_data] => absolute_codec_string=PCMU,PCMA
  742.                                         )
  743.  
  744.                                     [30] => Array
  745.                                         (
  746.                                             [app_name] => limit_execute
  747.                                             [app_data] => db TQ_GW gw_TQ_GW 25 bridge [leg_timeout=30]sofia/gateway/TQ_GW/17027777777
  748.                                         )
  749.  
  750.                                 )
  751.  
  752.                         )
  753.  
  754.                     [caller_profile] => Array
  755.                         (
  756.                             [username] => 999999
  757.                             [dialplan] => XML
  758.                             [caller_id_name] => 999999
  759.                             [ani] => 999999
  760.                             [aniii] =>
  761.                             [caller_id_number] => 999999
  762.                             [network_addr] => 138.197.236.58
  763.                             [rdnis] =>
  764.                             [destination_number] => 17027777777
  765.                             [uuid] => 85126565-0fe4-4cd5-8993-384269e69f82
  766.                             [source] => mod_sofia
  767.                             [context] => default
  768.                             [chan_name] => sofia/default/999999@138.197.236.58
  769.                             [originatee] => Array
  770.                                 (
  771.                                     [originatee_caller_profiles] => Array
  772.                                         (
  773.                                             [0] => Array
  774.                                                 (
  775.                                                     [username] => 999999
  776.                                                     [dialplan] => XML
  777.                                                     [caller_id_name] => 999
  778.                                                     [ani] => 999999
  779.                                                     [aniii] =>
  780.                                                     [caller_id_number] => 9999999999
  781.                                                     [network_addr] => 138.197.236.58
  782.                                                     [rdnis] =>
  783.                                                     [destination_number] => 17027777777
  784.                                                     [uuid] => 655f9c95-7e47-49d0-87d9-6f75ea6004cc
  785.                                                     [source] => mod_sofia
  786.                                                     [context] => default
  787.                                                     [chan_name] => sofia/default/17027777777
  788.                                                 )
  789.  
  790.                                         )
  791.  
  792.                                 )
  793.  
  794.                         )
  795.  
  796.                     [times] => Array
  797.                         (
  798.                             [created_time] => 1518431471225841
  799.                             [profile_created_time] => 1518431471225841
  800.                             [progress_time] => 0
  801.                             [progress_media_time] => 1518431472605857
  802.                             [answered_time] => 1518431472745859
  803.                             [bridged_time] => 1518431472605857
  804.                             [last_hold_time] => 0
  805.                             [hold_accum_time] => 0
  806.                             [hangup_time] => 1518431477825836
  807.                             [resurrect_time] => 0
  808.                             [transfer_time] => 0
  809.                         )
  810.  
  811.                 )
  812.  
  813.         )
  814.  
  815. )
  816.  
  817. [2018-02-12 02:31:17] *********************** OUTBOUND CALL ENTRY END *************
  818. [2018-02-12 02:31:17] *************************** CDR ends ********************************
  819. [2018-02-12 02:31:17] Return cost 0.0300
  820. [2018-02-12 02:31:17] Return cost 0.0001
  821. [2018-02-12 02:31:17] Debit :0.0300 Cost : 0 Provider Cost : 0.0001
  822. [2018-02-12 02:31:17] *********************** OUTBOUND CALL ENTRY START *************
  823. [2018-02-12 02:31:17] INSERT INTO cdrs (uniqueid,accountid,type,callerid,callednum,billseconds,trunk_id,trunkip,callerip,disposition,callstart,debit,cost,provider_id,pricelist_id,package_id,pattern,notes,rate_cost,reseller_id,reseller_code,reseller_code_destination,reseller_cost,provider_code,provider_code_destination,provider_cost,provider_call_cost,call_direction,calltype,profile_start_stamp,answer_stamp,bridge_stamp,progress_stamp,progress_media_stamp,end_stamp,billmsec,answermsec,waitmsec,progress_mediamsec,flow_billmsec)  values ('85126565-0fe4-4cd5-8993-384269e69f82','131','0','999 <999>','17027777777','5',7,'138.197.236.58','117.247.91.162','NORMAL_CLEARING','2018-02-12 10:31:11','0.0300','0.0001',8,'2','0','^1702.*','USA','0.03000','0','0','',0,'^1702777.*','','0.00110','0.0001','outbound','STANDARD','2018-02-12 02:31:11','2018-02-12 02:31:12','2018-02-12 02:31:12','','2018-02-12 02:31:12','2018-02-12 02:31:17',5080,'1520','1380','1380','6600')
  824. [2018-02-12 02:31:17] Balance update : UPDATE accounts SET balance=IF(posttoexternal=1,balance+0.0300,balance-0.0300) WHERE id=131
  825. [2018-02-12 02:31:17] Balance update : UPDATE accounts SET balance=IF(posttoexternal=1,balance+-0.0001,balance--0.0001) WHERE id=8
  826. [2018-02-12 02:31:17] *********************** OUTBOUND CALL ENTRY END *************
  827. [2018-02-12 02:31:17] *************************** CDR ends ********************************
  828. ^C
  829. root@FS01:/var/log/astpp# mysql -h 138.197.236.58 -uroot -pd5YA6Vipec
  830. Welcome to the MySQL monitor.  Commands end with ; or \g.
  831. Your MySQL connection id is 80721
  832. Server version: 5.5.55-0+deb8u1-log (Debian)
  833.  
  834. Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  835.  
  836. Oracle is a registered trademark of Oracle Corporation and/or its
  837. affiliates. Other names may be trademarks of their respective
  838. owners.
  839.  
  840. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  841.  
  842. mysql> use astpp
  843. Reading table information for completion of table and column names
  844. You can turn off this feature to get a quicker startup with -A
  845.  
  846. Database changed
  847. mysql> select posttoexternal from accounts where id =8;
  848. +----------------+
  849. | posttoexternal |
  850. +----------------+
  851. |              1 |
  852. +----------------+
  853. 1 row in set (0.00 sec)
  854.  
  855. mysql> select posttoexternal,balance from accounts where id =8;
  856. +----------------+----------+
  857. | posttoexternal | balance  |
  858. +----------------+----------+
  859. |              1 | -0.00060 |
  860. +----------------+----------+
  861. 1 row in set (0.00 sec)
  862.  
  863. mysql> select posttoexternal,balance from accounts where id =8;
  864. +----------------+----------+
  865. | posttoexternal | balance  |
  866. +----------------+----------+
  867. |              1 | -0.00070 |
  868. +----------------+----------+
  869. 1 row in set (0.00 sec)
  870.  
  871. mysql>
  872.