Solved

What is the best solution to allow my users of my CRM application to click on a phone number and dial that phone number?

Posted on 2009-03-31
5
357 Views
Last Modified: 2013-12-27
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.
0
Comment
Question by:wcunningham
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 25

Accepted Solution

by:
Ron Malmstead earned 500 total points
ID: 24033838
I use shell command through VBA with x-lite.

'dial the number
Shell (g_strXLitePath & " -dial=" & txtLeadPhone), vbMinimizedNoFocus
'minimize x-lite
SendKeys "%{ }{n}"

The other option would be to have the server initiate the call....and send the call to a meetme() application upon connection.  You could also make asterisk an auto dialer with using call files.

I preferred not to use the server to initiate the calls, because there was a lot of work involved with using the AMI, or other, in order to control the callflow and recieve/process events.  Since i'm not using asterisk as an auto dialer..it wasn't necessary for me.  My CRM is an ms access .ade application with SQL backend.

There's really a lot of ways to do it...and it all depends on your needs for controlling/reporting call flow, and the programming language you are using.
0
 

Author Comment

by:wcunningham
ID: 24038199
xuserx2000,
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?
0
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 24041223
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.
0
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 28244937
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.

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 
 

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
Why do some people recommend buying business VoIP from an ISP? What are the benefits to my company? What are the costs?
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question