Sip configuration failed

i friends, while i am installing Asterisk server on my linux machine, i am getting these NOTICE and WORNINGs and my sip client SJphone is not able to register with sip server.

[Sep 29 14:57:04] WARNING[11541] chan_skinny.c: Failed to bind to 0.0.0.0:2000: Permission denied
[Sep 29 14:57:04] NOTICE[11541] chan_sip.c: The ‘username’ field for sip peers has been deprecated in favor of the term ‘defaultuser’
[Sep 29 14:57:04] NOTICE[11541] pbx_ael.c: Starting AEL load process.
[Sep 29 14:57:04] NOTICE[11541] pbx_ael.c: AEL load process: parsed config file name ‘/etc/asterisk/extensions.ael’.
[Sep 29 14:57:04] NOTICE[11541] pbx_ael.c: AEL load process: checked config file name ‘/etc/asterisk/extensions.ael’.
[Sep 29 14:57:04] NOTICE[11541] pbx_ael.c: AEL load process: compiled config file name ‘/etc/asterisk/extensions.ael’.
[Sep 29 14:57:04] NOTICE[11541] pbx_ael.c: AEL load process: merged config file name ‘/etc/asterisk/extensions.ael’.
[Sep 29 14:57:04] NOTICE[11541] pbx_ael.c: AEL load process: verified config file name ‘/etc/asterisk/extensions.ael’.
[Sep 29 14:57:04] WARNING[11541] chan_unistim.c: Failed to bind to 0.0.0.0:5000: Permission denied
[Sep 29 14:57:05] ERROR[11577] pbx_spool.c: Unable to open directory /var/spool/asterisk/outgoing: Permission denied

I don’t see any sip configuration failing, only a warning about out of date options!

You appear to be trying to run Asterisk non-root. non-root use is not well tested (and some features probably can only be done with root permissions). I think there is very little maintenance effort for skinny, so it certainly wouldn’t surprise me if it cannot be run non-root. unistim is another minority channel.

I’m not sure why the binds are failing, as it is a non-privileged port, but maybe there are some special options being used.
The spool directory problem should be an obvious file permissions one.

Hi,

I do indeed get the same “Failed to bind to 0.0.0.0:5000: Permission denied” error with Unistim channels. I’ve installed 1.6.2 on Fedora 14 and have it working for SIP. I added the Unistim package and configured three devices in /etc/asterisk/unistim.conf:

[6000]
device=00151759a0fe
context=UnistimUsers
extension=line
line=100

[6001]
device=001422228bf4
context=UnistimUsers
extension=line
line=101

[6002]
device=001422228bf4
context=UnistimUsers
extension=line
line=102

Now when I load the config file I get this error:

ukasterix1CLI> unistim reload
[Jan 11 13:08:31] WARNING[32486]: chan_unistim.c:725 display_last_error: Tue Jan 11 13:08:31 2011
Error in ast_localtime() : (4) Interrupted system call
[Jan 11 13:08:31] WARNING[32486]: chan_unistim.c:725 display_last_error: Tue Jan 11 13:08:31 2011
Error in ast_localtime() : (4) Interrupted system call
[Jan 11 13:08:31] WARNING[32486]: chan_unistim.c:725 display_last_error: Tue Jan 11 13:08:31 2011
Error in ast_localtime() : (4) Interrupted system call
[Jan 11 13:08:31] WARNING[32486]: chan_unistim.c:5517 reload_config: Failed to bind to 0.0.0.0:5000: Permission denied
ukasterix1
CLI>

It looks like Linux won’t allow Asterisk to bind to a socket to listen on port 5000 (Unistim)…

The default installation runs under the Asterisk user. I tried making it run as root but had the same problem. I did the following to make it run as root:

Stop Asterisk
Edit /etc/asterisk/asterisk.conf changing astrundir => /var/run/asterisk to astrundir => /var/run
Edit /etc/init.d/asterisk chaning AST_GROUP=“asterisk” to #AST_GROUP=“asterisk” (have also tried AST_GROUP=“root”)
Start Asterisk

I’m very new to this so maybe I have not changed enough to make it run as root?

Any help would be appreciated.

Thanks,

Michael