Open an URL with call parameters from SwyxIt. (kb3410)
The information in this article applies to:
- SwyxIt! v6.02
SwyxIt! skins support shortcut keys to start arbitrary programs. This article explains how to open an URL containing call parameter such as the caller number.
SwyxIt itself is not able to insert call parameter into the command line of a shortcut key. However, it is still possible by using the following trick.
Write a short vbscript which uses SwyxIt!-API to retrieve call parameter, compose the URL and open it.
The following example shows how to retrieve the caller number for an active or incoming call, to build a URL and open in t. The script queries SwyxIt for the currently selected line, retrieves the caller number, appends it to a predefined URL and opens it:
' url to open
szURL = "http://example.com/dosomething.aspx?caller="
' get SwyxIt Line Manager object
set clmgr = WScript.CreateObject("CLMGR.ClientLineMgr")
' get currently selected line
set oLine = clmgr.DispSelectedLine
szNumber = oLine.DispPeerNumber
' open URL
set oWsh = WScript.CreateObject("WScript.Shell")
oWsh.Run szUrl + szNumber
Save the script somewhere on the client's harddisk, e.g. as openurl.vbs. In SwyxIt! configure a shortcut key to execute the following command-line:
Change the path to the script as necessary. A click on that shortcut key opens the URL defined in the script in the standard-webbrowser with the callernumber as parameter, e.g.
The whole client API is available in the script. You can retrieve any other available parameter. E.g. to retrieve the call ID os the current call as it is written into the Call Detail Record on the server you can use
szCallID = oLine.DispCallID
Details about the Client-API with sample code can be found here: SwyxIt! v6.02 Client SDK (kb3373)