7

On this site I clicked on the support link and a phone number popped up. It was formatted via the tel: protocol, and as such was underlined and highlighted like a web link. On my phone, clicking on such a link opens my default dialer and places the call.

When links are not formatted via this protocol, my browser's Google voice plugin usually auto-detects the phone number and gives me a chance to call via Google voice. It would be nice if I could also do this for tel: formatted numbers, or better yet, as I don't always have a voice session open, set tel: formatted numbers be handled by yate.

How can I fix my browser's handling of the tel: protocol links such that it opens in yate or google voice?

  • In Chromium I get a warning saying that xdg-open will be used to handle the link, but when I click 'Launch Application' nothing happens.
  • In Firefox, clicking on the link leads me to a blank page with the url tel:18003744432
  • In Konqueror clicking on the link produces this error:

    Access by untrusted page to tel:18003744432 denied.
    

I'm using Linux Mint 16 KDE x64.

virtualxtc
  • 1,043
  • 16
  • 25

3 Answers3

2

Thanks to Ignacio Vazquez-Abrams for pointing me in the right direction with the mimetype handler.

I ended up creating a simple desktop entry to open links in Hangouts. I think the location for this will vary by distro, but for me this is what worked (I'm on Ubuntu GNOME 16.04). This just converts the tel: number into a URL that tells hangouts to make a phone call, and lets xdg-open handle it so it will open in your default browser.

~/.local/share/applications/mimeapps.list

[Added Associations]
x-scheme-handler/tel=hangouts.desktop

~/.local/share/applications/hangouts.desktop

#!/usr/bin/env xdg-open
[Desktop Entry]
Exec=bash -c 'xdg-open "https://hangouts.google.com/?action=chat&pn=${0//tel:/}"' %u
Terminal=false
Type=Application

To explain the code, it passes %u (which will be the tel: link) into an inline bash script as the $0 param. Then ${0//tel:/} strips the tel: from the front of it, leaving you with the number. That number then gets passed in to the hangouts URL.

redbmk
  • 270
  • 2
  • 8
1

Adding a MimeType=x-scheme-handler/tel to yate's .desktop file will tell XDG-compliant tools to use it to handle tel: URLs. Also, make sure that the Exec entry contains %u or %U so that the executable is passed the URL(s).

XDG Desktop Entry Specification

Ignacio Vazquez-Abrams
  • 44,857
  • 7
  • 93
  • 100
0

I got around this issue by installing the Chromium extension Dialr.

However, I'm still hoping someone will write the needed tel.protocol file.

virtualxtc
  • 1,043
  • 16
  • 25