Page 1 of 1

[SOLVED]How to Invoke/Call third party software

PostPosted: Fri Feb 03, 2012 2:44 pm
by mcdeeiis
I am a newbie... I am sure some has asked this question before... but is there a way to call another app when an agent gets a call? For example, I have a EXE(windows) that I need to call as soon as the agent gets a call. If it is possible, can it also send parameters to this exe say phone#, account# etc.
Thanks,
Deepak

PostPosted: Tue Feb 07, 2012 4:03 pm
by williamconley
Not within the Vicidial system. Vicidial can cause the agent screen to Pop a web browser, however, so if you can figure out how to get a web browser to "call another app" on the agents machine (with some serious permissions changes) ...

PostPosted: Fri Feb 17, 2012 3:01 pm
by mcdeeiis
I finally was able to solve this one.

Problem : We have an in-house VB application that takes information from our existing dialer and displays the relevant information from sql server. Vicidial can only open URL and I want a way to open my existing vb exe.

Solution:
Requirement -
1. Agent PC with IIS installed(Yes, you will need to configure IIS on each agent pc)
2. VB exe on local agent pc.
3. And the Classic ASP code(see below)

Copy this piece of code in a test file and change the extension to ".asp". Save this file to say C:\Inetpub\wwwroot\OpenExeAsp folder. Make this folder as Virtual Folder (Check this link on howto: http://support.microsoft.com/kb/172138) . Name this virtual directory same as the folder name.
Now open IE and enter something like this: http://localhost/OpenExeAsp/sample.asp (where sample.asp is the name of file where you saved the code)

This code fetches 5 parameters from the querystring, calls the exe and passes the parameter as an argument and closes the webpage. So please feel free to modify this according to you requirement.

pm me if anyone needs any help with this code.

Code: Select all
<%@ Language=VBScript %>
<HTML>
<HEAD>

<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<%
Dim sMainQry
%>

<script language="VBScript">
   Sub Scan()
      Dim theform
      set theform = document.forms("frmOne")
      Set objShell = CreateObject("Wscript.Shell")
      
      objshell.Exec "C:\Program Files\AgentExe\" & theform.AgentExe.Value & " ~" & theform.AgentID.Value & " ~TEST~" & theform.OrgID.Value & "~" & theform.RecordingFileName.Value & "~" & theform.ServerName.Value & "~" & theform.DBName.Value & "~"
      'objshell.Exec "C:\" & theform.AgentExe.Value & " ~TEST~" & theform.OrgID.Value & "~" & theform.RecordingFileName.Value & "~" & theform.ServerName.Value & "~" & theform.DBName.Value & "~"
      theform.submit()
   End Sub
</script>
</HEAD>
<BODY onload="javascript:window.open('', '_self', '');">
<%
sMainQry = ""
%>
<form id="frmOne" onsubmit="javascript:window.close();">
<input type="hidden" name="AgentExe" value="<%=Request.Querystring("AgentExe")%>">
<input type="hidden" name="ServerName" value="<%=Request.Querystring("ServerName")%>">
<input type="hidden" name="DBName" value="<%=Request.Querystring("DBName")%>">
<input type="hidden" name="OrgID" value="<%=Request.Querystring("OrgID")%>">
<input type="hidden" name="AgentID" value="<%=Request.Querystring("AgentID")%>">
<input type="hidden" name="DialedPhone" value="<%=Request.Querystring("DialedPhone")%>">
<input type="hidden" name="RecordingFileName" value="<%=Request.Querystring("RecordingFileName")%>">

<button onclick="Scan" id=button1 name=button1 type=submit>Open AGENT EXE</button>
<% Response.Write(sMainQry) %>
</form>
</BODY>
</HTML>

PostPosted: Fri Feb 17, 2012 3:27 pm
by mflorell
Thank you very much for posting this. If you can please also post it to a ticket in the Issue Tracker so that others can find it easily in the future.

PostPosted: Fri Feb 17, 2012 5:31 pm
by williamconley
Did you say you actually had to install IIS on each Workstation? Wow. But if it works ... it works! LOL

Re: [SOLVED]How to Invoke/Call third party software

PostPosted: Mon Nov 12, 2012 9:10 am
by nonlinearly
And what if the application we want is already open? It's a waste of time to close and open the application in every call!!!

Re: [SOLVED]How to Invoke/Call third party software

PostPosted: Mon Nov 12, 2012 4:16 pm
by williamconley
If you have an open application that you want to "affect" in some fashion from within a web browser, it is generally necessary that the application be designed to accept API or similar commands. Once those commands are known, convincing the web browser to issue those commands is similar to a "click to dial" scenario. With click to dial in many situations the "web plugin" will issue a sip:// command locally, and the sip phone will catch that request and act accordingly.