![]() |
There are various USB phones available which are marketed as VoIP phones. While usually rather cheap their built-in logic does not provide much more than an audio device, reading a user's key presses and possibly displaying simple messages. The following article describes how to connect and use a YeaLink USB-P1K handset with the NSLU2 as a standalone SIP VoIP phone. The USB-P1K was chosen because it is well-supported by the Linux kernel module yealink (see http://savannah.nongnu.org/projects/usbb2k-api/). It is sold for ~30€ under various brand names (cistrix, comsel, freshtel, laser, peoplefone, siptronic, us robotics, etc). There is no support for models other than the USB-P1K at this time, but that's definitely a goal for future releases. Table of contentsBasic ArchitectureAs mentioned above the USB-P1K provides the basic phone interface (speaker, microphone, keys, display) but no VoIP functionality. On the other side there are the numerous VoIP soft phones, most of which can only be controlled via their GUI and therefore are not suitable for the NSLU2. This gap is closed by Yeaphone, which interfaces to the kernel module and provides VoIP functionality by using the liblinphone SIP phone backend. Yeaphone's main features are:
InstallationThe necessary parts are
The BitBake files are available in the OpenEmbedded database but can also be downloaded from the developer's web-site for Yeaphone: http://www.devbase.at/voip/yeaphone.php For SlugOS/BE 3.10beta downloading the necessary files into the cross-compile environment could look like: cd ~/releases/slugos-3.10-beta/openembedded/packages/linphone/ wget http://download.devbase.at/voip/linphone_1.6.0.bb mkdir ../yeaphone cd ../yeaphone wget http://download.devbase.at/voip/yeaphone_0.1.bb cd ~/releases/slugos-3.10-beta/ Then you can compile Yeaphone: bb yeaphone
Note that this will also compile linphone (as yeaphone's dependency) which by default builds both the console version and the GUI. If you do not want all the Gnome stuff to be built you need to adjust the BitBake file linphone_1.6.0.bb - comments "console-only version" inside this file will help you doing that. Alternatively there are compiled packages available for everything you will need to run Yeaphone at feed.devbase.at. Software SetupYeaphone has to be configured through linphonec, the console version of Linphone. The following example shows how to get a working connection to a VoIP provider (user input printed bold). root@NSLU2:~# linphonec
Ready
linphonec> soundcard list
0: ALSA: default device
1: ALSA: USB Audio
2: ALSA: VOIP USB Phone
3: OSS: /dev/dsp
4: OSS: /dev/dsp1
linphonec> soundcard use 2
Using sound device ALSA: VOIP USB Phone
linphonec> proxy add
Adding new proxy setup. Hit ^D to abort.
Enter proxy sip address: sip:sipgate.at
Your identity for this proxy: sip:1234567@sipgate.at
Do you want to register on this proxy (yes/no): yes
Specify register expiration time in seconds (default is 600): 600
Expiration: 600 seconds
Specify route if needed: [leave empty]
No route specified.
--------------------------------------------
sip address: sip:sipgate.at
route:
identity: sip:1234567@sipgate.at
register: yes
expires: 600
--------------------------------------------
Accept the above proxy configuration (yes/no) ?: yes
Proxy added.
linphonec>
Password for 1234567 on "sipgate.at": [enter password]
Registration on sip:sipgate.at sucessful.
linphonec>
Using linphonec the VoIP connection can be tested immediately before using Yeaphone. The speaker and microphone of the Yealink handset can be used already, commands still have to be entered through the terminal and the PC keyboard though. The most important commands of linphonec are:
As soon as calls can be make this way, linphonec can be stopped and yeaphone can be invoked. Its output should look similar to this: root@NSLU2:~# yeaphone
Ready
Registration on sip:sipgate.at sucessful.
At the same time the current date and time are show on the handset's display, a quick sequence of status messages appear, and finally the lower part of the display should be empty. Now the handset's keyboard can be used to place and receive calls. To correctly understand the phone number of incoming calls, Yeaphone needs some adjustments in the file ~/.yeaphonerc. After terminating yeaphone the parameters An example for Austria would be: intl-access-code 00
natl-access-code 0
country-code 43
For the USA this should be: intl-access-code 011
natl-access-code 1
country-code 1
UsageThe various phone keys have the following functions:
Performance ConsiderationsThe following performance measurements have been done using linphonec on a TurboSlug with an ARM5-optimized SPEEX library 1.2beta1:
Conclusion:
The NSLU2 does not have enough horse power for echo cancellation or the SPEEX codecs, these should be turned off in the configuration file Page last modified on June 21, 2007, at 05:52 PM
|