Page 1 of 1

Call duration error again

Posted: 28 Nov 2019 05:39
by Lucy
Ok. So i have scripts for incoming and outgoing. They are exact same except glovars different to store seperate values.
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?

Re: Call duration error again

Posted: 28 Nov 2019 18:08
by Desmanto
Your start time is blank. I wonder what happen, that cause the glovar start time is not assigned value properly.
Try to check your starting trigger for the incoming call, use debug dialog to see if the value is assigned properly. Try not add/enable the end trigger first.

Re: Call duration error again

Posted: 28 Nov 2019 23:25
by Lucy
Ok thanks darlin after work i will have a look... oh yeah i see that in the error😂 i missed that.. thanks