All YAP (Yet Another PBX) Go, BASH, SQL, HTML and CSS code, configuration files, guides and instructions are 100% designed, written and developed by a human programmer - IN THE INTEREST OF SECURITY AND QUALITY AI WILL NEVER BE USED
YAP (Yet Another PBX) - A GUI to administrate a multi-tenanted SIP Server, automatically creates invoices and connects to 3rd party accountancy software to send invoices. YAP is written in Go and uses the Asterisk framework.
(Tested with Ubuntu version 24.04.3 and Asterisk certified version 20.7-cert8)
- Demo logged in as a YAP Admin (100) account - https://yap100.ell.today/yap
- Demo logged in as a YAP Customer Admin (200) account - https://yap200.ell.today/yap
- Demo logged in as a YAP PBX Admin (300) account - https://yap300.ell.today/yap
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
|---|---|---|---|---|---|---|---|
| View Own User Account | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Update Own User Account | ✅* | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Delete Own User Account | ✅** | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| Create a YAP Admin (100) User Account |
✅* | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| View a YAP Admin (100) User Account |
✅* | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Update a YAP Admin (100) | ✅* | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Delete a YAP Admin (100) | ✅** | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| Create a Customer Admin (200) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| View a Customer Admin (200) | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Update a Customer Admin (200) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Delete a Customer Admin (200) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| Create a Customer Regular (201) User Account |
✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| View a Customer Regular (201) User Account |
✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Update a Customer Regular (201) User Account |
✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Delete a Customer Regular (201) User Account |
✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| Create a PBX Admin (300) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| View a PBX Admin (300) User Account |
✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
| Update a PBX Admin (300) User Account |
✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Delete a PBX Admin (300) User Account |
✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| Create a PBX Regular (301) User Account |
✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| View a PBX Regular (301) User Account |
✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
| Update a PBX Regular (301) User Account |
✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Delete a PBX Regular (301) User Account |
✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| Create a PBX Read Only (302) User Account |
✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| View a PBX Read Only (302) User Account |
✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
| Update a PBX Read Only (302) User Account |
✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Delete a PBX Read Only (302) User Account |
✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| Create a Customer Invoice (400) User Account | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| View a Customer Invoice (400) User Account | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Update a Customer Invoice (400) User Account | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Delete a Customer Invoice (400) User Account | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| View Own Customer | ⛔ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ❌ |
| Update Own Customer | ⛔ | ❌ | ❌ | ⛔ | ⛔ | ⛔ | ❌ |
| Delete Own Customer | ⛔ | ❌ | ❌ | ⛔ | ⛔ | ⛔ | ❌ |
| YAP Admin (100) | Group Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| Create a Customer | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| View a Customer | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Update a Customer | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Delete a Customer | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| View Own PBX | ⛔ | ⛔ | ⛔ | ✅ | ✅ | ✅ | ⛔ |
| Update Own PBX | ⛔ | ⛔ | ⛔ | ❌ | ❌ | ❌ | ⛔ |
| Delete Own PBX | ⛔ | ⛔ | ⛔ | ❌ | ❌ | ❌ | ⛔ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| Create Another PBX | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| View Another PBX | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Update Another PBX | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Delete Another PBX | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| Create an Extension | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
| View an Extension | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
| Update an Extension | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
| Delete an Extension | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| Create a Customer Invoice | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| View a Customer Invoice | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
| Update a Customer Invoice | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Delete a Customer Invoice | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| Create a Service/Product | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| View a Service/Product | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Update a Service/Product | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Delete a Service/Product | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| Create a Supplier | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| View a Supplier | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Update a Supplier | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Delete a Supplier | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| Create a Sales Tax Rate | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| View a Sales Tax Rate | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Update a Sales Tax Rate | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Delete a Sales Tax Rate | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| YAP Admin (100) | Customer Admin (200) | Customer Regular (201) | PBX Admin (300) | PBX Regular (301) | PBX Read Only (302) | Customer Invoice (400) | |
| Connect to the Accounting Software | ✅*** | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Send Invoices | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Update a Single Customer Details | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Update All Customer Details | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
*Only the YAP Admin (100) account with account ID 1 can create and delete other YAP Admin (100) accounts
**The YAP Admin (100) account with account ID 1 cannot be deleted
***Only the YAP Admin (100) account with account ID 1 can connect to the accounting software
Tip
Underscores are used for contexts names because MariaDB does not like hyphens in table names.
Transport 🚕 naming format:
- IPv4-UDP
- IPv4-TCP
- IPv4-TLS
- IPv6-UDP
- IPv6-TCP
- IPv6-TLS
Extensions 📲 naming format:
- 200-13995787344150533 (Endpoint)
- 200-13995787344150533 (AOR)
- 200-13995787344150533 (AUTH)
- inbound_13995787344150533 (Context)
Note
For more detailed instructions on compiling and installing Asterisk please see my guide: Compiling a Phone System (Asterisk 20.7-cert8) on Ubuntu 24.04.3
1) Install Asterisk dependencies:
apt install unixodbc odbc-mariadb wget build-essential libjansson-dev autoconf libxml2-dev libncurses-dev libedit-dev uuid-dev libsqlite3-dev libnewt-dev automake unixodbc-dev sqlite3 libsrtp2-dev libtool libssl-dev libcurl4-gnutls-dev
2) Change to the /root directory (must be root):
cd /root
3) Download Asterisk source code:
wget https://downloads.asterisk.org/pub/telephony/certified-asterisk/asterisk-certified-20.7-cert8.tar.gz
4) Download the Asterisk teams PGP signature:
wget https://downloads.asterisk.org/pub/telephony/certified-asterisk/asterisk-certified-20.7-cert8.tar.gz.asc
5) Import the Asterisk teams public key from the Ubuntu key server:
gpg --keyserver keyserver.ubuntu.com --recv 0xF2FC93DB7587BD1FB49E045A5D984BE337191CE7
6) Verify the compressed tar file against the Asterisk teams PGP signature using GPG:
gpg --verify asterisk-certified-20.7-cert8.tar.gz.asc asterisk-certified-20.7-cert8.tar.gz
Output should show a good signature from the Asterisk team:
gpg: Signature made Mon Jan 12 16:33:21 2026 UTC
gpg: using RSA key F2FC93DB7587BD1FB49E045A5D984BE337191CE7
gpg: Good signature from "Asterisk Development Team <asteriskteam@digium.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: F2FC 93DB 7587 BD1F B49E 045A 5D98 4BE3 3719 1CE7
Warning
IF THE OUTPUT SHOWS A BAD SIGNATURE LIKE THIS:
gpg: Signature made Mon Jan 12 16:33:21 2026 UTC
gpg: using RSA key F2FC93DB7587BD1FB49E045A5D984BE337191CE7
gpg: BAD signature from "Asterisk Development Team <asteriskteam@digium.com>" [unknown]
DELETE THE asterisk-certified-20.7-cert8.tar.gz FILE!!!
7) If the signature was good decompress and untar the Asterisk source code
tar -xvzf asterisk-certified-20.7-cert8.tar.gz
8) Change the working directory to the asterisk-certified-20.7-cert8 directory:
cd /root/asterisk-certified-20.7-cert8
9) Run the configure script:
./configure
10) Run the menu selection system to decide which modules should be compiled:
make menuselect
Applications:
- app_voicemail_odbc
- app_attended_transfer
- app_blind_transfer
- app_statsd
Call Detail Recording:
- cdr_csv
- cdr_odbc
PBX Modules:
- pbx_realtime
Resource Modules:
- res_stasis_mailbox
- res_endpoint_stats
- res_pjsip_history
- res_prometheus
Core Sound Packages:
- CORE-SOUNDS-EN_GB-WAV
- CORE-SOUNDS-EN_GB-ULAW
- CORE-SOUNDS-EN_GB-ALAW
- CORE-SOUNDS-EN_GB-GSM
- CORE-SOUNDS-EN_GB-G729
- CORE-SOUNDS-EN_GB-G722
- CORE-SOUNDS-EN_GB-SLN16
- CORE-SOUNDS-EN_GB-SIREN7
- CORE-SOUNDS-EN_GB-SIREN14
Music On Hold File Packages:
- MOH-OPSOUND-ULAW
- MOH-OPSOUND-ALAW
- MOH-OPSOUND-GSM
- MOH-OPSOUND-G729
- MOH-OPSOUND-G722
- MOH-OPSOUND-SLN16
- MOH-OPSOUND-SIREN7
- MOH-OPSOUND-SIREN14
Extras Sound Packages:
- EXTRA-SOUNDS-EN_GB-WAV
- EXTRA-SOUNDS-EN_GB-ULAW
- EXTRA-SOUNDS-EN_GB-ALAW
- EXTRA-SOUNDS-EN_GB-GSM
- EXTRA-SOUNDS-EN_GB-G729
- EXTRA-SOUNDS-EN_GB-G722
- EXTRA-SOUNDS-EN_GB-SLN16
- EXTRA-SOUNDS-EN_GB-SIREN7
- EXTRA-SOUNDS-EN_GB-SIREN14
11) Run the configure script again:
./configure
12) Compile the source code:
make
13) Install Asterisk:
make install
1) Create a system user named pbx with no shell for the Asterisk daemon:
useradd -r -s /bin/false pbx
2) Lock the pbx user
usermod -L pbx
3) Edit /etc/asterisk/asterisk.conf so Asterisk runs as the user pbx:
runuser = pbx ; The user to run as.
rungroup = pbx ; The group to run as.
4) Recursively change the group and permissions for Asterisk configuration files:
chown -R root:pbx /etc/asterisk && chmod 550 /etc/asterisk && chmod 440 /etc/asterisk/*
5) Recursively change the group and permissions for the Asterisk voicemail and call recording files:
chown -R pbx:pbx /var/spool/asterisk && chmod -R 770 /var/spool/asterisk
6) Recursively change the group and permissions for Asterisk log files
chown -R pbx:pbx /var/log/asterisk && chmod -R 770 /var/log/asterisk
7) Copy the Asterisk systemd service file:
cp /root/yap/systemd/asterisk.service /usr/lib/systemd/system/
8) Reload the systemd manager configuration:
systemctl daemon-reload
9) Make a directory for the SQLite database
mkdir /var/lib/asterisk/database
10) Change the SQLite database directory permissions and group:
chmod 570 /var/lib/asterisk/database && chgrp pbx /var/lib/asterisk/database
Tip
If a firewall 🔥🧱 is enabled, set Asterisk to automatically start 🟢 at boot:
systemctl enable asterisk
To stop 🔴 Asterisk starting at boot:
systemctl disable asterisk
Tip
To enter 🚪 Asterisk:
sudo -u pbx asterisk -rvvvvv
Tip
To find 🔍 and fix 🪛 faults
/usr/sbin/asterisk -mqfv -C /etc/asterisk/asterisk.conf
1) Install the Python interface for MySQL and Alembic
apt install python3-mysqldb alembic
2) Change the working directory
cd /root/asterisk-certified-20.7-cert8/contrib/ast-db-manage
3) Copy the sample configuration file and rename it (must add username, password and other details inside the config.ini)
cp config.ini.sample config.ini
4) Create a database named asterisk in MariaDB
create database asterisk;
5) Run Alembic
alembic -c config.ini upgrade head
Generate a Self-Signed ECDSA Key 🔑 and Certificate 📜 for MariaDB Using the OpenSSL Cryptographic Library 📚
Caution
A more secure method than the steps listed below is to generate all the files on a seprate computer that is isolated away from the YAP server and then transfer the mariadb.crt, mariadb.key and yap-ca.crt to the YAP server using the SCP (Secure Copy Protocol). For better security the yap-ca.key should not be on the YAP server because it can be used to sign certificate signing requests.
1) Make a directory for the files and change into the directory (must be root):
mkdir /root/mariadb-openssl && cd /root/mariadb-openssl
2) Generate the Certificate Authority (CA) key:
openssl ecparam -genkey -name secp384r1 -out yap-ca.key
3) Generate a certificate Authority Certificate (CA) with expiry of 7300 days (20 years):
openssl req -x509 -new -SHA384 -nodes -key yap-ca.key -days 7300 -out yap-ca.crt
4) Generate a key for the MariaDB server:
openssl ecparam -genkey -name secp384r1 -out mariadb.key
5) Generate a CSR (Certificate Signing Request):
openssl req -new -SHA384 -key mariadb.key -nodes -out mariadb.csr
6) Generate an extensions file:
touch extensions.ext
7) The contents of the extensions.ext file:
authorityKeyIdentifier = keyid, issuer
basicConstraints = critical, CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = localhost
DNS.2 = 127.0.0.1
DNS.3 = (FQDN)
8) Generate and sign the mariadb.crt. It is vaild for 1825 days (5 years):
openssl x509 -req -SHA384 -extfile extensions.ext -days 1825 -in mariadb.csr -CA yap-ca.crt -CAkey yap-ca.key -CAcreateserial -out mariadb.crt
9) Copy mariadb.crt, mariadb.key and yap-ca.crt to the /etc/mysql directory:
cp /root/mariadb-openssl/{mariadb.crt,mariadb.key,yap-ca.crt} /etc/mysql/
10) Change the mariadb.key permissions and group:
chmod 440 /etc/mysql/mariadb.key && chgrp mysql /etc/mysql/mariadb.key
Tip
To view the CA certificate in the CLI:
openssl x509 -noout -text -in yap-ca.crt
To view the MariaDB server certificate in the CLI:
openssl x509 -noout -text -in mariadb.crt
To view the MariaDB server certificate signing request in the CLI:
openssl req -text -noout -verify -in mariadb.csr
1) Copy the YAP self-signed CA certificate to the certificate store:
cp /etc/mysql/yap-ca.crt /usr/local/share/ca-certificates
2) Update the CA certificates:
update-ca-certificates
Note
For a list of abbreviations and there meanings used throughout this repository please refer to this README
Important
All third-party product and/or company names and logos are trademarks™ or registered® trademarks and remain the property of their respective holders/owners. Unless specifically identified as such, use of third party trademarks does not imply any affiliation with or endorsement between YAP (Yet Another PBX) or its contributor(s) by the owners of those trademarks.















