<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Elliot Michael Keavney on Medium]]></title>
        <description><![CDATA[Stories by Elliot Michael Keavney on Medium]]></description>
        <link>https://medium.com/@ellwould?source=rss-8a2561dcaa15------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qGCqQrzDTJpOVXln7yHrBA@2x.jpeg</url>
            <title>Stories by Elliot Michael Keavney on Medium</title>
            <link>https://medium.com/@ellwould?source=rss-8a2561dcaa15------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 03:20:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ellwould/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Generating ECDSA Certificates and Signing Them With Your Own Certificate Authority Using OpenSSL]]></title>
            <link>https://ellwould.medium.com/generating-ecdsa-certificates-and-signing-them-with-your-own-certificate-authority-using-openssl-930b46def3ef?source=rss-8a2561dcaa15------2</link>
            <guid isPermaLink="false">https://medium.com/p/930b46def3ef</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Elliot Michael Keavney]]></dc:creator>
            <pubDate>Thu, 12 Jun 2025 20:56:28 GMT</pubDate>
            <atom:updated>2025-06-12T20:56:28.232Z</atom:updated>
            <content:encoded><![CDATA[<h2>Generating Elliptic Curve Digital Signature Algorithm (ECDSA) Certificates and Signing Them With Your Own Certificate Authority (CA) Using OpenSSL</h2><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FBW-Y2gEM4cbs3t0_X-3PQ@2x.jpeg" /><figcaption>Photo by <a href="https://rc.xyz/">rc.xyz NFT gallery</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Common Questions and Answers:</h3><blockquote>“Are certificates signed by my own unregonised Certificate Authority (CA) technologically less secure than a certificate signed by a recognised CA like GoDaddy or ssl.com?”</blockquote><p>Absolutely not, the cryptographic methods to generate and sign a certificate are the same; it just means no other computer will trust your certificate unless the computer has had your certificate authorities root certificate manually installed in its trust store.</p><p>The photo’s below show a certificate signed by a recognised CA (Let’s Encrypt) and a certificate signed by an unrecognised CA (Ell’s Own CA!!!):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*dntAclfkzwieegRbRJEZbg@2x.jpeg" /></figure><blockquote>Screenshot of certificate information on my websites ECDSA certificate at <a href="https://ell.today/">https://ell.today</a>, issued by a recognised CA named Let’s Encrypt. Interestingly certificates signed by Let’s Encrypt always have short lifespans of about 3 months to encourage admins to regularly generate new certificates.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*N96tW_U9jLrWroZNb765Jg@2x.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*b9iOeegLgw506SgPyzJ2Fw@2x.jpeg" /></figure><blockquote>Screenshot of certificate information on a web proxy running from a server on my Local Area Network (LAN). The ECDSA certificate is signed by an unregonised CA named “Ell’s Own CA!!!”. Due to the “Ell’s Own CA!!!” root certificate not installed in my iPad’s trust store, an application is trying to inform me with a warning that it is untrusted. I choose to make the lifespan about 5 years because it is just for testing.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*YE5nbMo9ylc8pC5-24WNbw@2x.jpeg" /></figure><blockquote>“When can using certificates signed by your own Certificate Authority (CA) be more secure or beneficial compared to certificates signed by a recognised CA”</blockquote><p><strong>If some or all of the following things apply to you as an administrator:</strong></p><ul><li>You or your company do not trust a third party recognised CA to keep their root CA key secure.</li><li>You want to use localhost as a domain, a recognised CA will not sign a certificate with localhost as the domain name.</li><li>You want a very long lifespan on a certificate; as of writing the maximum lifespan of a Transport Layer Secure (TLS) certificate signed by a recognised CA is 398 days.</li><li>You or your company do not want to pay for a TLS certificate to be signed (though in the majority of cases with Let’s Encrypt that is not really an issue anymore)</li><li>Like myself you find the idea of creating your own CA fun or just like messing about with computers :)</li></ul><blockquote>“So with all these advantages to signing your own certificates with your own Certificate Authority (CA) why do people not use them more often?”</blockquote><p>The short answer is – this screenshot of a web browser below displaying a website with a warning of an invalid certificate:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*6EKngjmskB0oL35FbIRiHg@2x.jpeg" /></figure><blockquote><em>Screenshot of a Let’s Encrypt’s example expired certificate on one of their test websites – </em><a href="https://expired-isrgrootx2.letsencrypt.org/">https://expired-isrgrootx2.letsencrypt.org</a></blockquote><p>The long answer is – for the vast majority of websites (those that are intended for the general public to visit) you are going to want and need a certificate signed by a valid/recognised CA.</p><p>If a user were to visit a website with a certificate signed by an unrecognised CA it will flag it and pop up with a warning about the connection being insecure. This is good because it is helping people avoid a man-in-the-middle attack that can lead to criminals stealing peoples sensitive data such as passwords.</p><p>Web browsers use the trust store inside an Operating System (OS) to determine if a certificate is signed by a recognised CA.</p><p>On a computer with an Ubuntu OS you can run this command below to view all the recognised certificate authorities root certificates (type q to quit):</p><pre>ls /etc/ssl/certs | less</pre><p>You can also install recognised CA root certificates on a computer running Ubuntu OS with the following command (must use sudo or be the root user):</p><pre>apt install ca-certificates</pre><blockquote>“Apart from on a website using Hypertext Transfer Protocol Secure (HTTPS) where else do certificates and keys get implemented to provide a secure connection?”</blockquote><ul><li>Database servers such as MySQL and MariaDB</li><li>VoIP servers such as Asterisk</li><li>VPN servers such as OpenVPN</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*FGHSnn6TalcESq0zwIlhIQ@2x.jpeg" /></figure><blockquote>Screenshot of a MariaDB database configuration file showing absolute paths for the certificate, key and CA certificate. Options are also included to enable mandatory encryption, ensure only TLS version 1.3 is used and only one type of cipher is used when establishing an encrypted connection.</blockquote><blockquote>“Do recognised Certificate Authorities follow standards set by a standards body similar to the Internet Engineering Task Force (IETF) or the Institute of Electrical and Electronics Engineers (IEEE)?”</blockquote><p>Yes, The Certification Authority Browser Forum (CA/B Forum) is an independent voluntary group made up mostly of industry members. Multiple different parties are members of the CA/B Fourm such as recognised certificate authorities, certificate consumers, individuals and hardware/software companies that have a vested intrest.</p><p>The CA/B Forum creates various technical standards, industry best practises and have mandatory baseline requirements that a certificate authority must adhere to. The CA/B Forum members voted in favour of gradually reducing the lifespan of certificates signed by a recognised CA; by the year 2030 certificates signed by a recognised CA will be valid for only 47 Days.</p><p>As of writing below is a list of some of the current CA/B Forum members:</p><p><strong>Certificate Authorities</strong></p><ul><li>Let’s Encrypt</li><li>Amazon</li><li>DigiCert</li><li>GlobalSign</li><li>GlobalTrust</li><li>Visa</li><li>ssl.com</li><li>DocuSign</li><li>GoDaddy</li></ul><p><strong>Certificate Consumers</strong></p><ul><li>Mozilla</li><li>Apple</li><li>Microsoft</li><li>Cisco Systems</li><li>Opera Software AS</li><li>Google</li></ul><p><strong>Interested Parties</strong></p><ul><li>Electronic Frontier Foundation (EFF)</li><li>Internet Corporation for Assigned Names and Numbers (ICANN)</li><li>Cloudflare</li><li>Intel</li></ul><p>A full list of members is available at:</p><p><a href="https://cabforum.org/about/membership/members">Members</a></p><blockquote>“I have heard the term “X.509&quot; mentioned during discussions about certificates, but what exactly is X.509?”</blockquote><p>X.509 is an International Telecommunication Union (ITU) standard that dictates the structure of a public key certificate. The standard is available for the public to view at:</p><p><a href="https://www.itu.int/rec/T-REC-X.509">X.509 : Information technology - Open Systems Interconnection - The Directory: Public-key and attribute certificate frameworks</a></p><blockquote>“Could I form a limited company and become a recognised Certificate Authority (CA) like GlobalSign or DigiCert?”</blockquote><p>Technically yes, but it is like asking “Can I establish my own data centre and compete with AWS or IBM?” <strong>if all of the following applies then yes:</strong></p><ul><li>You have a vast amount of money.</li><li>You have numerous years of experience in Public Key Infrastructure (PKI), cryptography, cyber security and business.</li><li>Your willing to be periodically audited to check your CA is compliant.</li><li>Your CA can compete in a highly competitive market with other established recognised certificate authorities offering their service. (For example Let’s Encrypt is free).</li><li>You have a lot of spare time.</li></ul><blockquote>“What happens if a Certificate Authority (CA) is insecure, not adhering to the CA/B Forum baseline requirements or is being influenced by a government agency?”</blockquote><p>Criteria to become and continue being a recognised CA is not only costly but also very strict. If a CA is not following good security practises, adhering to the CA/B Forum baseline requirements or being influanced by a goverment with the intent on spying on it’s citizens, major web browser vendors will tend to drop them as a trusted CA.</p><p>This actually happened in 2022 with the CA TrustCor. Microsoft dropped the TrustCor root certificate from their Edge web browser and Mozzila did the same for their Firefox web browser. The reason behind why these two vendors untrusted the CA TrustCor was due to TrustCor having links to a United States military contractor.</p><p>Below is a hyperlink to a news article about it on the Washington Post:</p><p><a href="https://www.washingtonpost.com/technology/2022/11/30/trustcor-internet-authority-mozilla">Web browsers drop mysterious company with ties to U.S. military contractor</a></p><h3>Generating a unrecognised Certificate Authority (CA) and signing your own ECDSA certificates:</h3><blockquote>Note: Ideally when creating your own CA, the CA key should be stored on a separate offline computer away from the server where the signed certificate is going to be used. If the server the signed certificate resides on was hacked and the CA key was also present, the attacker could steal your CA key and sign their own certificates using the stolen CA key.</blockquote><p>1) Make a directory (mkdir) in / and change directory (cd) to the newly created directory:</p><pre>mkdir /cert &amp;&amp; cd /cert</pre><p>2) Generate a CA key:</p><pre>openssl ecparam -genkey -name secp384r1 -out my-own-ca.key</pre><p>What does the CA key look like <strong>(CA keys should always be stored securely and kept private and the key below will be destroyed after writing this article)</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*ZIyqgwYE8_NKikPf2FhUPA@2x.jpeg" /></figure><p>3) Generate a CA root certificate:</p><pre>openssl req -x509 -new -SHA384 -nodes -key my-own-ca.key -days 7300 -out my-own-ca.crt</pre><p>Next a promt will appear asking for meta data about the certificate, I named the CA certificate “My Own CA” in this example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*WCXfZFBQNmjyUVnya6NbaA@2x.jpeg" /></figure><p>What does the CA certificate look like <strong>(this is safe to display and distribute):</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*1_KeFlWNR2ndlAoMizG0AQ@2x.jpeg" /></figure><p>4) Generate the key used for the server <strong>(same command for generating a CA key, keys should always be stored securely and kept private and the key below will be destroyed after writing this article):</strong></p><pre>openssl ecparam -genkey -name secp384r1 -out server.key</pre><p>5) Generate a Certificate Signing Request (CSR) file:</p><pre>openssl req -new -SHA384 -key server.key -nodes -out server.csr</pre><p>Next a promt will appear asking for meta data about the server certificate, I named the server certificate “My Server Certificate” in this example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*fTjmpdtjvO8hw_ZRv9zu-A@2x.jpeg" /></figure><p>What does the CSR file looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*An160CIqFG5MrJxlZFH8Bw@2x.jpeg" /></figure><p>6) Create an extensions file to use in the creation of a server certificate:</p><pre>touch /cert/extensions.ext</pre><p>The contents of the file should contain:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*IjXpg3EE1lSZMb36tP1jnQ@2x.jpeg" /></figure><p>7) Generate the server certificate and sign it with your Certificate Authority (CA):</p><pre>openssl x509 -req -SHA384 -extfile extensions.ext -days 1825 -in server.csr -CA my-own-ca.crt -CAkey my-own-ca.key -CAcreateserial -out server.crt</pre><p>You can use the OpenSSL command with arguments to view the newly created server certificate:</p><pre>openssl x509 -in /cert/server.crt -noout -text</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*nRJPD_mvjQPG8myjcaDJgw@2x.jpeg" /></figure><blockquote>The screenshot displays lot’s of information about the server certificate including the issuer “My Own CA”.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=930b46def3ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Compiling a Phone System (Asterisk 20.7-cert8) on Ubuntu 24.04.3]]></title>
            <link>https://ellwould.medium.com/compiling-a-phone-system-asterisk-20-5-2-on-ubuntu-22-04-2-bf746b4d862c?source=rss-8a2561dcaa15------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf746b4d862c</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[telecommunication]]></category>
            <category><![CDATA[asterisk-phone-systems]]></category>
            <dc:creator><![CDATA[Elliot Michael Keavney]]></dc:creator>
            <pubDate>Thu, 25 Jan 2024 16:59:42 GMT</pubDate>
            <atom:updated>2026-01-20T12:45:22.040Z</atom:updated>
            <content:encoded><![CDATA[<p>A guide for securely compiling and installing Asterisk 20.7.cert8</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*C5AEjgWhcwvp_jysmLBHNQ@2x.jpeg" /></figure><h4>Why this guide?</h4><p>Search the web and you will find an abundance of Asterisk compile and install guides.</p><p>The guides are very good but a lot are out of date now and a lot in my opinion miss out steps that some admins new to GNU/Linux may not be aware of.</p><p>This guide aims to take a meticulous and easy approach to securely compiling and installing Asterisk so any GNU/Linux admin, experienced or just starting out can setup an Asterisk server.</p><h4>Getting Started</h4><p>There will be a few things needed in order to follow this guide:</p><ul><li>A healthy interest in Voice over Internet Protocol (VoIP) helps :D</li><li>Able to use a text editor and Command Line Interface (CLI).</li><li>A computer with Ubuntu 24.04.3 installed on it (personally I favour Digital Ocean, they are cheap with Virtual Private Server (VPS) rental as of writing starting at $4 to $6 a month and have a firewall for VPS. Using another cloud provider, spinning up a virtual machine or using bare metal is also fine. (Containers are out of scope in this guide).</li><li>Certain packages to compile the Asterisk source code (All listed below).</li><li>The Asterisk source code and the PGP (Pretty Good Privacy) signature (both are available from the Asterisk website).</li><li>You must be the root user throughout this whole process.</li></ul><h4>Installing the packages needed for compiling Asterisk</h4><p>All the packages required to compile Asterisk source code are available from Ubuntu’s repository.</p><p>Using Ubuntu’s package manager you can simply install them all, type the command below:</p><pre>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</pre><p>A brief description of what some of these packages are used for:</p><ul><li>wget: cli tool to download files from a web server, this will be used later to download the Asterisk source code and PGP signature.</li><li>build-essential: contains vital packages for compiling C and C++ source code, Asterisk is written in C.</li><li>unixodbc-dev: Development files for unixODBC, this is very important if you want to use your Asterisk server with an SQL (Structured Query Language) database system like MySQL via a ODBC (Open Database Connectivity) connection.</li><li>libsrtp2-dev: Development files for SRTP (Secure Real-time Transport Protocol), install this if you want encrypted voice traffic between phone calls, who wouldn’t want this? its 2024 :)</li></ul><p>If your interested in knowing more about each package simply type the following in the CLI:</p><pre>apt-cache show [REPLACE WITH PACKAGE NAME]</pre><h4>Downloading the Asterisk source code</h4><p>Change the working directory to the /root directory (must be user root):</p><pre>cd /root</pre><p>Using wget type in the following two commands:</p><pre>wget https://downloads.asterisk.org/pub/telephony/certified-asterisk/asterisk-certified-20.7-cert8.tar.gz</pre><pre>wget https://downloads.asterisk.org/pub/telephony/certified-asterisk/asterisk-certified-20.7-cert8.tar.gz.asc</pre><ul><li>The first command using wget is going to download the Asterisk source code itself. The source code comes as a Tar archive compressed, hence the file extension is .tar.gz</li><li>The second command using wget is going to download the PGP signature, this will be used to make sure the Asterisk source code was not tampered with.</li><li>The compressed Tar file – asterisk-certified-20.7-cert8.tar.gz is signed using the PGP signature and altering the file in anyway results in a bad signature.</li></ul><p>Run this GPG (GNU Privacy Guard) command to verify the Asterisk source code with the PGP signature:</p><pre>gpg --verify asterisk-certified-20.7-cert8.tar.gz.asc asterisk-certified-20.7-cert8.tar.gz</pre><p>Unless you have already imported the Asterisk dev teams public key to your GPG key ring, the output should be:</p><pre>gpg: Signature made Mon Jan 12 16:33:21 2026 UTC<br>gpg:                using RSA key F2FC93DB7587BD1FB49E045A5D984BE337191CE7<br>gpg: Can&#39;t check signature: No public key</pre><p>Import the Asterisk dev team public key from Ubuntu’s key server using this GPG command:</p><pre>gpg --keyserver keyserver.ubuntu.com --recv 0xF2FC93DB7587BD1FB49E045A5D984BE337191CE7</pre><p>The output will be:</p><pre>gpg: key 5D984BE337191CE7: public key &quot;Asterisk Development Team &lt;asteriskteam@digium.com&gt;&quot; imported<br>gpg: Total number processed: 1<br>gpg:               imported: 1</pre><p>Verify the Asterisk source code with the GPG command again:</p><pre>gpg --verify asterisk-certified-20.7-cert8.tar.gz.asc asterisk-certified-20.7-cert8.tar.gz</pre><p>The output should be:</p><pre>gpg: Signature made Mon Jan 12 16:33:21 2026 UTC<br>gpg:                using RSA key F2FC93DB7587BD1FB49E045A5D984BE337191CE7<br>gpg: Good signature from &quot;Asterisk Development Team &lt;asteriskteam@digium.com&gt;&quot; [unknown]<br>gpg: WARNING: This key is not certified with a trusted signature!<br>gpg:          There is no indication that the signature belongs to the owner.<br>Primary key fingerprint: F2FC 93DB 7587 BD1F B49E  045A 5D98 4BE3 3719 1CE7</pre><p>Don’t worry about the <strong><em>“WARNING: This key is not certified with a trusted signature!” </em></strong>Lots of open source software you check (including a Ubuntu ISO) will have this warning, developers and software teams would literally have to meet up in person for the signature to be classed as trusted. This does happen sometimes though its called a key signing party :) The main thing is its a good signature from the Asterisk development team.</p><p>If the output was this below then the Asterisk source code has been tampered with or the download got corrupted. You <strong>SHOULD NOT USE</strong> the Asterisk source code if this is the output:</p><pre>gpg: Signature made Mon Jan 12 16:33:21 2026 UTC<br>gpg:                using RSA key F2FC93DB7587BD1FB49E045A5D984BE337191CE7<br>gpg: BAD signature from &quot;Asterisk Development Team &lt;asteriskteam@digium.com&gt;&quot; [unknown]</pre><h4>Untarring and decompressing the Asterisk source code</h4><p>To untar a compressed Tar archive run the following command in /root</p><pre>tar xvzf asterisk-certified-20.7-cert8.tar.gz</pre><p>Go into the asterisk-certified-20.7-cert8 directory:</p><pre>cd ./asterisk-certified-20.7-cert8</pre><h3>Compiling the Asterisk source code</h3><p>First step to compiling the source code is to make sure all software dependencies are installed on Ubuntu. Run the following command in /root/asterisk-certified-20.7-cert8:</p><pre>./configure</pre><p>The output from running ./configure is long but should show the Digium logo in ASCII art at the end:</p><pre>configure: Menuselect build configuration successfully completed<br><br>               .$$$$$$$$$$$$$$$=..      <br>            .$7$7..          .7$$7:.    <br>          .$$:.                 ,$7.7   <br>        .$7.     7$$$$           .$$77  <br>     ..$$.       $$$$$            .$$$7 <br>    ..7$   .?.   $$$$$   .?.       7$$$.<br>   $.$.   .$$$7. $$$$7 .7$$$.      .$$$.<br> .777.   .$$$$$$77$$$77$$$$$7.      $$$,<br> $$$~      .7$$$$$$$$$$$$$7.       .$$$.<br>.$$7          .7$$$$$$$7:          ?$$$.<br>$$$          ?7$$$$$$$$$$I        .$$$7 <br>$$$       .7$$$$$$$$$$$$$$$$      :$$$. <br>$$$       $$$$$$7$$$$$$$$$$$$    .$$$.  <br>$$$        $$$   7$$$7  .$$$    .$$$.   <br>$$$$             $$$$7         .$$$.    <br>7$$$7            7$$$$        7$$$      <br> $$$$$                        $$$       <br>  $$$$7.                       $$  (TM)     <br>   $$$$$$$.           .7$$$$$$  $$      <br>     $$$$$$$$$$$$7$$$$$$$$$.$$$$$$      <br>       $$$$$$$$$$$$$$$$.                <br><br>configure: Package configured for: <br>configure: OS type  : linux-gnu<br>configure: Host CPU : x86_64<br>configure: build-cpu:vendor:os: x86_64 : pc : linux-gnu :<br>configure: host-cpu:vendor:os: x86_64 : pc : linux-gnu :</pre><p>Next is to select what modules and sound files to include on your Asterisk server. Asterisk has an abundance of different modules and lots of different sound files the defaults are usually fine but most people will want to select the sound files specific to the country the Asterisk server will be used in.</p><p>As a side note the modules I recommend unselecting is format_mp3, app_mp3, otherwise additional software is needed. There is plenty of open source software for converting mp3 files to other formats.</p><p>Also app_adsiprog, app_getcpeid and res_adsi are automatically selected but I would unselect these considering they are deprecated modules.</p><p>Run this command to get the colourful options menu (this menu will also give you other compile options):</p><pre>make menuselect</pre><p>The Asterisk menuselect will look something like this:</p><pre>┌───────────────────────────────────────┤ Asterisk Module and Build Option Selection ├────────────────────────────────────────┐<br>&#0;&#0;&#0;│                                                                                                                             │ <br>&#0;&#0;&#0;│   Add-ons (See README-addons.txt)        --- Extended ---                                                                 ↑ │ <br>&#0;&#0;&#0;│   Applications                       XXX chan_mobile                                                                      ▮ │ <br>&#0;&#0;&#0;│   Bridging Modules                   [ ] chan_ooh323                                                                      ▒ │ <br>&#0;&#0;&#0;│   Call Detail Recording              [ ] format_mp3                                                                       ▒ │ <br>&#0;&#0;&#0;│   Channel Event Logging              XXX res_config_mysql                                                                 ▒ │ <br>&#0;&#0;&#0;│   Channel Drivers                                                                                                         ▒ │ <br>&#0;&#0;&#0;│   Codec Translators                                                                                                       ▒ │ <br>&#0;&#0;&#0;│   Format Interpreters                                                                                                     ▒ │ <br>&#0;&#0;&#0;│   Dialplan Functions                                                                                                      ▒ │ <br>&#0;&#0;&#0;│   PBX Modules                                                                                                             ▒ │ <br>&#0;&#0;&#0;│   Resource Modules                                                                                                        ▒ │ <br>&#0;&#0;&#0;│   Test Modules                                                                                                            ▒ │ <br>&#0;&#0;&#0;│   Compiler Flags                                                                                                          ▒ │ <br>&#0;&#0;&#0;│   Utilities                                                                                                               ▒ │ <br>&#0;&#0;&#0;│   AGI Samples                                                                                                             ▒ │ <br>&#0;&#0;&#0;│   Core Sound Packages                                                                                                     ▒ │ <br>&#0;&#0;&#0;│   Music On Hold File Packages                                                                                             ▒ │ <br>&#0;&#0;&#0;│   Extras Sound Packages                                                                                                   ▒ │ <br>&#0;&#0;&#0;│                                                                                                                           ▒ │ <br>&#0;&#0;&#0;│                                                                                                                           ▒ │ <br>&#0;&#0;&#0;│                                                                                                                           ▒ │ <br>&#0;&#0;&#0;│                                                                                                                           ▒ │ <br>&#0;&#0;&#0;│                                                                                                                           ▒ │ <br>&#0;&#0;&#0;│                                                                                                                           ▒ │ <br>&#0;&#0;&#0;│                                                                                                                           ▒ │ <br>&#0;&#0;&#0;│                                                                                                                           ▒ │ <br>&#0;&#0;&#0;│                                                                                                                           ▒ │ <br>&#0;&#0;&#0;│                                                                                                                           ▒ │ <br>&#0;&#0;&#0;│                                                                                                                           ▒ │ <br>&#0;&#0;&#0;│                                                                                                                           ↓ │ <br>&#0;&#0;&#0;│                                                                                                                             │ <br>&#0;&#0;&#0;│                                                                                                                             │ <br>&#0;&#0;&#0;│                                                                                                                             │ <br>&#0;&#0;&#0;│      Depends on:                                                                         ┌───────────────┐   ┌──────────┐   │ <br>&#0;&#0;&#0;│         Can use:                                                                         │  Save &amp; Exit  │   │   Exit   │   │ <br>&#0;&#0;&#0;│  Conflicts with:                                                                         └───────────────┘   └──────────┘   │ <br>&#0;&#0;&#0;│   Support Level:                                                                                                            │ <br>&#0;&#0;&#0;└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘</pre><p>Once you’ve finished just tap TAB until the Save &amp; Exit is highlighted and tap enter.</p><blockquote>Optional Future Reference:</blockquote><p><em>If you see an option with a XXX it means its not available to build, you are missing a dependancy.</em></p><p><em>For example to build the resource module res_srtp (Secure RTP) Ubuntu needs the packages libsrtp2-dev and libssl-dev installed in advance of running ./configure and make menuselect.</em></p><p><em>If you want to build different Asterisk modules after Asterisk has been compiled and installed, install the other packages needed on Ubuntu then in /root/asterisk-certified-20.7-cert8 run make distclean and proceed with the other commands shown previous:</em></p><pre>make distclean<br>./configure<br>make menuselect<br>...</pre><p>Next command to run is the make command this is what turns the Asterisk source code into useable pieces of software to be used. In /root/asterisk-certified-20.7-cert8 run:</p><pre>make</pre><p>Output at the end should be:</p><pre> +--------- Asterisk Build Complete ---------+<br> + Asterisk has successfully been built, and +<br> + can be installed by running:              +<br> +                                           +<br> +                make install               +<br> +-------------------------------------------+</pre><p>As stated by the last output on the terminal to install Asterisk on Ubuntu run the command:</p><pre>make install</pre><p>The output should be:</p><pre> +---- Asterisk Installation Complete -------+<br> +                                           +<br> +    YOU MUST READ THE SECURITY DOCUMENT    +<br> +                                           +<br> + Asterisk has successfully been installed. +<br> + If you would like to install the sample   +<br> + configuration files (overwriting any      +<br> + existing config files), run:              +<br> +                                           +<br> + For generic reference documentation:      +<br> +    make samples                           +<br> +                                           +<br> + For a sample basic PBX:                   +<br> +    make basic-pbx                         +<br> +                                           +<br> +                                           +<br> +-----------------  or ---------------------+<br> +                                           +<br> + You can go ahead and install the asterisk +<br> + program documentation now or later run:   +<br> +                                           +<br> +               make progdocs               +<br> +                                           +<br> + **Note** This requires that you have      +<br> + doxygen installed on your local system    +<br> +-------------------------------------------+</pre><p>Its a good idea to add the sample configuration files to /etc/asterisk:</p><pre>make samples</pre><p>After the sample configuration files are in /etc/asterisk run the following commands to make copies of the originals:</p><pre>mkdir /etc/asterisk/SAMPLE<br>cp -r /etc/asterisk/* /etc/asterisk/SAMPLE</pre><p>I would also recommend removing configuration files not needed inside /etc/asterisk.</p><p>Every Asterisk system is different, but the core files needed to get a basic Asterisk system working with a database connection are:</p><ul><li>asterisk.conf</li><li>extensions.conf</li><li>extconfig.conf</li><li>logger.conf</li><li>modules.conf</li><li>pjsip.conf</li><li>res_odbc.conf</li><li>rtp.conf</li><li>sorcery.conf</li></ul><h3>Adding a system user for Asterisk</h3><p>When Asterisk is running or any process on a UNIX like system like Ubuntu, its important that the process is running as a system user and not as root.</p><p>In this guide the system user for the Asterisk daemon to run as will be pbx (private branch exchange). To create the pbx system user and set the users shell to /bin/false on ubuntu run the following command:</p><pre> useradd -r -s /bin/false pbx</pre><p>Modify the pbx user so its locked:</p><pre>usermod -L pbx</pre><p>Using your favourite text editor (mine is joe), uncomment the /etc/asterisk/asterisk.conf file on line number/row 75 and 76 (Asterisk uses ; as comments not #) and change the user and group to pbx:</p><p>Example with the joe text editor:</p><pre>joe /etc/asterisk/asterisk.conf</pre><pre>runuser = pbx              ; The user to run as.<br>rungroup = pbx             ; The group to run as.</pre><p>Hold the Cltr key and tap k+x this will save the file if using the joe text editor.</p><p>This will make the Asterisk daemon run as user pbx.</p><p>If you want to use the joe text editor you can install it with this command:</p><pre>apt install joe</pre><p>Now thats done add the install scripts to the system (make sure your in /root/asterisk-certified-20.7-cert8):</p><pre>make config</pre><h4>Changing file and directory permissions</h4><p>The user pbx should only be able to read configuration files and not write to them. The pbx user should also not be able to create files or directories either. The exceptions are the Asterisk log files, Call Detail Record (CDR), call recordings and voicemail.</p><p>As well for additional security other users on Ubuntu should not be able to see the contents of files or access directories Asterisk uses.</p><p>Type the following command to make root the owner and group pbx the group and change permissions for the configuration files Asterisk uses:</p><pre># Asterisk configuration files<br>chown -R root:pbx /etc/asterisk<br>chmod 550 /etc/asterisk<br>chmod 440 /etc/asterisk/*</pre><p>Type the following command to make pbx the owner and group and change permissions for Asterisk log files, CDR&#39;s, call recordings and voicemail.</p><pre># Asterisk default voicemail and call recording directories and files<br>chown -R pbx:pbx /var/spool/asterisk<br>chmod -R 770 /var/spool/asterisk<br><br># Asterisk logs<br>chown -R pbx:pbx /var/log/asterisk<br>chmod -R 770 /var/log/asterisk</pre><p>This step is optional but most admins probably will use it, Ubuntu uses Systemd by default, to allow Asterisk to automatically start when the system boots up type the command:</p><p><strong>(Do not do this step unless your Asterisk system is behind a firewall. If you’re using Digital Ocean they have a firewall available for their VPS, it’s highly recommended to enable it and restrict it to only allow traffic from your IP address to your Asterisk system while testing.)</strong></p><pre>systemctl enable asterisk</pre><p>To stop Asterisk starting automatically when the system boots up:</p><pre>systemctl disable asterisk</pre><p>You can also start and restart Asterisk using systemctl:</p><p><strong>(Do not do this step unless your Asterisk system is behind a firewall. If you’re using Digital Ocean they have a firewall available for their VPS, it’s highly recommended to enable it and restrict it to only allow traffic from your IP address to your Asterisk system while testing.)</strong></p><pre>systemctl start asterisk<br>systemctl restart asterisk</pre><p>Stop Asterisk using systemctl:</p><pre>systemctl stop asterisk</pre><p>See the status of the Asterisk daemon:</p><pre>systemctl status asterisk</pre><p>Output of systemctl status asterisk from a test machine I setup:</p><pre>● asterisk.service - Asterisk PBX and telephony daemon.<br>     Loaded: loaded (/usr/lib/systemd/system/asterisk.service; disabled; preset: enabled)<br>     Active: active (running) since Tue 2026-01-20 12:40:52 UTC; 1min 0s ago<br>   Main PID: 230682 (asterisk)<br>      Tasks: 30 (limit: 1107)<br>     Memory: 48.0M (peak: 48.4M)<br>        CPU: 795ms<br>     CGroup: /system.slice/asterisk.service<br>             └─230682 /usr/sbin/asterisk -mqf -C /etc/asterisk/asterisk.conf<br><br>Jan 20 12:40:52 pbx systemd[1]: Started asterisk.service - Asterisk PBX and telephony daemon..</pre><h3>Recommended Next Steps:</h3><p>You now have a Asterisk system installed, it is still a long way from being production ready though, the recommended next steps on the server are:</p><ul><li>Configuring a firewall such as netfilter via nftables</li><li>Configuring fail2ban using nftables</li><li>Setting up users in /etc/asterisk/pjsip.conf or users in a database such as MySQL</li><li>Setting up the dial plan in /etc/asterisk/extensions.conf</li><li>Setting up encryption in /etc/asterisk/pjsip.conf (Let’s Encrypt certificates are supported by a lot of VoIP desk phones)</li></ul><p><strong><em>NOTE:</em></strong><em> This guide was updated on the 18/01/2026 for Ubuntu version 24.04.3 (previously wrote for Ubuntu version 22.04.2) and Asterisk certified version 20.7-cert8 (previously wrote for Asterisk version 20.5.2)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf746b4d862c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>