IncrediblePBX.md
· 2.3 KiB · Markdown
Raw
## Prerequisites
```shell
apt install -yy sudo bash bash-completion libtiff-tools ghostscript wget curl lame festival flite espeak-ng-espeak
```
## install
```shell
sudo su - && cd /root && \
wget http://incrediblepbx.com/IncrediblePBX2027-D.sh && \
chmod +x IncrediblePBX2027-D.sh && \
./IncrediblePBX2027-D.sh
```
## switch to postfix
```shell
systemctl stop sendmail;systemctl disable --now sendmail
systemctl start postfix;systemctl enable --now postfix
apt install -yy postfix && apt remove sendmail --purge
sed -i 's|-c sendmail|-c postfix|' /usr/local/sbin/pbxstatus
sed -i 's|SendMail| Postfix|' /usr/local/sbin/pbxstatus
systemctl status postfix
```
## configure
```shell
/root/timezone-setup
```
```shell
/root/admin-pw-change
```
```shell
/root/apache-pw-change
```
## Autoupdate modules
```shell
cat <<EOF >/etc/cron.d/asterisk_module_update
0 4 1 * * root (rm -f /tmp/*;fwconsole ma upgradeall;fwconsole reload;/root/sig-fix;systemctl restart apache2;/root/sig-fix) >/dev/null 2>/dev/null
EOF
```
## faxing
```shell
sed -i '/^\[custom-fax/,/^$/d' /etc/asterisk/extensions_custom.conf
```
```shell
echo '
[ext-group](+)
exten => fax,1,Noop(Fax detected)
exten => fax,2,Goto(custom-fax-iaxmodem,s,1)
[custom-fax-iaxmodem]
exten => s,1,Answer
exten => s,n,Wait(1)
exten => s,n,Verbose(3,Incoming Fax)
exten => s,n,Set(FAXEMAIL=) ; fax email address of recipient
exten => s,n,Set(FAXDEST=/tmp) ; folder where faxes will be stored
exten => s,n,Set(tempfax=${STRFTIME(,,%C%y%m%d%H%M)})
exten => s,n,ReceiveFax(${FAXDEST}/${tempfax}.tif)
exten => s,n,System(/usr/bin/tiff2pdf -o "${FAXDEST}/${tempfax}.pdf" "${FAXDEST}/${tempfax}.tif")
exten => s,n,System(/usr/bin/echo "Incoming fax is attached." | /usr/bin/mail -s "Incoming FAX Received" -A "${FAXDEST}/${tempfax}.pdf" "${FAXEMAIL}")
exten => s,n,Hangup
' >> /etc/asterisk/extensions_custom.conf
```
```shell
sed -i 's|FAXEMAIL=|FAXEMAIL=fax-admin@'$HOSTNAME'|' /etc/asterisk/extensions_custom.conf
```
```shell
fwconsole ma downloadinstall fax
```
```shell
rm /tmp/*
```
```shell
fwconsole reload
```
## Get info
```shell
/root/show-passwords
```
```shell
/root/show-feature-codes
```
## links
<https://nerdvittles.com/1-a-month-buys-a-cloud-powerhouse-for-incredible-pbx-2027/>
<https://nerdvittles.com/faxing-returns-for-incredible-pbx-2027-platform>
Prerequisites
apt install -yy sudo bash bash-completion libtiff-tools ghostscript wget curl lame festival flite espeak-ng-espeak
install
sudo su - && cd /root && \
wget http://incrediblepbx.com/IncrediblePBX2027-D.sh && \
chmod +x IncrediblePBX2027-D.sh && \
./IncrediblePBX2027-D.sh
switch to postfix
systemctl stop sendmail;systemctl disable --now sendmail
systemctl start postfix;systemctl enable --now postfix
apt install -yy postfix && apt remove sendmail --purge
sed -i 's|-c sendmail|-c postfix|' /usr/local/sbin/pbxstatus
sed -i 's|SendMail| Postfix|' /usr/local/sbin/pbxstatus
systemctl status postfix
configure
/root/timezone-setup
/root/admin-pw-change
/root/apache-pw-change
Autoupdate modules
cat <<EOF >/etc/cron.d/asterisk_module_update
0 4 1 * * root (rm -f /tmp/*;fwconsole ma upgradeall;fwconsole reload;/root/sig-fix;systemctl restart apache2;/root/sig-fix) >/dev/null 2>/dev/null
EOF
faxing
sed -i '/^\[custom-fax/,/^$/d' /etc/asterisk/extensions_custom.conf
echo '
[ext-group](+)
exten => fax,1,Noop(Fax detected)
exten => fax,2,Goto(custom-fax-iaxmodem,s,1)
[custom-fax-iaxmodem]
exten => s,1,Answer
exten => s,n,Wait(1)
exten => s,n,Verbose(3,Incoming Fax)
exten => s,n,Set(FAXEMAIL=) ; fax email address of recipient
exten => s,n,Set(FAXDEST=/tmp) ; folder where faxes will be stored
exten => s,n,Set(tempfax=${STRFTIME(,,%C%y%m%d%H%M)})
exten => s,n,ReceiveFax(${FAXDEST}/${tempfax}.tif)
exten => s,n,System(/usr/bin/tiff2pdf -o "${FAXDEST}/${tempfax}.pdf" "${FAXDEST}/${tempfax}.tif")
exten => s,n,System(/usr/bin/echo "Incoming fax is attached." | /usr/bin/mail -s "Incoming FAX Received" -A "${FAXDEST}/${tempfax}.pdf" "${FAXEMAIL}")
exten => s,n,Hangup
' >> /etc/asterisk/extensions_custom.conf
sed -i 's|FAXEMAIL=|FAXEMAIL=fax-admin@'$HOSTNAME'|' /etc/asterisk/extensions_custom.conf
fwconsole ma downloadinstall fax
rm /tmp/*
fwconsole reload
Get info
/root/show-passwords
/root/show-feature-codes
links
https://nerdvittles.com/1-a-month-buys-a-cloud-powerhouse-for-incredible-pbx-2027/
https://nerdvittles.com/faxing-returns-for-incredible-pbx-2027-platform