Click to Call with X-Lite Softphone from your web browser.

January 13th, 2008 by Josh Houghtelin

Everyone has had Skype installed at some point or another. It’s got an interesting Firefox add on that converts all the phone numbers on the web page you are browsing to links you can click to initiate a call. After a little toying around I found out it was pretty simple to do the same thing Skype does regardless of the softphone you use. I maintain a few Asterisk servers and thus use softphones quite a bit so I thought this discovery was pretty cool. You can turn all the phone numbers you see online into links that will make your softphone immediately call that number when you click on the link. Here’s how.

I’m using X-Lite by CounterPath but you can make this work for nearly any softphone. All we have to do is make a small change to our browsers application handler command so it tells our softphone to dial the number provided. I explain how it’s done for X-Lite so you may need to do a little research if you use something else.

First we make a small change to our registry so click.
Start > Run and type in regedit.
Click OK & when the registry editor comes up browse to:
HKEY_CLASSES_ROOT > sip > shell > open > command
and edit the command string to look like this for the X-Lite:
“C:\Program Files\CounterPath\X-Lite\x-lite.exe” -dial=”%1″
If you don’t use the X-Lite Softphone then you’ll need the file path to where your softphone is installed & the command line argument it uses to initiate a phone call. Keep in mind the “%1″ argument actually provides not only the phone number but the whole link like this “sip:555-5555″. X-Lite apparently already intended on handling sip tags so it truncates the extra 4 characters (sip:) at the beginning of the phone number.

Now you should be able to type sip:555-5555 in your browser address bar and when you hit enter your softphone should initiate a call to 555-5555. If that’s working your browsers application handler for the sip: tag is working properly. Now we can use links in pages like this <a href=”sip:555-5555″> Call Me </a> to initiate phone calls.

Now to really top it off we Install the Click2Call Firefox Extension by Brendon Wilson. Here is a direct link to install the Click2Call Firefox Extension. Once installed we must configure it so navigate to:
Tools > Add-ons > Extensions > Click2Call > Options
and change it to look like this
sip:$phoneNumber
There is only one option to configure and that’s the URL pattern. After changing that we are done. Now every recognizable phone number will be converted to a link you can click on to immediately initiate a phone call. You can test it out here. I noticed that pages overrun by ajax and javascript tend to sneak by our phone number link generator. (Ie: some sections of google maps) Short of that it seems to work real well.

Posted in Tech, Websites, Software

6 Responses

  1. Simon Østengaard

    This was just what I was looking for. Can you add Scandinavian numbers ( e.g. +45 55 55 55 55 or 55 55 55 55, with what ever spacing between the numbers) to the number pattern?

  2. Josh Houghtelin

    Simon,

    I just put the pieces of the puzzle together so I could use my X-Lite soft phone on my laptop to make calls with a single click.

    Brendon Wilson ( http://www.brendonwilson.com ) actually made the Firefox extension that turns all the phone numbers on websites to sip:tag links. You could visit the page he put up about the FF extension
    http://www.brendonwilson.com/projects/click2call/
    and see what you can dig up there. Have you checked out the list of phone number styles that it already supports? http://www.brendonwilson.com/projects/click2call/test-phone-numbers

    If you don’t find what you want I highly suggest emailing Brendon ( http://www.brendonwilson.com/contact/ ) and possibly asking him to make the addition for you.

  3. Brendon J. Wilson

    Wow, cool! I didn’t even know that computer-based SIP phones registered a “sip” protocol handler. That’s a great little shortcut - I’ll have to add that information to the extension’s documentation. Thanks!

  4. Jack

    I can’t find my SIP!!!!! PLEASE HELP!

  5. Cenk Yurtseven

    If the phone is not opened, the link Call Me will result in an error page in the browser.

  6. V

    Hello, I am encountering a problem with the Click2Call module on firefox. I entered everything like you stated on the click2call options but i get
    “OnSIP Request Error: FromAddress = sip:$phoneNumber : Invalid characters in address. A telephone number address username must be 11-digits long starting with a ‘1′ (or start with ‘011′) and must contain only numbers.”
    Not sure what I need to change or do. Didn’t need to change the registery on the X Lite sip phone, already set correctly. Please, Help…

    Thank you.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.