5

I'm trying to get click to call to work using Qutecom for a softphone and a Greesemonkey script to turn phone numbers into clickable urls. Whenever I click on the phone number link I get an error message saying the following:

Firefox doesn't know how to open this address, because the protocol (tel) isn't associated with any program.

How would I go about associating Qutecom, or any other softphone, with that link? The Greasemonkey scribt can be found at the link below:

http://userscripts.org/scripts/show/56262

Any help would be greatly appreciated.

fixer1234
  • 28,064
Arthur
  • 365

3 Answers3

7

Under Windows, you can create a new protocol using the Registry Editor:

 Start / Run / regedit

Look for the HKEY_CLASSES_ROOT hive, and create a new series of keys with the following structure:

 tel\shell\open\command

At the tel level, edit the (Default) string, and change its value to URL:tel Protocol Again at the tel level, add a new string called URL Protocol and no value.

Then at the command level, edit the (Default) string, and in the value section, enter the command you want to execute:

 c:\path\to\telephone\application.exe %1

The %1 will be replaced by whatever is placed after the tel: sequence, ie, the phone number.

And that should do it.

Under Ubuntu

This might be version specific, but the following should work:

gconftool-2 -t string -s /desktop/gnome/url-handlers/tel/command "/path/to/telephone/application %s"
gconftool-2 -s /desktop/gnome/url-handlers/tel/needs_terminal false -t bool
gconftool-2 -t bool -s /desktop/gnome/url-handlers/tel/enabled true

In this case the %s will be replaced by the phone number.

In the case of qutecom, it appears that the Windows command line should be:

"c:\program files\qutecom\qutecom.exe" -c call\%1

(adjust for your installation location, and try this from a dos prompt first, replacing %1 with a phone number)

Paul
  • 61,193
4

If you are in the same situation, a solution I came up with is to point the registry command for the protocol to a batch file that evaluate the command line parameter stripping the "tel:" part and start QuteCom...

So here is what I put as string in the registry command key:

 "C:\telProtocolHandler.bat" %1 

Here is the content of my telProtocolHandler.bat :

 set PathExe="C:\Program Files (x86)\QuteCom\QuteCom.exe" 

 set CLcmd=-c call/
 set CLprm=%1
 set CLprm=%CLprm:tel:=%

 start "" %PathExe% %CLcmd%%CLprm%

Now it works like a charm under Windows 7

Giorgio
  • 41
2

Paul's answer is ok, but better use "sip" protocol instead of "tel" otherwise QuteCom will try to call "tel:#########", because browsers pass URI into %1.

Also in Windows 7 and latest version of QuteCom my path looks like this (notice slash instead of backslash):

C:\Program Files (x86)\QuteCom\QuteCom.exe -c call/"%1"