Problem with reinstalling freepbx

NethServer Version: 7.9
Module: freepbx

Good afternoon, who could help me with an uninstallation of freepbx, I did the complete uninstallation, but when reinstalling it no longer creates the path / var / www / html / freepbx.
Which may be?

Hi @jfhoyosm,

welcome to NethServer Community.

See following post to get options for uninstalling freepbx:

Thanks @mrmarkuz for answering quickly; I tell you that I look at the posts and in one of them I had the guide to uninstall it completely, and I had no errors, only that when I reinstalled it, neither the asterisk nor I have the /var/www/html/freepbx folder.

My steps were the following:

yum remove nethserver-freepbx nethserver-janus freepbx
rm -Rf /var/www/html/freepbx
rm /etc/freepbx.conf
delete BD asterisk and asteriskcdrdb
yum remove *asterisk*
rm -Rf /etc/asterisk/
rm -Rf /var/log/asterisk/
rm -Rf /var/lib/asterisk/
rm /var/spool/cron/asterisk
rm /var/spool/asterisk
rm /etc/httpd/conf.d/freepbx.conf
rm /etc/freepbx.conf

Please check /var/log/freepbx_rpm_install.log for errors to maybe see why freepbx wasn’t installed.
Meanwhile I’m going to check it in a VM…

> Reading /etc/asterisk/asterisk.conf...Done
> Checking if Asterisk is running and we can talk to it as the 'asterisk' user...Error!
> Error communicating with Asterisk.  Ensure that Asterisk is properly installed and running as the asterisk user
> Asterisk does not appear to be running
> Try starting Asterisk with the './start_asterisk start' command in this directory
> PHP Warning:  include_once(/etc/freepbx.conf): failed to open stream: No such file or directory in /var/lib/asterisk/bin/fwconsole on line 12
> PHP Warning:  include_once(): Failed opening '/etc/freepbx.conf' for inclusion (include_path='.:/opt/rh/rh-php56/root/usr/share/pear:/opt/rh/rh-php56/root/usr/share/php') in /var/lib/asterisk/bin/fwconsole on line 12
> PHP Warning:  include(/var/www/html/admin/libraries/FWApplication.class.php): failed to open stream: No such file or directory in /var/lib/asterisk/bin/fwconsole on line 66
> PHP Warning:  include(): Failed opening '/var/www/html/admin/libraries/FWApplication.class.php' for inclusion (include_path='.:/opt/rh/rh-php56/root/usr/share/pear:/opt/rh/rh-php56/root/usr/share/php') in /var/lib/asterisk/bin/fwconsole on line 66
> PHP Warning:  include(/var/www/html/admin/libraries/FWHelper.class.php): failed to open stream: No such file or directory in /var/lib/asterisk/bin/fwconsole on line 67
> PHP Warning:  include(): Failed opening '/var/www/html/admin/libraries/FWHelper.class.php' for inclusion (include_path='.:/opt/rh/rh-php56/root/usr/share/pear:/opt/rh/rh-php56/root/usr/share/php') in /var/lib/asterisk/bin/fwconsole on line 67
> PHP Warning:  include(/var/www/html/admin/libraries/FWList.class.php): failed to open stream: No such file or directory in /var/lib/asterisk/bin/fwconsole on line 68
> PHP Warning:  include(): Failed opening '/var/www/html/admin/libraries/FWList.class.php' for inclusion (include_path='.:/opt/rh/rh-php56/root/usr/share/pear:/opt/rh/rh-php56/root/usr/share/php') in /var/lib/asterisk/bin/fwconsole on line 68
> PHP Fatal error:  Class 'FreePBX' not found in /var/lib/asterisk/bin/fwconsole on line 74
> PHP Warning:  include_once(/etc/freepbx.conf): failed to open stream: No such file or directory in /var/lib/asterisk/bin/fwconsole on line 12
> PHP Warning:  include_once(): Failed opening '/etc/freepbx.conf' for inclusion (include_path='.:/opt/rh/rh-php56/root/usr/share/pear:/opt/rh/rh-php56/root/usr/share/php') in /var/lib/asterisk/bin/fwconsole on line 12
> PHP Warning:  include(/var/www/html/admin/libraries/FWApplication.class.php): failed to open stream: No such file or directory in /var/lib/asterisk/bin/fwconsole on line 66
> PHP Warning:  include(): Failed opening '/var/www/html/admin/libraries/FWApplication.class.php' for inclusion (include_path='.:/opt/rh/rh-php56/root/usr/share/pear:/opt/rh/rh-php56/root/usr/share/php') in /var/lib/asterisk/bin/fwconsole on line 66
> PHP Warning:  include(/var/www/html/admin/libraries/FWHelper.class.php): failed to open stream: No such file or directory in /var/lib/asterisk/bin/fwconsole on line 67
> PHP Warning:  include(): Failed opening '/var/www/html/admin/libraries/FWHelper.class.php' for inclusion (include_path='.:/opt/rh/rh-php56/root/usr/share/pear:/opt/rh/rh-php56/root/usr/share/php') in /var/lib/asterisk/bin/fwconsole on line 67
> PHP Warning:  include(/var/www/html/admin/libraries/FWList.class.php): failed to open stream: No such file or directory in /var/lib/asterisk/bin/fwconsole on line 68
> PHP Warning:  include(): Failed opening '/var/www/html/admin/libraries/FWList.class.php' for inclusion (include_path='.:/opt/rh/rh-php56/root/usr/share/pear:/opt/rh/rh-php56/root/usr/share/php') in /var/lib/asterisk/bin/fwconsole on line 68
> PHP Fatal error:  Class 'FreePBX' not found in /var/lib/asterisk/bin/fwconsole on line 74
>  *** Installing FreePBX
> Mon Feb  8 13:17:39 -05 2021
> Making sure asterisk user has bash as shell
> usermod: no changes
> Assuming you are Database Root
> Checking if SELinux is enabled...Its not (good)!
> No /etc/asterisk/asterisk.conf file detected. Installing...Writing /etc/asterisk/asterisk.conf...Done
> Checking if Asterisk is running and we can talk to it as the 'asterisk' user...Yes. Determined Asterisk version to be: 13.38.1
> Error!
> Half-baked install previously detected. /etc/amportal.conf should not exist if /etc/freepbx.conf does not exist
> /etc/e-smith/events/nethserver-freepbx-update/S55nethserver-freepbx-conf-scl: line 39: /usr/sbin/fwconsole: No such file or directory
> /etc/e-smith/events/nethserver-freepbx-update/S55nethserver-freepbx-conf-scl: line 40: /usr/sbin/fwconsole: No such file or directory

There’s a bug with the recent version, you may use this workaround until there’s a fix:

EDIT:

This may be relevant too, could be the reason for not installing freepbx:

EDIT2:

Here’s a complete list of dirs/files to remove:

It includes /etc/amportal.conf and /etc/freepbx.conf.

Look, the whole problem started when I switched to Nethserver version 7.9 and in freepbx any call like this between the extensions would get the following message: “I am sorry, your simultaneous call limit reached. Goodbye."
I mention it because in another client I also upgraded to 7.9 and I have the same problem with the message, this one I have not uninstalled the freepbx.

1 Like

So there are two issues.
The bug (see https://github.com/NethServer/dev/issues/6420) on both clients and you missed to remove some files on the client where freepbx doesn’t install.

Did you already try the workaround for the bug

yum downgrade glibc-devel glibc glibc-common glibc-headers

or removing /etc/amportal.conf and /etc/freepbx.conf ?

In which I had not uninstalled the freepbx, with the downgrade it was good, thank you very much; but I’m still tangled with the one who uninstalls the freepbx.

1 Like

You may try the following to reconfigure freepbx after removing the files:

rm /etc/amportal.conf /etc/freepbx.conf
signal-event nethserver-freepbx-update

At last I was able to install asterisk 13 with freepbx 14, I created the entire structure and as I have it in all my clients, but this is giving me communication failures, I can’t even communicate between extensions, maybe I think I’m missing some bookshop; still copy the answer from asterisk -rvvvvv:

[2021-02-09 07:49:41] WARNING[15816]: res_pjsip_pubsub.c:787 subscription_get_handler_from_rdata: No registered subscribe handler for event presence.winfo from 100
– Executing [s@sub-record-check:8] Set(“PJSIP/100-0000007d”, “__FROMEXTEN=100”) in new stack
– Executing [s@sub-record-check:9] Set(“PJSIP/100-0000007d”, “__MON_FMT=wav”) in new stack
– Executing [s@sub-record-check:10] NoOp(“PJSIP/100-0000007d”, “Recordings initialized”) in new stack
– Executing [s@sub-record-check:11] ExecIf(“PJSIP/100-0000007d”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [s@sub-record-check:12] Set(“PJSIP/100-0000007d”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [s@sub-record-check:13] ExecIf(“PJSIP/100-0000007d”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [s@sub-record-check:14] GotoIf(“PJSIP/100-0000007d”, “5?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [s@sub-record-check:17] GotoIf(“PJSIP/100-0000007d”, “1?sub-record-check,exten,1”) in new stack
– Goto (sub-record-check,exten,1)
– Executing [exten@sub-record-check:1] NoOp(“PJSIP/100-0000007d”, “Exten Recording Check between 100 and 100”) in new stack
– Executing [exten@sub-record-check:2] Set(“PJSIP/100-0000007d”, “CALLTYPE=internal”) in new stack
– Executing [exten@sub-record-check:3] ExecIf(“PJSIP/100-0000007d”, “0?Set(CALLTYPE=)”) in new stack
– Executing [exten@sub-record-check:4] Set(“PJSIP/100-0000007d”, “CALLEE=”) in new stack
– Executing [exten@sub-record-check:5] ExecIf(“PJSIP/100-0000007d”, “1?Set(CALLEE=dontcare)”) in new stack
– Executing [exten@sub-record-check:6] GotoIf(“PJSIP/100-0000007d”, “0?callee”) in new stack
– Executing [exten@sub-record-check:7] GotoIf(“PJSIP/100-0000007d”, “1?caller”) in new stack
– Goto (sub-record-check,exten,13)
– Executing [exten@sub-record-check:13] Set(“PJSIP/100-0000007d”, “RECMODE=”) in new stack
– Executing [exten@sub-record-check:14] ExecIf(“PJSIP/100-0000007d”, “1?Set(RECMODE=dontcare)”) in new stack
– Executing [exten@sub-record-check:15] ExecIf(“PJSIP/100-0000007d”, “1?Set(RECMODE=dontcare)”) in new stack
– Executing [exten@sub-record-check:16] Gosub(“PJSIP/100-0000007d”, “recordcheck,1(dontcare,internal,100)”) in new stack
– Executing [recordcheck@sub-record-check:1] NoOp(“PJSIP/100-0000007d”, “Starting recording check against dontcare”) in new stack
– Executing [recordcheck@sub-record-check:2] Goto(“PJSIP/100-0000007d”, “dontcare”) in new stack
– Goto (sub-record-check,recordcheck,3)
– Executing [recordcheck@sub-record-check:3] Return(“PJSIP/100-0000007d”, “”) in new stack
– Executing [exten@sub-record-check:17] Return(“PJSIP/100-0000007d”, “”) in new stack
– Executing [s@macro-exten-vm:7] GotoIf(“PJSIP/100-0000007d”, “1?macrodial”) in new stack
– Goto (macro-exten-vm,s,13)
– Executing [s@macro-exten-vm:13] GosubIf(“PJSIP/100-0000007d”, “0?clrheader,1()”) in new stack
– Executing [s@macro-exten-vm:14] Macro(“PJSIP/100-0000007d”, “dial-one,HhTtr,100”) in new stack
– Executing [s@macro-dial-one:1] Set(“PJSIP/100-0000007d”, “DEXTEN=100”) in new stack
– Executing [s@macro-dial-one:2] ExecIf(“PJSIP/100-0000007d”, “0?Set(__EXTTOCALL=100)”) in new stack
– Executing [s@macro-dial-one:3] Set(“PJSIP/100-0000007d”, “DIALSTATUS_CW=”) in new stack
– Executing [s@macro-dial-one:4] GosubIf(“PJSIP/100-0000007d”, “0?screen,1()”) in new stack
– Executing [s@macro-dial-one:5] GosubIf(“PJSIP/100-0000007d”, “0?cf,1()”) in new stack
– Executing [s@macro-dial-one:6] GotoIf(“PJSIP/100-0000007d”, “1?skip1”) in new stack
– Goto (macro-dial-one,s,9)
– Executing [s@macro-dial-one:9] GotoIf(“PJSIP/100-0000007d”, “0?nodial”) in new stack
– Executing [s@macro-dial-one:10] GotoIf(“PJSIP/100-0000007d”, “0?continue”) in new stack
– Executing [s@macro-dial-one:11] Set(“PJSIP/100-0000007d”, “EXTHASCW=”) in new stack
– Executing [s@macro-dial-one:12] GotoIf(“PJSIP/100-0000007d”, “1?next1:cwinusebusy”) in new stack
– Goto (macro-dial-one,s,13)
– Executing [s@macro-dial-one:13] GotoIf(“PJSIP/100-0000007d”, “0?docfu:skip3”) in new stack
– Goto (macro-dial-one,s,17)
– Executing [s@macro-dial-one:17] GotoIf(“PJSIP/100-0000007d”, “1?next2:continue”) in new stack
– Goto (macro-dial-one,s,18)
– Executing [s@macro-dial-one:18] GotoIf(“PJSIP/100-0000007d”, “1?continue”) in new stack
– Goto (macro-dial-one,s,26)
– Executing [s@macro-dial-one:26] GotoIf(“PJSIP/100-0000007d”, “0?nodial”) in new stack
– Executing [s@macro-dial-one:27] GosubIf(“PJSIP/100-0000007d”, “1?dstring,1():dlocal,1()”) in new stack
– Executing [dstring@macro-dial-one:1] Set(“PJSIP/100-0000007d”, “DSTRING=”) in new stack
– Executing [dstring@macro-dial-one:2] Set(“PJSIP/100-0000007d”, “DEVICES=”) in new stack
– Executing [dstring@macro-dial-one:3] ExecIf(“PJSIP/100-0000007d”, “1?Return()”) in new stack
– Executing [s@macro-dial-one:28] GotoIf(“PJSIP/100-0000007d”, “1?nodial”) in new stack
– Goto (macro-dial-one,s,59)
– Executing [s@macro-dial-one:59] NoOp(“PJSIP/100-0000007d”, “”) in new stack
– Executing [s@macro-dial-one:60] ExecIf(“PJSIP/100-0000007d”, “1?Set(DIALSTATUS=NOANSWER)”) in new stack
– Executing [s@macro-dial-one:61] NoOp(“PJSIP/100-0000007d”, “Returned from dial-one with nothing to call and DIALSTATUS: NOANSWER”) in new stack
– Executing [s@macro-dial-one:62] MacroExit(“PJSIP/100-0000007d”, “”) in new stack
– Executing [s@macro-exten-vm:15] Set(“PJSIP/100-0000007d”, “SV_DIALSTATUS=NOANSWER”) in new stack
– Executing [s@macro-exten-vm:16] GosubIf(“PJSIP/100-0000007d”, “0?docfu,1()”) in new stack
– Executing [s@macro-exten-vm:17] GosubIf(“PJSIP/100-0000007d”, “0?docfb,1()”) in new stack
– Executing [s@macro-exten-vm:18] Set(“PJSIP/100-0000007d”, “DIALSTATUS=NOANSWER”) in new stack
– Executing [s@macro-exten-vm:19] ExecIf(“PJSIP/100-0000007d”, “0?MacroExit()”) in new stack
– Executing [s@macro-exten-vm:20] GotoIf(“PJSIP/100-0000007d”, “1?s-NOANSWER,1”) in new stack
– Goto (macro-exten-vm,s-NOANSWER,1)
– Executing [s-NOANSWER@macro-exten-vm:1] GotoIf(“PJSIP/100-0000007d”, “0?exit,1”) in new stack
– Executing [s-NOANSWER@macro-exten-vm:2] PlayTones(“PJSIP/100-0000007d”, “congestion”) in new stack
– Executing [s-NOANSWER@macro-exten-vm:3] Congestion(“PJSIP/100-0000007d”, “10”) in new stack
== Spawn extension (macro-exten-vm, s-NOANSWER, 3) exited non-zero on ‘PJSIP/100-0000007d’ in macro ‘exten-vm’
== Spawn extension (ext-local, 100, 3) exited non-zero on ‘PJSIP/100-0000007d’
– Executing [h@ext-local:1] Macro(“PJSIP/100-0000007d”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/100-0000007d”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/100-0000007d”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] NoOp(“PJSIP/100-0000007d”, " montior file= ") in new stack
– Executing [s@macro-hangupcall:5] GotoIf(“PJSIP/100-0000007d”, “1?skipagi”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] Hangup(“PJSIP/100-0000007d”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘PJSIP/100-0000007d’ in macro ‘hangupcall’
== Spawn extension (ext-local, h, 1) exited non-zero on ‘PJSIP/100-0000007d’
[2021-02-09 07:49:41] WARNING[15816]: res_pjsip_pubsub.c:3434 pubsub_on_rx_publish_request: No registered publish handler for event presence from 100
[2021-02-09 07:49:41] WARNING[15816]: res_pjsip_pubsub.c:787 subscription_get_handler_from_rdata: No registered subscribe handler for event presence.winfo from 100
– Executing [s@from-sip-external:11] PlayTones(“PJSIP/anonymous-0000007b”, “congestion”) in new stack
– Executing [s@from-sip-external:12] Congestion(“PJSIP/anonymous-0000007b”, “5”) in new stack
== Spawn extension (from-sip-external, s, 12) exited non-zero on ‘PJSIP/anonymous-0000007b’
– Executing [T@from-sip-external:1] NoOp(“PJSIP/anonymous-0000007b”, “Received incoming SIP connection from unknown peer to T”) in new stack
– Executing [T@from-sip-external:2] Set(“PJSIP/anonymous-0000007b”, “DID=s”) in new stack
– Executing [T@from-sip-external:3] Goto(“PJSIP/anonymous-0000007b”, “s,1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [s@from-sip-external:1] GotoIf(“PJSIP/anonymous-0000007b”, “1?setlanguage:checkanon”) in new stack
– Goto (from-sip-external,s,2)
– Executing [s@from-sip-external:2] Set(“PJSIP/anonymous-0000007b”, “CHANNEL(language)=es”) in new stack
– Executing [s@from-sip-external:3] GotoIf(“PJSIP/anonymous-0000007b”, “1?noanonymous”) in new stack
– Goto (from-sip-external,s,5)
– Executing [s@from-sip-external:5] Set(“PJSIP/anonymous-0000007b”, “TIMEOUT(absolute)=15”) in new stack
– Channel will hangup at 2021-02-09 07:50:06.633 -05.
– Executing [s@from-sip-external:6] Set(“PJSIP/anonymous-0000007b”, “receveip=pjsip,remote_addr”) in new stack
– Executing [s@from-sip-external:7] Log(“PJSIP/anonymous-0000007b”, "WARNING,“Rejecting unknown SIP connection from 37.187.148.124:58612"”) in new stack
[2021-02-09 07:49:51] WARNING[21641][C-00000074]: Ext. s:7 @ from-sip-external: “Rejecting unknown SIP connection from 37.187.148.124:58612”
– Executing [s@from-sip-external:8] Answer(“PJSIP/anonymous-0000007b”, “”) in new stack
– Executing [s@from-sip-external:9] Wait(“PJSIP/anonymous-0000007b”, “2”) in new stack
– Executing [s@from-sip-external:10] Playback(“PJSIP/anonymous-0000007b”, “ss-noservice”) in new stack
– <PJSIP/anonymous-0000007b> Playing ‘ss-noservice.ulaw’ (language ‘es’)
[2021-02-09 07:49:54] WARNING[15816]: res_pjsip_registrar.c:1113 registrar_on_rx_request: Endpoint ‘anonymous’ has no configured AORs
– Executing [h@from-sip-external:1] Hangup(“PJSIP/anonymous-0000007b”, “”) in new stack
== Spawn extension (from-sip-external, h, 1) exited non-zero on ‘PJSIP/anonymous-0000007b’
[2021-02-09 07:50:04] WARNING[15816]: res_pjsip_registrar.c:1113 registrar_on_rx_request: Endpoint ‘anonymous’ has no configured AORs
[2021-02-09 07:50:08] WARNING[15816]: res_pjsip_registrar.c:1113 registrar_on_rx_request: Endpoint ‘anonymous’ has no configured AORs

The strange thing is that the users appear to me offline in the freepbx but they are all registered.

Which version of glibc do you use?

[root@server2 ~]# rpm -qa glibc
glibc-2.17-323.el7_9.x86_64

Glibc update may fix the issue, see Glibc update breaks Asterisk · Issue #6420 · NethServer/dev · GitHub

yum update glibc

If it’s not related to the bug then maybe best solution is to go through the uninstall process again and reinstall or do a full reinstallation of the Nethserver (if there’s just freepbx installed)

If you created the structure manually, freepbx may not be installed correctly.

Unfortunately I have almost all the nethserver services running, doing an installation from the beginning is a bit difficult, based on the fact that I am not located in the city, but I really appreciate your help, now I will look for a way to do that reinstallation from the beginning .
To finish, I have tried to install some additional modules of asterisk13 and I get the following error, this could give me a light:

[root@nethserver ~]# yum install asterisk13-voicemail
Loaded plugins: changelog, fastestmirror, nethserver_events
Loading mirror speeds from cached hostfile
 * ce-base: mirror.ilumno.com
 * ce-extras: mirror.ilumno.com
 * ce-sclo-rh: mirror.ilumno.com
 * ce-sclo-sclo: mirror.ilumno.com
 * ce-updates: mirror.ilumno.com
 * epel: ewr.edge.kernel.org
 * nethforge: mirror.nethserver.org
 * nethserver-base: mirror.nethserver.org
 * nethserver-updates: mirror.nethserver.org
Resolving Dependencies
--> Running transaction check
---> Package asterisk13-voicemail.x86_64 0:13.38.1-1.ns7 will be installed
--> Processing Conflict: asterisk13-voicemail-odbcstorage-13.38.1-1.ns7.x86_64 conflicts asterisk13-voicemail-filestorage
--> Processing Conflict: asterisk13-voicemail-13.38.1-1.ns7.x86_64 conflicts asterisk13-voicemail-odbcstorage
--> Finished Dependency Resolution
Error: asterisk13-voicemail conflicts with asterisk13-voicemail-odbcstorage-13.38.1-1.ns7.x86_64
Error: asterisk13-voicemail-odbcstorage conflicts with asterisk13-voicemail-13.38.1-1.ns7.x86_64
 You could try using --skip-broken to work around the problem
1 Like

I think best way is to install from Software Center or use

yum install nethserver-freepbx

This will install all needed dependencies.

Many thanks. I did it this way and everything was perfect.

1 Like