cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
378
Views
0
Helpful
0
Replies

Macro to show output of "x.command Time DateTime Get" on VC screen

mayank-trivedi
Level 1
Level 1

Requirement : Macro to show output of "x.command Time DateTime Get" on VC screen

 

Hi Team,

I have created below script to show output of command "x.command Time DateTime Get" on VC screen, however it is not working.

Please can you advice what I'm missing ?

 

ce version :9.9.2

 

Script


const xapi = require('xapi');

function Date_Time() {

time = xapi.command ('Time DateTime Get');

xapi.command ('userinterface Message Textline Display', {X: 9400, Y: 500, Text:time});
}

function checkTime(i) {
if (i < 10) {i = "0" + i} // add zero in front of numbers < 10
return i;
}


xapi.event.on('CallSuccessful', Date_Time);
xapi.event.on('CallDisconnect', Date_Time);

 

Regards,

Mayank

0 Replies 0