Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
359 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 Malmstead earned 2000 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

Eye-catchers on the conference table

Challenge: The i-unit group was not satisfied with the audio quality during remote meetings. They were looking for a portable solution with excellent audio quality for use in their conference room but also at their client’s offices.

Question has a verified solution.

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

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…
Article by: user_n
How Sip Phone (User Agent) works and communicates with sip servers 1.  There is a sip server and a sip registrar.  The sip server and sip registrar can be one server or two different servers. The sip registrar is the server on which it is record…
Integration Management Part 2
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

886 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