Home > Uncategorized > Gnome and CTI (computer-telephone-integration)

Gnome and CTI (computer-telephone-integration)

On my desk, there’s a Siemens Gigaset SX353 connected to the desktop PC via USB. There’s a nice command line tool for managing the telephone, esp. dialing numbers is possible using

gigacontr --dev /dev/ttyGB0 --dial 1 <number> 10

Unfortunately when passing in a international number with the “+” notation, e.g. +49163123456 the phone will not use the “+”. This could be easily solved with a small python wrapper script gigadial.py:

#!/usr/bin/python
import sys, os
assert len(sys.argv)==2
device = "/dev/ttyGB0"
internal_number = "10"
command = "/usr/local/sbin/gigacontr --dev %s --dial 1 %s %s"
number = sys.argv[1]
 
number = number.replace("+", "00")
if len(number) &gt; 8 and number[0:2]=='49':
	number = "00%s" % (number)
 
command = command % (device, number, internal_number)
os.system(command)

Gnome supports configuring a handler for callto: URLs. Using gconf-editor modify the setting /desktop/gnome/url-handlers/callto/command must be set to

<path-to>/gigadial.py %s

To use Thunderbird’s addressbook with this, enable in Tool | Additional Settings | Misc the option “insert callto: link for phonenumbers”. When viewing contact data, the phone numbers show up as links. When clicking the phone number, the phone dials that number. Cool!

Even cooler: For Firefox, there the wonderful Telify addon that finds phone number in webpages and converts them to links. Telify must be configured to use callto: URLs instead of the default tel: URLS.

Categories: Uncategorized Tags: , , , ,