RasPBX fresh install but 5060 not open?

Hey guys looking for some help here not sure if this is a RasPBX issue or FreePBX

Basically after a fresh install I add an extension and realized I cant register a phone to the server so I Nmap’d it and 5060 is closed.

I have tried ‘amportal stop’ and ‘amportal start’ but doesnt help

RasPBX does not have a firewall built in, so thats not the issue. Also I am able to ping, scan other ports, and SSH + login to web gui, but 5060 is closed and unable to register the extension.

Not sure what to do. I tried another fresh install but 5060 is for sure closed on the fresh install. Used latest RasPBX image and I tried with and without updating via raspbx-upgrade

Bump! Anyone running RasPBX latest img?

I reinstalled and its still not working from its fresh install state

what could this be -->

[email protected]:/# amportal restart
-bash: /usr/sbin/amportal: Permission denied

heres output of ls -la in /usr/sbin:

lrwxrwxrwx 1 root root 30 Jan 24 2016 amportal -> /var/lib/asterisk/bin/amportal

heres ls -la in /var/lib/asterisk/bin

-rw-r–r-- 1 asterisk asterisk 2420 Sep 21 14:32 amportal

Upper right corner of FreePBX: “Cannot Connect to Asterisk”

I ran updates on the distro and now I have amportal restart working fine

However, when I scan the system with nmap, 5060 is still not open

When I try to register an extension I get a timeout (due to port being closed)

Interesting part is that on the FreePBX dashboard everything is totally green now, no errors, the message about Asterisk connection went away after the updates

Is port 5061 open? You could use that port as well. Then just update your bind port on your chan_sip settings.

No man 5061 is closed too. this RasPBX sucks, the client wants it but im trying to encourage him toward a real PC and not a childs toy

ok, check to see if iptables is running if so stop it service iptables stop. or even fail2ban

i did check those and nothin there.

Right now Ive got some errors in dashboard now that I upgraded

here they are

retrieve_conf failed, config not applied

File /etc/dahdi/modules is not owned by asterisk

File /etc/modprobe.d/dahdi.conf is not owned by asterisk

File /etc/dahdi/system.conf is not owned by asterisk

Also I have “Apply Config” button in right corner but when I click it, it gives an error and says to fix errors on the dashboard (listed above)

more about that retrieve_conf error when hitting apply config

exit: 1
Whoops\Exception\ErrorException: mkdir(): Invalid path in file /var/www/html/admin/libraries/BMO/Media.class.php on line 34
Stack trace:

  1. Whoops\Exception\ErrorException->() /var/www/html/admin/libraries/BMO/Media.class.php:34
  2. Whoops\Run->handleError() :0
  3. mkdir() /var/www/html/admin/libraries/BMO/Media.class.php:34
  4. FreePBX\Media->__construct() /var/www/html/admin/libraries/BMO/Self_Helper.class.php:125
  5. FreePBX\Self_Helper->autoLoad() /var/www/html/admin/libraries/BMO/Self_Helper.class.php:37
  6. FreePBX\Self_Helper->__get() /var/lib/asterisk/bin/retrieve_conf:59

Do an amportal chown to set your file permissions. Also go into asterisk with asterisk -r and do module show like sip to see if chan_sip even loaded.

I did amportal chown twice, i also did check chan_sip module and its loaded and supposedly fine

amportal chown, error during the process:

PHP Fatal error:  Uncaught exception 'Whoops\Exception\ErrorException' with message 'Undefined index: PHP_CONSOLE' in /var/www/html/admin/bootstrap.php:183
Stack trace:
#0 /var/www/html/admin/bootstrap.php(183): Whoops\Run->handleError(8, 'Undefined index...', '/var/www/html/a...', 183, Array)
#1 /etc/freepbx.conf(9): require_once('/var/www/html/a...')
#2 Command line code(5): include_once('/etc/freepbx.co...')
#3 {main}
  thrown in /var/www/html/admin/bootstrap.php on line 183
/usr/sbin/amportal: line 44: Whoops\Exception\ErrorException:: command not found
raspbx*CLI> module show like sip
Module                         Description                              Use Count  Status      Support Level
app_adsiprog.so                Asterisk ADSI Programming Application    0          Running          extended
chan_sip.so                    Session Initiation Protocol (SIP)        0          Running              core
2 modules loaded

wow you got quite a mess lol. Try setting permissions as follows. may be redundant but worth a shot.

useradd -m asterisk
chown asterisk. /var/run/asterisk
chown -R asterisk. /etc/asterisk
chown -R asterisk. /var/{lib,log,spool}/asterisk
chown -R asterisk. /usr/lib/asterisk

Thanks! I did that

I tested after and it didnt work but i will reboot and wait 10minutes (how long it takes for RasPBX to load asterisk)

that’s just ridiculous lol.

To be honest people have asked me about using the Pi for a pbx i usually point them to getting an Intel NUC. Little more expensive but for a smaller set up it works very well. I’ve used them for makeshift SBC as well.

The command is ‘fwconsole chown’, not ‘amportal chown’. And this looks a lot like an incorrect upgrade. That error you pasted makes me think you’re running a newer version of PHP than FreePBX 13 supports.

You’ll need to upgrade to FreePBX 14 if you want to use PHP 5.6 or higher.

PHP version is 5.6.29

That must be it …

FreePBX is

Yes NUC for mini-pc, Raspberry pi for, well whatever an rpi is good for, which isnt much


All you need to do is replace freepbx-13.0-latest.tgz with freepbx-14.0-latest.tgz and it’ll upgrade.

I use it for a monitor of my SIP servers lol. Glorified web browser