Can't start Skype for Asterisk

A forum for Skype For Asterisk users to ask questions and get advice from other users

Moderators: twilson, pete engler

Can't start Skype for Asterisk

Postby fba » Fri Dec 04, 2009 1:33 pm

Hi all,

I am trying to get Skype for Asterisk running on Ubuntu 9.10 server and Asterisk 1.6.1.11. So far, I have not had much luck, and Google has been unable to help me either.

When I start chan_skype.so, I get the following errors :

[Dec 4 12:12:18] NOTICE[26748]: core.cpp:1299 sfa_startup: Found a total of 1 Skype For Asterisk licenses
[Dec 4 12:12:19] DEBUG[26891]: core.cpp:407 skyhost_watcher: pfd 0 had an error
[Dec 4 12:12:19] DEBUG[26891]: core.cpp:407 skyhost_watcher: pfd 0 had an error
[Dec 4 12:12:19] DEBUG[26891]: core.cpp:407 skyhost_watcher: pfd 0 had an error
[Dec 4 12:12:19] DEBUG[26891]: core.cpp:292 kill_skypewatcher: sending SIGTERM to 26892.
[Dec 4 12:12:19] WARNING[26891]: core.cpp:296 kill_skypewatcher: sending SIGTERM to 26892 failed with No such process
[Dec 4 12:12:28] ERROR[26748]: core.cpp:1530 sfa_startup: Skype engine failed to start.
[Dec 4 12:12:28] ERROR[26748]: chan_skype.c:3130 load_module: Unable to start Skype For Asterisk library.


Digging around for a few days has found a few different solutions that have not worked. So far I have tried :

1. Forcing the bind_port to something above 1024.
2. Setting disable_tcpauto=yes
3. Making sure that the directory specified by engine_directory has all necessary permissions for the user to run programs from it. (Have tried using both the default 'asterisk' user, and root.)
4. Making sure that the skypeforasterisk process isn't hung. (It isn't, I have never actually managed to get it running.)


Has anyone gotten this type of a set up running? Or, are there any suggestions how I can move to the next level of debugging this issue? (I have contacted Asterisk support, but they are slow in responding, so I hoped someone here might be able to help a little faster.)

Thanks!
fba
Newsterisk
 
Posts: 7
Joined: Fri Dec 04, 2009 1:26 pm

Re: Can't start Skype for Asterisk

Postby jrmorrill » Fri Dec 04, 2009 2:20 pm

Hello fba,

I am new to Asterisk like yourself and I had the same issue as you yesterday when setting up my skype for asterisk. I was running it on an older opensuse system (10.3) when I got those errors so I decided to upgrade to the latest version (11.2) and try again. I reinstalled asterisk, copied my license key, installed skypeforasterisk and still have the same issue.

I am not sure how to get the debug messages you got to display but I do notice some similar skype errors here and there. I am contacting digium also so I will let you know if I get a response from them too.

When starting Asterisk I get these messages:
Loading Skype For Asterisk engine
[Dec 4 12:06:19] NOTICE[17430]: res_skypeforasterisk.c:17 load_module: Skype For Asterisk module, Copyright (C) 2008-2009 Digium, Inc.
[Dec 4 12:06:19] NOTICE[17430]: res_skypeforasterisk.c:18 load_module: This module is supplied under a commercial license granted by Digium, Inc.
[Dec 4 12:06:19] NOTICE[17430]: res_skypeforasterisk.c:19 load_module: Please see the full license text supplied by the accompanying
[Dec 4 12:06:19] NOTICE[17430]: res_skypeforasterisk.c:20 load_module: "register" utility, or ask for a copy from Digium.
[Dec 4 12:06:19] NOTICE[17430]: res_skypeforasterisk.c:23 load_module: This product includes software developed by the OpenSSL Project
[Dec 4 12:06:19] NOTICE[17430]: res_skypeforasterisk.c:24 load_module: for use in the OpenSSL Toolkit. (http://www.openssl.org/)
[Dec 4 12:06:19] NOTICE[17430]: res_skypeforasterisk.c:25 load_module: Copyright (C) 1998-2008 The OpenSSL Project

res_skypeforasterisk.so => (Skype For Asterisk Engine)

.
.
.

== Parsing '/etc/asterisk/chan_skype.conf': == Found
[Dec 4 12:06:20] NOTICE[17430]: core.cpp:1122 skype_cp_handler: Found license 'XXXX(hiding my real license)XXXX' providing 1 concurrent calls
[Dec 4 12:06:20] NOTICE[17430]: core.cpp:963 display_host: Skype For Asterisk Host-ID: 90:e8:83:3a:48:d1:5d:b0:b6:3c:87:ac:20:f4:82:a4:a9:08:8f:de
[Dec 4 12:06:20] NOTICE[17430]: core.cpp:1299 sfa_startup: Found a total of 1 Skype For Asterisk licenses
[Dec 4 12:06:21] WARNING[17459]: core.cpp:296 kill_skypewatcher: sending SIGTERM to 17460 failed with No such process
[Dec 4 12:06:30] ERROR[17430]: core.cpp:1530 sfa_startup: Skype engine failed to start.
[Dec 4 12:06:30] ERROR[17430]: chan_skype.c:3130 load_module: Unable to start Skype For Asterisk library.
== Manager registered action SkypeBuddies
== Manager registered action SkypeBuddy
== Manager registered action SkypeAccountProperty
== Manager registered action SkypeAddBuddy
== Manager registered action SkypeRemoveBuddy
== Manager registered action SkypeLicenseStatus
== Manager registered action SkypeLicenseList
== Registered custom function 'SKYPE_CALL_PROPERTY'
== Registered custom function 'SKYPE_ACCOUNT_PROPERTY'
== Registered custom function 'SKYPE_BUDDIES'
== Registered custom function 'SKYPE_BUDDY_FETCH'
chan_skype.so => (Skype For Asterisk Channel Driver)
== Registered custom function 'GROUP_COUNT'
== Registered custom function 'GROUP_MATCH_COUNT'
== Registered custom function 'GROUP_LIST'
== Registered custom function 'GROUP'

.
.
.

kernel:[ 3860.128704] last sysfs file: /sys/devices/pci0000:00/0000:00:14.1/host0/target0:0:1/0:0:1:0/block/sdb/uevent
[Dec 4 12:04:43] WARNING[17373]: core.cpp:296 kill_skypewatcher: sending SIGTERM to 17374 failed with No such process


When entering the command "show skype users":
grunt*CLI> skype show users
[Dec 4 12:02:42] ERROR[17299]: chan_skype.c:1497 show_users_cli: Skype for Asterisk could not be loaded
[Dec 4 12:02:42] ERROR[17299]: chan_skype.c:1498 show_users_cli: Exit Asterisk and check for hung 'skypeforasterisk' processes

When Reloading the chan_skype.so module I dont get any errors:
Connected to Asterisk 1.6.1.11 currently running on grunt (pid = 17255)
grunt*CLI> module reload chan_skype.so
[Dec 4 11:59:21] NOTICE[17299]: core.cpp:1122 skype_cp_handler: Found license 'XXXX(hiding my real license)XXXX' providing 1 concurrent calls
jrmorrill
Newsterisk
 
Posts: 4
Joined: Fri Dec 04, 2009 1:21 pm

Re: Can't start Skype for Asterisk

Postby fba » Fri Dec 04, 2009 3:39 pm

Hi jrmorrill,

I don't know if any of this will help you, but I'll throw it out there just in case it helps get you a little closer.

My initial problem was that Ubuntu 9.10 ships with a pre-release version of Asterisk. (1.6.2) Digium support told me to downgrade to something that has been released, so I built 1.6.1.11 per their suggestion. (And then responded to them that it didn't solve the problem. :wink: )

To get the debug output that I got, I have been enabling every possible type of debug that I know of, along with anything I can find on the net. So far, I have done the following :

In /etc/asterisk/logger.conf, I have added debug to the end of the console line, and uncommented the "full" line. So, it looks like this now :

;debug => debug
console => notice,warning,error,debug
messages => notice,warning,error
full => notice,warning,error,debug,verbose


Then, in chan_skype.conf, I set debug=yes. However, since the comment in the sample config says this will enable "very verbose" output, I can't be sure if there isn't something else I need to enable to see the full results. Since I wouldn't call the additional output I get "very verbose".

Finally, when I get on the asterisk console (with 'asterisk -r'), I do a "core set debug 10" and "core set verbose 10", then unload and reload the modules. I have also tried enabling the skype debug commands between the time I load the module, and the time I see the error messages. That doesn't seem to make a difference.


My current working theory is that there is that skyhost needs some library, or specific version of a library, that isn't included in Ubuntu 9.10. (Considering that Ubuntu is shipping with an unreleased version of Asterisk, it wouldn't surprise me.) However, since the skyhost stuff is extracted at run time, executed, and then removed I can't run an "ldd" on it to see what it is expecting. (Of course, I could be completely wrong, but it is the idea I am currently stuck on, and since it can't be tested, it seems reasonable... for now..)
fba
Newsterisk
 
Posts: 7
Joined: Fri Dec 04, 2009 1:26 pm

Re: Can't start Skype for Asterisk

Postby jrmorrill » Fri Dec 04, 2009 4:30 pm

Thanks for the info!

I contacted digium support and a technician contacted me a few hours later. I gave them SSH access to my machine and I attached to his screen session. He was unable to determine the issue also and his recommendation to me was to try installing a different linux distribution... This isn't the ideal solution to me because I am satisfied with openSUSE for now and I have it installed on my other server that I am planning on moving asterisk to once I confirm asterisk works how I like.

I think you might be onto something when you talk about library dependencies... In fact, the skypeforasterisk is packaged with a binary library, perhaps the dependencies for that library are missing? Here is my output for ldd on that file:

# ldd res_skypeforasterisk.so
linux-gate.so.1 => (0xffffe000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7391000)
libm.so.6 => /lib/libm.so.6 (0xb7368000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7348000)
libc.so.6 => /lib/libc.so.6 (0xb71e8000)
/lib/ld-linux.so.2 (0xb7783000)

I'm not familiar with ldd or what it's output means but it looks like it shows the required shared library and its location in the filesystem. I noticed that linux-gate.so.1 is missing a file system location, could this be an issue?
jrmorrill
Newsterisk
 
Posts: 4
Joined: Fri Dec 04, 2009 1:21 pm

Re: Can't start Skype for Asterisk

Postby jrmorrill » Fri Dec 04, 2009 4:33 pm

Disregard the ldd output above... I found what that library was here:

http://www.trilithium.com/johan/2005/08/linux-gate/
jrmorrill
Newsterisk
 
Posts: 4
Joined: Fri Dec 04, 2009 1:21 pm

Re: Can't start Skype for Asterisk

Postby fba » Fri Dec 04, 2009 5:50 pm

Hmm... Seems kind of insane that specific Linux distros aren't included in the list of requirements. But, I am sure the Digium guys want to hit as wide an audience as possible.

I think I was a little unclear about which program I wanted to run ldd on. According to my reading from various Google searchs, and this message board, res_skypeforasterisk.so extracts another binary from itself which is run and results in the skypeforasterisk process. Various debug outputs around the net indicate that this binary is referred to as "skyhost", and is the component that does the heavy lifting for the skype functionality.

From what I can gather, res_skypeforasterisk.so extracts this program to the engine directory specified in the configuration file, then executes it from that location, and deletes the binary that was extracted. As a result, it is difficult to get ahold of that binary to run ldd on. My gut feeling is that if we had that binary that it would quickly point us to the library that is missing. Or, if it isn't a missing library then it would at least rule that problem out.

Unfortunately, the Digium folks are the only ones that can do this easily. (Perhaps if one of them is reading this they would do us the favor of providing the output so we can help track this issue down. I have to believe that there are other people out there that are going to want to use OpenSUSE or Ubuntu 9.10.)
fba
Newsterisk
 
Posts: 7
Joined: Fri Dec 04, 2009 1:26 pm

Re: Can't start Skype for Asterisk

Postby amc » Sat Dec 05, 2009 3:20 pm

I'm experiencing exactly the same issue on a Ubuntu 9.10 machine with Asterisk 1.6.1.11. I tried all kind of diffrent settings, I've even recompiled asterisk and the skypeforasterisk module... But nothing helps. Unfortunately the debug messages don't really help to find the problem.
amc
Newsterisk
 
Posts: 3
Joined: Sat Dec 05, 2009 3:14 pm

Re: Can't start Skype for Asterisk

Postby jrmorrill » Sun Dec 06, 2009 1:55 pm

Hello amc,

I believe that fba has narrowed this issue down to the exact problem. It seems that the modules have no problem loading because we have all the skype commands available in the CLI. I agree with fba, the executable that is extracted and executed at runtime must have some missing dependencies. I'm sure if digium could provide us with some information about what libraries the executable depends upon we can solve this issue.
jrmorrill
Newsterisk
 
Posts: 4
Joined: Fri Dec 04, 2009 1:21 pm

Re: Can't start Skype for Asterisk

Postby amc » Wed Dec 09, 2009 2:54 am

Hello jrmorrill

I agree with you, it must be related to some missing dependencies. On the same hardware with CentOS (used in AsteriskNOW) the skypeforasterisk works fine.
By the way I observed a 'kernel trace' that occurs synchronous with the call of skypeforasterisk from asterisk on ubuntu. I don't know if that one could help us solving the problem. The trace is stored in kern.log. The output is pretty much complex, though. Unfortunately I can't see the clue.

have a nice day
amc
amc
Newsterisk
 
Posts: 3
Joined: Sat Dec 05, 2009 3:14 pm

Re: Can't start Skype for Asterisk

Postby twilson » Mon Dec 14, 2009 12:26 am

One thing to check is that you don't have any hung skypeforasterisk processes. If for some reason the process isn't cleaned up properly, then when asterisk tries to load sfa again it can't bind to the ports because the previous instance is bound to them. Do 'ps aux|grep skype' with asterisk stopped and make sure there are no skypeforasterisk processes running. If there are, kill them.
twilson
Oldsterisk
 
Posts: 87
Joined: Mon Jun 01, 2009 9:35 am

Re: Can't start Skype for Asterisk

Postby twilson » Mon Dec 14, 2009 5:09 pm

Ok, I've done a bunch of testing and have even written a small test app that identifies the problem. This is a kernel bug with the current kernel in karmic koala. See https://bugs.launchpad.net/ubuntu/+sour ... bug/437258 for information about the bug. It affects SFA because of how we have to execute the Skype skyhost binaries.

The new kernel is in karmic-proposed, which you should be able to upgrade to via https://wiki.ubuntu.com/Testing/EnableProposed

Thanks.
twilson
Oldsterisk
 
Posts: 87
Joined: Mon Jun 01, 2009 9:35 am

Re: Can't start Skype for Asterisk

Postby fba » Mon Dec 14, 2009 8:14 pm

Thanks twilson! This solved the problem. After upgrading the kernel, Skype for Asterisk popped right up! :mrgreen:
fba
Newsterisk
 
Posts: 7
Joined: Fri Dec 04, 2009 1:26 pm

Re: Can't start Skype for Asterisk

Postby alnicol » Fri Mar 05, 2010 2:59 pm

Another :D to twilson ... I was about to chuck the computer out of the window but your solution solved my problem on Ubuntu 9.10. Awesome!
alnicol
Newsterisk
 
Posts: 1
Joined: Fri Mar 05, 2010 2:56 pm


Return to Skype For Asterisk

Who is online

Users browsing this forum: No registered users and 1 guest