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
351 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sender charges for calling my magicJack Plus service? 3 57
call centre operations 2 105
Need manual for NEC 92753A phone 5 101
CIsco 3560 with Polycom vvx 400 21 86
The point of this post is to give you a copy/paste installation solution to setting up Asterisk 1.6 on Ubuntu 9.04 (or similar) server. # Setup the system apt-get install subversion apt-get install make apt-get install linux-source kernel-p…
In my office we had 10 Cisco 7940G IP phones that were useless as they were showing PROTOCOL APPLICATION INVALID when started. I searched through Google and worked for a week continuously on those phones, and finally got them working. This is a di…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

932 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