XML Extend API: Request a URL to be displayed

Talk with others about developing applications for Switchvox

Moderators: bmdhacks, dpodolsky, tristand, jwitt, joshuas

XML Extend API: Request a URL to be displayed

Postby Matt87 » Thu Dec 08, 2011 9:01 am

Is it possible to send a request through the API to display a URL to a certain user/extension?
Matt87
Newsterisk
 
Posts: 3
Joined: Thu Dec 08, 2011 8:58 am

Re: XML Extend API: Request a URL to be displayed

Postby lorsungcu » Sun Dec 11, 2011 12:42 am

Where would you like the URL displayed? Are you trying to display the contents of a URL somewhere, or just the URL string?
lorsungcu
Oldsterisk
 
Posts: 116
Joined: Wed Mar 09, 2011 9:30 am

Re: XML Extend API: Request a URL to be displayed

Postby Matt87 » Mon Dec 12, 2011 8:52 am

First, thanks for your reply.


I am trying to have it displayed in the agent's existing custom switchboard panel, or pop up as a new panel/window. The url could be anything, but to keep it simple google. I would like to be able to send a command through the XML API to display www.google.com to an agent.
Matt87
Newsterisk
 
Posts: 3
Joined: Thu Dec 08, 2011 8:58 am

Re: XML Extend API: Request a URL to be displayed

Postby dpodolsky » Thu Dec 15, 2011 12:38 am

You just need to create a Switchboard Panel in the admin and then give the user access to display it in their Switchboard. We have an entire section in our Wiki showing you an example of how to do this. The example even includes using www.google.com like you requested:

http://developers.digium.com/switchvox/wiki/index.php/SwitchboardPanels_overview

Hope this helps.
dpodolsky
Oldsterisk
 
Posts: 325
Joined: Thu Apr 23, 2009 2:35 pm

Re: XML Extend API: Request a URL to be displayed

Postby Matt87 » Thu Dec 15, 2011 11:58 am

dpodolsky wrote:You just need to create a Switchboard Panel in the admin and then give the user access to display it in their Switchboard. We have an entire section in our Wiki showing you an example of how to do this. The example even includes using http://www.google.com like you requested:

http://developers.digium.com/switchvox/wiki/index.php/SwitchboardPanels_overview

Hope this helps.



Thanks for the tip, but i have already done that, I understand how to make a custom switchboard panel and give it an address like google. What i need is a way to communicate with the switchboard via the API. I need a url request to be sent via XML and change the url of the switchboard on the fly.
Matt87
Newsterisk
 
Posts: 3
Joined: Thu Dec 08, 2011 8:58 am

Re: XML Extend API: Request a URL to be displayed

Postby dpodolsky » Thu Dec 15, 2011 1:18 pm

I understand. Currently, the only event that tells the Switchboard to refresh is when a new call comes into the Switchboard.

If you want to change the URL in the Switchboard then you can/should do this outside Switchvox. Since the URL you display in the Switchboard is under your control you could write some simple Javascript that did an AJAX request back to a server to see if it needed to refresh. You could make this happen every 5 seconds, or use something like COMET to do it on demand.

If you want refresh a page you don't control (like google.com) then you will point to your own URL (server) and then put google.com in an IFRAME. Your page will do the checks like I recommended above and then refresh the page in the Iframe.

There is plenty of information online about refreshing a webpage on demand.

Hope this helps.
dpodolsky
Oldsterisk
 
Posts: 325
Joined: Thu Apr 23, 2009 2:35 pm


Return to Switchvox Developers

Who is online

Users browsing this forum: No registered users and 1 guest