web developer & system programmer

coder . cl

ramblings and thoughts on programming...


integrating kontact and skype

published: 19-02-2010 / updated: 19-02-2010
posted in: projects, sysadmin, tips
by Daniel Molina Wegener

Kontact is my default PIM application. On its configuration we can setup a phone calling program, such as ekiga, skype and others, it just requires a small script, like the one bellow, which I have integrated with KPilot, so I can manage my contacts centered and synchronized.

#!/usr/bin/env python
# skype_call.py
import sys
import Skype4Py

def main():
    if len(sys.argv) != 2:
        print "No dialup numbern"
    number = sys.argv[1]
    number = number.strip()
    for n in [' ', '+', '(', ')', "s", "t", '-']:
        number = number.replace(n, "");
    number = '+' + number
    print number, "n"
    skype = Skype4Py.Skype()
    skype.Attach()
    skype.PlaceCall(number)

if __name__ == '__main__':
    main()

Then, on the Kontact configuration, on the address book settings, we configure the path to our script, called skype_call.py, in this case located at my home directory, on my personal scripts folder.

Kontact Configuration

One time configured contact, you can call your contacts just by clicking on their phone numbers. Remember that skype needs the format +country_code—area_code—phone_number, like +56 (2) 555 55 55.

Contact Calling

Happy internet calling ;)


No coments yet.

post a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>