I'm trying to create a button on finesse agent desktop to Pause and Resume media sense recording.
I'm up to the point where I need to get a cookie from finesse.
In the Finesse Javascript library I can see a getCookie function
I need to get the JSESSIONID cookie after an api call from Finesse to Mediasense.
I tried calling the function using
var cookievar = getCookie("JSESSIONID");
but it gives error :
Uncaught ReferenceError: getCookie is not defined
Do i need to copy this function and put it into my own javascript file? or will it recognise the function from finesse.js?
The purpose of getting the JSESSIONID is to use it in the next api call which will be a getSessions to media sense to get the sessionid for the agent's session with media sense.
Once I have the sessionid, I can then make the api call to pause and resume the recording on media sense from finesse.
Can anyone provide any advice on how to get the cookie, and then into a variable?