Web-based Screen Pop

From VESupport

(Difference between revisions)
Jump to: navigation, search
Line 30: Line 30:
Here is another
Here is another
-
Background
 
-
OPC (and I guess Global Telelinks now) want to be able to use Border Elements, but need a way to notify people that they have calls. So we thought, we'd just build something out and give them the code (or run something as a service).
 
-
 
-
Generally with AJAX, you have the client poll constantly -- the issue with that is that there can be a delay in getting the screenpop, and that can cause a lot of load on the server.
 
-
 
-
To solve this we wrote a Comet application so that the client is notified whenever a call comes in.
 
-
 
-
How it Works
 
-
We have the client make an asynchronous request using Javascript (it calls Check.nfy -- passing it's Agent ID) to the web server asking if there is anything assigned to it for that particular agent. It times out after 60 seconds (client side). I have some neat logic built in so that if for some reason the request gets cancelled and returns early, it will immediately open up a new request.
 
-
 
-
We set up the web server so that it handles any requests to *.nfy asynchronously.  This is essential because, IIS can only handle a couple hundred synchronous requests at a time.
 
-
 
-
When the server gets a request from a client, it checks shared memory to see if there is anything pending and then creates a new instance of a manual reset event and waits up to 60 seconds before it is either triggered or times out.
 
-
 
-
When the IVR wants to notify a client that there is a call waiting for it, it just makes an HttpRequest to notify.nfy and passes a few different parameters (more on that below).  When the web server gets the request it stores it into shared memory.
 
-
 
-
We have a separate thread that checks the shared memory every few milliseconds (I think it's set to 10 or 20) to see if there are any messages for any of the agents that are connected.  If there are any messages available for any waiting agents, it triggers the reset event, and the messages goes off to the agent.
 
-
 
-
It's really fast, and seems like it should be pretty flexible, and easy for our customers to use.
 
-
 
-
If you want to test it out:
 
-
Go to http://screenpop.voiceelements.com/
 
-
 
-
The username is test@test.com and the password is test
 
-
 
-
When you log in, you'll see a real ugly blank page, that just says "Waiting".  We purposely kept it ugly, because we didn't want OPC or Global Telelinks to think that we wanted anything to do with their app.
 
-
 
-
Then when you want to force it to open up a new window, call something like this:
 
http://screenpop.voiceelements.com/notify.nfy?AgentId=1&Url="ParameterTest.aspx?Name=Ron Tanner?Product=HmpElements"&Height=600&Width=600
http://screenpop.voiceelements.com/notify.nfy?AgentId=1&Url="ParameterTest.aspx?Name=Ron Tanner?Product=HmpElements"&Height=600&Width=600
-
The required fields are AgentId and Url.  Please note that you can pass any URL there (say "http://www.lds.org").  So that we can pass parameters on to the webpage, you'll want to wrap up everything in quotes (like above).
 
Optional Parameters are Height and Width (which specify how big you want the new browser window).  
Optional Parameters are Height and Width (which specify how big you want the new browser window).  

Revision as of 22:10, 27 June 2012

Contents

Background

Many of our clients want to be able to use Voice Elements, but need a way to notify people that they have calls. So we thought, we'd just build something out and give them the code (or run something as a service).

Generally with AJAX, you have the client poll constantly -- the issue with that is that there can be a delay in getting the screenpop, and that can cause a lot of load on the server.

To solve this we wrote a Comet application so that the client is notified whenever a call comes in.

How it Works

We have the client make an asynchronous request using Javascript (it calls Check.nfy -- passing it's Agent ID) to the web server asking if there is anything assigned to it for that particular agent. It times out after 60 seconds (client side). I have some neat logic built in so that if for some reason the request gets cancelled and returns early, it will immediately open up a new request.

We set up the web server so that it handles any requests to *.nfy asynchronously. This is essential because, IIS can only handle a couple hundred synchronous requests at a time.

When the server gets a request from a client, it checks shared memory to see if there is anything pending and then creates a new instance of a manual reset event and waits up to 60 seconds before it is either triggered or times out.

When the IVR wants to notify a client that there is a call waiting for it, it just makes an HttpRequest to notify.nfy and passes a few different parameters (more on that below). When the web server gets the request it stores it into shared memory.

We have a separate thread that checks the shared memory every few milliseconds (I think it's set to 10 or 20) to see if there are any messages for any of the agents that are connected. If there are any messages available for any waiting agents, it triggers the reset event, and the messages goes off to the agent.

It's really fast, and seems like it should be pretty flexible, and easy for our customers to use.

How To Test It Out

Here is how to test it out:

Agent

You can bring up as many agents as you wish. Just make sure they each have a unique AgentId. In your browser go to this link: http://screenpop.voiceelements.com?AgentId=12345 This will open an ugly web page that just says "Waiting". You can just minimize this web page - you won't need to interact with it.

IVR

When you have a screen to pop to a particular agent, then the IVR can send the following URL. For testing purposes you can open up a separate browser and key in the URL. http://screenpop.voiceelements.com/notify.nfy?AgentId=12345&Url="http://www.yahoo.com"&Height=600&Width=600

Here is another http://screenpop.voiceelements.com/notify.nfy?AgentId=1&Url="ParameterTest.aspx?Name=Ron Tanner?Product=HmpElements"&Height=600&Width=600


Optional Parameters are Height and Width (which specify how big you want the new browser window).

Keep in mind that most browsers block popup windows, so you'll have to allow from the website, and then try again.

Optional Parameters are Height and Width (which specify how big you want the new browser window).

Keep in mind that most browsers block popup windows, so you'll have to allow from the website, and then try again. In the case of the Chrome browser after you have allowed pop-up always from this site, you will have to close that browser and re-open it to work.

Personal tools