Although there is an official SkypeMate for Linux available from Yealink Inc. it is compiled against an outdated DBUS library and therefore cannot be used with any recent Linux distribution. Lukily the Linux kernel provides support for the USB-P1K handset, and the models USB-P1KH, B2K, B3G, and P4K are supported by the update kernel module provided on this site (http://svn.devbase.at:5071/viewvc/voip/yealink-module/). On Skype's side a public DBUS API provides everything needed to place and answer calls and to browse through the contacts.

The missing link between the yealink kernel module and Skype should be provided by YlSkypeConnector. This Python script can be configured with a few simple command line options or a configuration file and otherwise stays in the background of things.


Yealink Kernel Module SVN Tree
(only required for P1KH, B2K, B3G, P4K)
YlSkypeConnector SVN Tree

Command Invocation

Please stick to the following order:
  1. Connect your USB handset.
  2. Start up Skype. Make sure that the "Public API" tab of the configuration shows a check mark at "D-BUS". If it is not checked, please try to start Skype with the following command:
      skype --enable-dbus --use-session-dbus
  3. If not already done: Select the handset as the speaker and microphone device in the Skype options.
  4. Start ylskypeconnector.py

YlSkypeConnector's command line options are:

Usage: ylskypeconnector.py [options]
	--intlacc-code=<nums>	Set international access code.
	--natlacc-code=<nums>	Set national access code.
	--country-code=<nums>	Set country code.
	--area-code=<nums>	Set areacode.
	--verbose|-v		Increase verbosity
	--help|-h		Print this help message.


Apart from specifying the various phone number codes on the command line (see above), they can be stored in a configuration file $HOME/.ylskypeconnector . The following parameters are available:

	intlacc-code  <nums>
	natlacc-code  <nums>
	country-code  <nums>
	area-code     <nums>


  • Austria (Vienna):
    	intlacc-code  00
    	natlacc-code  0
    	country-code  43
    	area-code     1
  • USA (San Francisco):
    	intlacc-code  011
    	natlacc-code  1
    	country-code  1
    	area-code     415


The following keys of the handsets are supported:

  • 0-9, #, *
    Dial a number (# at the beginning means '+' for international numbers), or
    send DTMF tones during a call
    B2K, B3G only: * switches to PSTN mode, # sends a dialed number
  • C
    remove the last digit of the dialed number
  • <red key>
    remove the whole number dialed so far, or
    hang up an active or incoming call
  • <green key>
    dial number of contact, or
    pick up an incoming call
  • ▲,▼
    browse through the list of contacts

Known Problems

  • When Skype is started there is no entry selected in the list of contacts. The user has to manually select a contact before YlSkypeConnector is able to browse through the list.
10 comments so far (post your own)
[1] Posted by Vitali on Monday, 03.30.2009 @ 10:30PM
Great work!!!
[2] Posted by Vitali on Tuesday, 03.31.2009 @ 06:47PM
I could not start this script from an ordinary user, so I've made a simple script to do this:

sudo chmod 777 /dev/input/event*
sudo chmod -R 777 $(find /sys/ -name get_icons|sed 's/get_icons//')
skype & # I use 'echo username password | skype --pipelogin &'
sleep 7;./ylskypeconnector.py

It will be great if "out" "in" buttons would work too.
Reply by Thomas: You could also use some udev-rules to assign those files a specific group name which you are a member of (example at http://www.devbase.at/voip/yeaphone-doc.php).

The IN and OUT buttons are a bit tricky, some phones have them labeled VOL- and VOL+. Still, what is your suggestion for their function?
[3] Posted by Vitali on Wednesday, 04. 1.2009 @ 11:36AM
Unfortunately, I am not familiar with the rules for udev. How can I replace the following string with the rules:
sudo chmod -R 777 $(find /sys/ -name get_icons|sed 's/get_icons//') ?

For the first string of my script the rule from your link works fine, but not for the second. It gives error:

Connected to Skype
Found a P1K
Handset seems to be Connected to Skype
Found a P1K
Handset seems to be disconnected -> shutdown
Handset seems to be disconnected -> shutdown
Exception AttributeError: "MainApp instance has no attribute 'skype_object'" in <bound method Yealink_displ_obj.__del__ of <__main__.Yealink_displ_obj instance at 0x9ef1c2c>> ignored
disconnected -> shutdown
Handset seems to be disconnected -> shutdown
Exception AttributeError: "MainApp instance has no attribute 'skype_object'" in <bound method Yealink_displ_obj.__del__ of <__main__.Yealink_displ_obj instance at 0x9ef1c2c>> ignored

As for buttons, I was a little wrong, it seems I don't need they. Just anytime there are shown three dashes (---) and I can't pick out any contact or, when I dial the number, it displays a "bad number". So I need to go to my computer and click in the contact list. Initially, I assumed for (---) - button "in", so I can pick out from my contacts, and "out" for a bad number warning so I could dial normally. But it is not so important, because mostly it works fine.

Thank you!
[4] Yealink USB-p1k phone
Posted by M Natiello on Thursday, 04. 9.2009 @ 09:49AM

Thank you for writing this programme. One feature I would
like to see is that steps 2 and 3 in your connection sequence
are completely eliminated. I mean:
1. plug in the usb-p1k phone
2. start a programme that perform tasks 2-3-4.

Consider that usually skype is already running since
startup, but using the default audio devices. The script
should tell the running skype to change audio device to
usb-p1k and then start ylskypeconnector.py

Is this possible?


M. Natiello
[5] Yay!
Posted by Oyvind on Thursday, 05.28.2009 @ 10:56PM
Great tool! Thanks!
Had some problems at first with the B2K not defaulting to my PSTN phone on start, but fixed that by changing the self.pstn = False to True in the script.
[6] Ringtone volume
Posted by Mike on Tuesday, 09. 1.2009 @ 07:56PM
Thanks for writing this awesome script! I've had a P1K for four years now, and I've been waiting just as long for someone to write this! I have one little request though, it would be really neat to be able to set the ringtone volume, at least at startup. As it is now you can barely hear the phone ringing if you're too far away. I would do it myself, but unfortunately I don't have the skills needed. :(

Keep up the good work!

/ Mike
[7] refused calls doesn't go to voicemail
Posted by Joao Borsoi on Wednesday, 09. 9.2009 @ 07:11AM
Very useful program. I'm using it under fedora 10 with some little adjusts so it can find the proc files. I made the following change:
# sysfs = commands.getoutput('ls /sys/bus/usb/drivers/yealink/*/show_icon')
sysfs = commands.getoutput('find /sys -name show_icon')

I have only two issues. The worst is that when I refuse calls from the phone, skype doesn't go to the voicemail. If I do it from the skype, it does. Maybe it's a skype issue and not from ylskypeconnector

The other problem, is that when I don't answer the call, the phone keeps ringing forever. Until I refuse it, and then the script freezes. I have to plug/unplug the phone so script dies, to run it again after.
[8] What should appear on the screen?
Posted by Gregg on Sunday, 05.16.2010 @ 04:05AM
Thank you for writing this. It isn't working for me (yet) but I'd like to keep trying with your help. It may be that the new version of Skype (2.1) has broken it or changed the way it runs...

skype: unrecognized option '--enable-dbus'
skype: unrecognized option '--use-session-dbus'

Maybe dbus is included by default now? It is installed. Skype recognises that the software wants to have access to skype by opening a window to confirm. So far so good.

Nothing appears on the Yealink phone screen other than the symbol of a computer, an X and something that looks like a egg. The manual says that this means it is connected. Nothing happens in Skype, but commands such as these appear in the terminal where I start ylskypeconnector:

160510 11:55:22 Key #108
160510 11:55:22 "OPEN CONTACTS" -> "OK"
160510 11:55:22 IDLE - - - None
160510 11:55:22 Key #108
160510 11:55:22 "OPEN CONTACTS" -> "OK"
160510 11:55:22 IDLE - - - None
160510 11:55:23 Key #108
160510 11:55:23 "OPEN CONTACTS" -> "OK"
160510 11:55:23 IDLE - - - None

I sense that I'm almost there. Can you please help me reach the next level?

Thank you!
[9] Development
Posted by Mike on Monday, 02.20.2012 @ 05:16PM
Any further development on this since 2009? What was the corrective action for Post number 3?
[10] ylskypeconnector.py
Posted by Jeroen Petrick on Tuesday, 05.15.2012 @ 08:37PM
Hello thank you very much for this guide but i have a question. Where and how can i download ylskypeconnector.py script?
Reply by Thomas: I am currently in the process of upgrading the server hardware and software, the SVN service will be up again in the next few days.
Then you will be able to find the script at the link shown at the top of this page.
Notice: A non well formed numeric value encountered in /home/.sites/8/site377/web/lib-php/comments_inc.php on line 158
Leave your comments

Note: The email address is optional and will be neither stored nor visible, but can be provided for getting in contact. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text. Examples:
[b]bold[/b] ... bold
[code]Source Code[/code] ... Source Code

The author does not take any responsibility for problems and damage arising by installing or using this software, use it at your own risk.