Unistim Reload fails: "Failed to bind to 0.0.0.0:5000: P

Hi,

I’m trying to get the Unistim driver working on Asterisk 1.6.2 but get a “Failed to bind to 0.0.0.0:5000: Permission denied” warning when I load my Unistim.conf file.

ukasterix1CLI> unistim reload
[Jan 14 10:41:53] WARNING[32486]: chan_unistim.c:725 display_last_error: Fri Jan 14 10:41:53 2011
Error in ast_localtime() : (4) Interrupted system call
[Jan 14 10:41:53] WARNING[32486]: chan_unistim.c:725 display_last_error: Fri Jan 14 10:41:53 2011
Error in ast_localtime() : (4) Interrupted system call
[Jan 14 10:41:53] WARNING[32486]: chan_unistim.c:725 display_last_error: Fri Jan 14 10:41:53 2011
Error in ast_localtime() : (4) Interrupted system call
[Jan 14 10:41:53] WARNING[32486]: chan_unistim.c:5517 reload_config: Failed to bind to 0.0.0.0:5000: Permission denied
ukasterix1
CLI>

I think this is where Asterisk is trying to bind to a socket to listen on the Unistim port (5000). Since it isn’t allowed to Asterisk is not replying to any Unistim packets.

I saw the post by Prema Vardhan Reddy with title “Sip configuration failed” in which david55 responds with:

“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.”

Asterisk 1.6.2 installation runs under the Asterisk user by default so I tried changign this to run as root as follows:

  1. Stop Asterisk

  2. Edit /etc/asterisk/asterisk.conf changing

    astrundir => /var/run/asterisk
    to astrundir => /var/run

  3. Edit /etc/init.d/asterisk chaning

    AST_GROUP="asterisk"
    

    to #AST_GROUP=“asterisk” (have also tried AST_GROUP=“root”)

  4. Start Asterisk

This still didn’t work. Have I missed a step to make Asterisk run as Root? Or is there another solution to my problem?

This is my configuration in Unistim.conf, I added the following lines:

[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

Thanks,

Michael

To make asterisk run as root, do a default source code installation. I don’t know what you have done to frustrate this; that is what will have to be undone.