wcunningham
asked on
What is the best solution to allow my users of my CRM application to click on a phone number and dial that phone number?
I am trying to create a phone dialer exactly like what you find here: http://www.leads360.com/products/integrated-dialer.aspx I want to be able to collect all of the information you see in the example link as well. Call start time, length of call, end time, etc.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
For an ASP page, you could create a //file: URL .... to point to x-lite path... with -dial 5555555555
Of course the display of the URL would simply be the phone number, which users click on to execute x-lite with the -dial switch.
You will have to check permissions for launching an executeable from a webpage.....probably add the site to trusted sites and lower security for trusted sites for it to work.
Of course the display of the URL would simply be the phone number, which users click on to execute x-lite with the -dial switch.
You will have to check permissions for launching an executeable from a webpage.....probably add the site to trusted sites and lower security for trusted sites for it to work.
Here is a an executeable file, that you can use serverside to execute a call against the AMI.
This is done in vb.net, so just compile it as an exe, and use it on the site.
USAGE: call.exe -c:{numbertocall} -p:{calleridnumber} -g:{agentgroupname} -t:{tablename} -a:{account} -r:{recordid} -u:"{agentname}" -ai:{asteriskipaddress} -ap:{managerportnumber} -au:{asteriskmanageruser} -as:{managersecret}
You will notice that some variables are set on this command....these can be useful to reference the exact customer record, or agent information tables...from the dialplan.
variable: callednumber=" & phonenumber & "|groupname=" & groupname & _
"|tablename=" & tablename & "|record=" & record & "|account=" & account
These will be accessible from the dialplan as channel variables....
${groupname} - group id or name the agent belongs to.
${tablename} - tablename the record was retrieved from.
${account} - account type name or id that the the record belongs to.
${record} - record ID number for the customer record.
${agent} - agent name or ID number.
This is done in vb.net, so just compile it as an exe, and use it on the site.
USAGE: call.exe -c:{numbertocall} -p:{calleridnumber} -g:{agentgroupname} -t:{tablename} -a:{account} -r:{recordid} -u:"{agentname}" -ai:{asteriskipaddress} -ap:{managerportnumber} -au:{asteriskmanageruser} -as:{managersecret}
You will notice that some variables are set on this command....these can be useful to reference the exact customer record, or agent information tables...from the dialplan.
variable: callednumber=" & phonenumber & "|groupname=" & groupname & _
"|tablename=" & tablename & "|record=" & record & "|account=" & account
These will be accessible from the dialplan as channel variables....
${groupname} - group id or name the agent belongs to.
${tablename} - tablename the record was retrieved from.
${account} - account type name or id that the the record belongs to.
${record} - record ID number for the customer record.
${agent} - agent name or ID number.
Imports System.Text
Imports System.Net.Sockets
Module Module1
Dim phonenumber As String = ""
Dim tablename As String = ""
Dim record As String = ""
Dim userid As String = ""
Dim account As String = ""
Dim groupname As String = ""
Dim callerid As String = ""
Dim asteriskip As String = ""
Dim asteriskport As String = ""
Dim asteriskusername As String = ""
Dim asterisksecret As String = ""
Sub Main(ByVal args As String())
For Each arg As String In args
'call arguments
If arg.ToString.StartsWith("-p:") = True Then phonenumber = arg.ToString.Replace("-p:", "")
If arg.ToString.StartsWith("-t:") = True Then tablename = arg.ToString.Replace("-t:", "")
If arg.ToString.StartsWith("-r:") = True Then record = arg.ToString.Replace("-r:", "")
If arg.ToString.StartsWith("-u:") = True Then userid = arg.ToString.Replace("-u:", "")
If arg.ToString.StartsWith("-a:") = True Then account = arg.ToString.Replace("-a:", "")
If arg.ToString.StartsWith("-g:") = True Then groupname = arg.ToString.Replace("-g:", "")
If arg.ToString.StartsWith("-c:") = True Then callerid = arg.ToString.Replace("-c:", "")
'conect arguments
If arg.ToString.Contains("-ai:") = True Then asteriskip = arg.ToString.Replace("-ai:", "")
If arg.ToString.Contains("-ap:") = True Then asteriskport = arg.ToString.Replace("-ap:", "")
If arg.ToString.Contains("-au:") = True Then asteriskusername = arg.ToString.Replace("-au:", "")
If arg.ToString.Contains("-as:") = True Then asterisksecret = arg.ToString.Replace("-as:", "")
Next arg
Dim message As String = ""
message = message & "action: Login" & vbCrLf
message = message & "username: " & asteriskusername & vbCrLf
message = message & "secret: " & asterisksecret & vbCrLf
message = message & "events: off" & vbCrLf & vbCrLf
message = message & "action: Originate" & vbCrLf
message = message & "channel: Local/" & phonenumber & "@tmoutbound" & vbCrLf
message = message & "context: YOURCONTEXT" & vbCrLf
message = message & "exten: YOUREXTENSION" & vbCrLf
message = message & "priority: 1" & vbCrLf
message = message & "callerid: " & callerid & vbCrLf
message = message & "timeout: 25000" & vbCrLf
message = message & "variable: callednumber=" & phonenumber & "|groupname=" & groupname & _
"|tablename=" & tablename & "|record=" & record & "|agent=" & userid & "|account=" & account & vbCrLf & vbCrLf
Dim oSocket As New System.Net.Sockets.TcpClient()
Dim Buffer As Byte()
Buffer = Encoding.ASCII.GetBytes(message)
Try
Dim astriskipint As Integer = CInt(asteriskport.ToString)
oSocket.Connect(asteriskip, astriskipint)
If oSocket.Connected = True Then
oSocket.Client.Send(Buffer, Buffer.Length, SocketFlags.None)
End If
Catch ex As Exception
End Try
End Sub
End Module
ASKER
thanks for your response. Not sure where to start though. My application is written in ASP with MS SQL backend. I am pretty good with ASP and VBScript, but not as savy with other programming languages although I can usually figure things out with some guidance and example code.
I would like to add a Click-to-Dial link to all the phone numbers in my CRM. Click-to-Dial mode, would instantly connect the agent and begins dialing the prospect, automatically handling the dialing and call disposition. It eould also provide a complete audit history with built-in reporting to aid in client teams management. I hope this helps you understand what I am looking to do.
Any chance you could guide me into a more specific solution based on this comment?