My outgoing scripts work a treat and give me:
On init script
-start time and date
-caller id
End script same with duration calculation.
However when i use the scripts on incoming it errors!!??
Code: Select all
//start script
global_call_start_time_inc = triggertime;
global_contact_incoming = {contact_name};
global_contact_incoming2 = {incoming_number};
date = getDate();
global_call_start_inc_date =
"{date,dateformat,EEEE, dd/MMM/yyyy, hh:mm:ss a}";
//end script
global_call_end_time_inc = triggertime;
global_talktime = (global_call_end_time_inc - global_call_start_time_inc);
global_talktime_str_inc = getDurationString(global_talktime);
date = getDate();
global_call_end_inc_date =
"{date,dateformat,EEEE, dd/MMM/yyyy, hh:mm:ss a}";
//ERROR RECEIVED
//28.11.2019 16:31:46.551 [Call inc (end)] End executing action 'Script: //end script global_call_end_time_inc = triggertime; global_talktime = (global_call_end_time_inc - global_call_start_time_inc); global_talktime_str_inc = getDurationString(global_talktime); date = getDate(); global_call_end_inc_date = "{date,dateformat,EEEE, dd/MMM/yyyy, hh:mm:ss a}";' and exception can not apply operation - to values '1574919102106' and '' (Expression: global_call_end_time_inc - global_call_start_time_inc[line 2])
//28.11.2019 16:31:46.552 [Call inc (end)] Flow ends execution due to errors
//28.11.2019 16:31:46.555 [Call inc (end)] Error:
//ch.gridvision.ppam.androidautomagic.simplelang.a.d: can not apply operation - to values '1574919102106' and '' (Expression: global_call_end_time_inc - global_call_start_time_inc[line 2])
Lol what simple error am i making in this ever so easy script?