Not able to access non-root Asterisk

Hi,

I am using asterisk 15.5 version on centOS.

I am starting asterisk as non-root user. I followed the documentation on Asterisk definitive guide.
I created a new user asteriskpbx, give permissions to log folders of asterisk, changed asterisk.conf file with user and group.

I was able to start asterisk as non-root user. But I am not able to access asterisk.

When I am running asterisk as root user. I am able to access it.

Incase of root asterisk, When I do https://publicIP:port/ws asterisk is returning a upgrade page (as expected).
And I am able to place calls using sipML5.

But in case of non-root asterisk, When I visit https://publicIP:port/ws It is showing site can’t be reached (I am not able to contact server).
And I am getting Websocket connection closed error.

WebSocket connection to ‘wss://publicIP:port/ws’ failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED

Please let me know if need to configure anything else on asterisk side or system level.

I am using 443 in tlsbindaddr. When I am starting asterisk as root, I seeing asterisk service listening on 443, But when I run asterisk as non-root I am not seeing the same. I am guessing http server associated with asterisk didnot started in case of non-root user or it needs some root permissions. I am not able to figure them out.

Please let me know If I am missing anything here, while starting asterisk as non-root user.

Most systems by default have it so only root can bind to a privileged port (ports below 1024). There are probably ways around this (google probably would turn something up), but this would be outside the scope of Asterisk and be based on the OS.

1 Like