iframe, Agent Events Push

Discussions about development of VICIDIAL and astGUIclient

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

iframe, Agent Events Push

Postby vicinewman » Wed Jun 06, 2018 11:53 am

During the development we've got an issue with correct handling of a situation when a page, with an Iframe, is closed by a user.
We don't see an event (logged_out_complete, get2post callback).

It looks like it's just too little time for the iframe/script to sent this event.

Any tips how to correct handle this ?
vicinewman
 
Posts: 14
Joined: Tue Feb 20, 2018 1:33 pm

Re: iframe, Agent Events Push

Postby mflorell » Wed Jun 06, 2018 1:33 pm

If you put vicidial.php in an IFRAME, and the main browser window is closed, it won't trigger the closed event. That's not an issue with the IFRAME, it's just how web browsers work.
mflorell
Site Admin
 
Posts: 17040
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: iframe, Agent Events Push

Postby vicinewman » Thu Jun 14, 2018 6:04 am

Yes of course, I understand this, that is why the next question - how to deal with the problem when the browser is closed for some reason?

In this case we have a "hanged agent" in the system. Some call could be routed to this “hanged agent”.
Any tips how to understand that there is “hanged agent” to make some further actions like remove it from system call routing, etc … ?
vicinewman
 
Posts: 14
Joined: Tue Feb 20, 2018 1:33 pm

Re: iframe, Agent Events Push

Postby mflorell » Thu Jun 14, 2018 8:08 am

When we have run into this, we added similar onunload functions to the main web page, including a call to the Agent API to log the agent out.

If you want to go a more direct route, take a look at the code for Emergency Logout of an agent that runs in the admin.php script. It's a lot more complicated, but it does take care of most log issues.
mflorell
Site Admin
 
Posts: 17040
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: iframe, Agent Events Push

Postby vicinewman » Thu Jun 14, 2018 9:05 am

Thanks Matt for the prompt reply!
we will try this way
vicinewman
 
Posts: 14
Joined: Tue Feb 20, 2018 1:33 pm


Return to Development

Who is online

Users browsing this forum: No registered users and 5 guests