#1  
Old 2006-06-11, 04:11 AM
JayL JayL is offline
Senior Member
 
Join Date: May 2005
Posts: 37
Default Windows Phone Dialer

It would be great if I could highlight a Sugar telephone number (I'm hosted on the Internet), push a button and have my Windows XP TAPI phone dial out. This would save lots of time, be more accurate and make Sugar a much more attractive product. If anyone knows of a third party product that does this this would help me now.

Thanks, Jay
Reply With Quote
  #2  
Old 2006-06-12, 10:26 AM
stevec stevec is offline
A Sugar Hero
 
Join Date: Oct 2005
Location: London
Posts: 1,034
Default Re: Windows Phone Dialer

Hi,

I've managed to put together a simple dialler here. Not properly tested but it's fairly simple to implement without any cost. This is for an XP workstation.

First, modify the appropriate html file where you wish to have the phone numbers linked. For example, Accounts/DetailView.html. Add a hyperlink for the phone number in a manner similar to that for the website - but use the "callto;" predicate rather than the "http://" predicate.

For testing, it might be simpler to create your own html file with the callto in there. eg.:

Code:
<HTML>
<HEAD><TITLE>Test</TITLE>
</HEAD>
<BODY>
<a href="callto:918005555555">18005555555</a>
</BODY>
</HTML>
Note - adding the '9' for the local PABX - as dialer.exe does not do this for you.

Second. Create a vb script to handle the callto. Lets call it c:\dial.vbs You need to do this as the parameter passed to the callto handler includes the "callto:" predicate which needs stripping off.

Code:
dim phone, param, plen
param = WScript.Arguments.Item(0)
plen = len(param)-7
phone = right(param,plen)
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run ("c:\dial.exe " & phone)
Third, alter the handler to handle calltos. In control panel, go to folder options / file types. Find the "URL: callto: Protocol" handler file type (it will have none as the extension and be near the top). Click on advanced, and edit the 'open' action and change it so the application used is like

C:\WINDOWS\system32\wscript.exe C:\dial.vbs "%1"

Forth: In the vbs script you'll notice the call to dial.exe. This is a free application that allows you to run the windows built in dialer.exe but without the main interface - and call a phone number via a passed parameter.

You can get it at:

http://www.iansharpe.com/art_dial.php

(Don't worry about the start menu shortcuts stuff - you don't need to set anything like that up - just get the dial.exe app.)


Finally, in control panel, open phone and modems and go to advanced. Make sure the TAPI interface for your phone is set up correctly. Then fire up the XP dialer (dialer.exe in the start/run tool should do it) - then go to edit/options and set up your phone. For mine - a TAPI link to a physical mitel IP phone - I set preferred line for calling to 'phone' and picked the mitel phone from the line used for 'phone calls'. (You can test you have dialer set up correctly by using the main dialer interface to place a call).

Now I can click on a phone number in sugar, my phone rings and once picked up, I'm calling the number in sugar.

The one issue we have is that the dialer app doesn't know how to intelligently handle international dialing and stripping out various superfluous characters ('-' etc) so we need to ensure all numbers are accurately formatted.

BINGO.

Last edited by stevec; 2006-06-12 at 10:28 AM.
Reply With Quote
  #3  
Old 2006-06-13, 04:23 PM
JayL JayL is offline
Senior Member
 
Join Date: May 2005
Posts: 37
Default Re: Windows Phone Dialer

What you're saying seems to make sense. I'll give it a try. Although it seems like I'll have to go into the Sugar php display code and preface my phone number outputs with an <href tag>. This may take care of my problem today but I'll also have to modify every succedding upgrade to Sugar. In any case this feature is important enough to me (and your solution cost effectively implementable) that I will give it a serious try. I'll get back to you in a few days after I've had an opportunity to build this stuff (I have to install VB). Thanks again.
Reply With Quote
  #4  
Old 2006-06-13, 05:14 PM
stevec stevec is offline
A Sugar Hero
 
Join Date: Oct 2005
Location: London
Posts: 1,034
Default Re: Windows Phone Dialer

Hi,

You'll need to modifiy the related .html termplate file - not the php code itself. it's not too bad - only one line to repatch each time.
Reply With Quote
  #5  
Old 2006-10-30, 12:19 PM
janmartin janmartin is offline
Junior Member
 
Join Date: Oct 2006
Posts: 4
Default Re: Windows Phone Dialer

Hi all,

right now when a callto://0049891234456 link is clicked skypeout makes the connection by VoIP.

But sometimes I need to make 60 calls by telephone line, not VoIP, using the same callto:// link.

My idea is to alter the "URL: callto: Protocol" handler to a switch like this:
C:\WINDOWS\system32\wscript.exe C:\calltoswitch.vbs "%1"

The calltoswitch.vbs Version one: Pass right through.
dim phone
phone = WScript.Arguments.Item(0)
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run ("C:\Program File\Skype\Phone\Skype.exe callto:" & phone)

The calltoswitch.vbs Version two: Switch
dim phone
phone = WScript.Arguments.Item(0)
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run ("c:\whatever.exe " & phone)

Obviously I do not know vbs.

Then a simple .bat file could be used to substitute the vbs files and so switch the program that finaly gets the callto://
(And back)

subsitute.bat
copy c:\calltoswitch.vbs c:\off1
copy c:\off2\calltoswitch.vbs c:\
copy c:\off1\calltoswitch.vbs c:\off2

Obviously I am really bad with shell too...

How to realise the whatever.exe part and hardware? (WhichCLI analog Phone or USB to PSTN Adapter?)

I have a Windows XP Laptop and this is for a single place (mine) only.
Any ideas on this?

Jan
Reply With Quote
  #6  
Old 2006-10-31, 02:18 AM
jlduran jlduran is offline
Senior Member
 
Join Date: Jul 2006
Posts: 30
Default Re: Windows Phone Dialer

Did you check out the Asterisk-SugarCRM Integration Module?

http://www.sugarforge.org/projects/asterisk-int/


Quote:
Originally Posted by JayL
It would be great if I could highlight a Sugar telephone number (I'm hosted on the Internet), push a button and have my Windows XP TAPI phone dial out. This would save lots of time, be more accurate and make Sugar a much more attractive product. If anyone knows of a third party product that does this this would help me now.

Thanks, Jay
Reply With Quote
  #7  
Old 2006-10-31, 07:34 AM
janmartin janmartin is offline
Junior Member
 
Join Date: Oct 2006
Posts: 4
Default Re: Windows Phone Dialer

No I didn't.

There already is a CRM (done Lotus Notes) so no need for Sugar.
I am looking for a solution for 1 Person only.
So setting up Asterisk seems to be a bit of an overkill.

Anyone aware of a device that connects to PC/Laptop by USB and on the other end to a plain old telephone line?
And the accepts numbers in this fashion:
c:\whatever.exe 0049891234567

Jan
Reply With Quote
  #8  
Old 2006-10-31, 11:28 AM
chrisky chrisky is offline
A Prolific Poster
 
Join Date: Aug 2006
Location: Trondheim, Norway
Posts: 293
Cool Re: Windows Phone Dialer

Quote:
Originally Posted by janmartin
No I didn't.
There already is a CRM (done Lotus Notes) so no need for Sugar.
I am looking for a solution for 1 Person only.
So setting up Asterisk seems to be a bit of an overkill.
Anyone aware of a device that connects to PC/Laptop by USB and on the other end to a plain old telephone line?
And the accepts numbers in this fashion:
c:\whatever.exe 0049891234567
Jan
Jan,

First, I kinda liked your comment of asterisk being overkill... that's one good way of putting it for many..
I'd say it's a can of worms which makes SugarCRM look like peanuts..

As per your question regarding a USB to POTS interface... I' can't remember with any certainty; however, I want to say that I've seen one over the past year and a half, but I could be mixing things up memory wise, and be thinking of a usb interface for audio (input & output).

The fact that you brought up the topic of interfacing a computer to POTS....
Well, an ol'fashion voice modem would likely be your best bet hardware wise....

If you want to screw around with headaches in regards to interfacing with a computer in which utilizes VOIP, there are products out there, as well as self-constructable adapters in which you can interface commercial telephone headsets to the microphone and speaker audio connections of a computer. I highly reccomend against such, though it can and does work, all the problems which will be entailed don't outweigh or justify the $100 saved opposed to purchasing a VOIP phone.

For minimal dialing in which you use your computer and POTS, then you will want to procure a decent HARDWARE voice modem. Your local scrap computer junkyard, used stores, ebay, etc. are the best place to search for these. I won't get into the technicals regarding ol'ISA, newer PCI, etc. buses, but if your running a newer system, and especially if it's a notebook, you'll probably have to look at an external serial modem..

From 90 or early 90's and on, I used alot of USR's, with my most memorable being an external usr 9600baud, great modems..

I have no clue what exists today for hardware modems, but am pretty confident that they've essentially been phased out and are a rarity, though I'm sure they are stil available new, like the [3Com Couriers we used alot commercially for remote locations]; however, such won't be cheap..

On this whole topic of dialing out via POTS thru the client/users computer, from SugarCRM..
My suggestion would be to code a client side daemon in which listens on some uncommong port number, i.e. 51001 or something, lol..
Modify Sugar views in order to have a dial link/icon in which refers to a url such as http://localhost:51001/dial.php?6112459819 or http://127.0.0.1:51001/dial.php?3219191234 or similar.

In a sugarcrm multi-user environment, for compatibility purposes, you might have the dial link/icon point or refer to a custom coded php module in which you add to the sugarcrm installation, whereby the phone number is passed to this php module via posting it, for the simplest method.

Then this custom app would check sugarcrm user and/or system settings & preferences to determine how to handle the dialing and where to send that phone number.. If a preference setting is enabled to allow or use client machine tapi dialing, then the custom php module would then want to pop up a new [and small] browser window and proceed to pass that phone number to the client machine using a localhost or 127.0.0.1 url.

I could really go on, but I've spent enough time, making what point... I don't know... lol

Realistically, it's more beneficial for you to just scratch the idea of sugarcrm->computer->pots integration, and pursue some type of sugarcrm->voip integration..
You'll find it alot easier or more realistically acomplishable, as well as alot more stable...

If you want to share some specific details about yourself, like the number of calls you plan on making or need to make, your current phone situtation, your view on voip, your current computer and/or telecom setup, etc. etc.
and etc.

I'll gladly tell you what you should do in order to ultimately achieve your desired end result and/or goal.
Reply With Quote
  #9  
Old 2006-10-31, 12:07 PM
janmartin janmartin is offline
Junior Member
 
Join Date: Oct 2006
Posts: 4
Default Re: Windows Phone Dialer

Chrisky,

at the moment I am looking for a simple solution without sugar and without asterisk.

My "problem" is I did the same stuff using AVM Fritzcard and ISDN app. 15 year ago in Germany.
So no experience with voicemodems on my side.

Jan
Reply With Quote
  #10  
Old 2006-11-04, 09:44 AM
Skipidar Skipidar is offline
Senior Member
 
Join Date: Oct 2006
Location: Russia, Moscow
Posts: 27
Send a message via ICQ to Skipidar
Default Re: Windows Phone Dialer

You can try to redefine Skypeout function for that... I've done this to handle call-on-click for our IP PBX and soft-phone
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:24 AM.


Powered by: vBulletin
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SourceForge.net Logo