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
350 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
  • 3
5 Comments
 
LVL 25

Accepted Solution

by:
Ron M 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 M
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 M
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

There are no good configuration guides for HP-H3C router to LYNC on the web. :( Big statement, but we havent been able to find one yet. We did find the following document useful, but the information was not enough to use H3C router for use as a L…
I recently purchased a Bluetooth headset called the Music Jogger (model BSH10). The control buttons on it look like this: One of my goals is to use it as the microphone and speakers for Skype calls. In that respect, it works well. However, I …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now