YlSkypeConnector
Overview
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.
Download
Yealink Kernel Module SVN Tree (only required for P1KH, B2K, B3G, P4K) |
![]() |
YlSkypeConnector SVN Tree | ![]() |
Command Invocation
Please stick to the following order:- Connect your USB handset.
- 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
- If not already done: Select the handset as the speaker and microphone device in the Skype options.
- 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.
Configuration
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>
Examples:
- 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
Usage
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.
The author does not take any responsibility for problems and damage arising by installing or using this software, use it at your own risk.
#!/bin/bash
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.
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?
-Thomas
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!
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?
Thanks,
M. Natiello
Posted by Oyvind on Thursday, 05.28.2009 @ 10:56PM
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.
Posted by Mike on Tuesday, 09. 1.2009 @ 07:56PM
Keep up the good work!
/ Mike
Posted by Joao Borsoi on Wednesday, 09. 9.2009 @ 07:11AM
# 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.
Posted by Gregg on Sunday, 05.16.2010 @ 04:05AM
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 "GET CONTACTS_FOCUSED" -> "CONTACTS FOCUSED"
160510 11:55:22 IDLE - - - None
160510 11:55:22 Key #108
160510 11:55:22 "OPEN CONTACTS" -> "OK"
160510 11:55:22 "GET CONTACTS_FOCUSED" -> "CONTACTS FOCUSED"
160510 11:55:22 IDLE - - - None
160510 11:55:23 Key #108
160510 11:55:23 "OPEN CONTACTS" -> "OK"
160510 11:55:23 "GET CONTACTS_FOCUSED" -> "CONTACTS FOCUSED"
160510 11:55:23 IDLE - - - None
I sense that I'm almost there. Can you please help me reach the next level?
Thank you!
Posted by Mike on Monday, 02.20.2012 @ 05:16PM
Posted by Jeroen Petrick on Tuesday, 05.15.2012 @ 08:37PM
Then you will be able to find the script at the link shown at the top of this page.