You might consider getting under the hood of FreePBX and down in to testing out the new Media Over Websockets implementation (chan_websocket) in Asterisk - here’s a few code examples:
Connect FreePBX to my own program
Mailcmd is being ignored
I have setup email on free-pbx 17 debian host. Email on voicemail is working as expected. Then I went to “Settings → Voicemail Admin → Settings → Email Config” and changed Mail Command to “/usr/sbin/sendmail-custom” which is a shell script:
#!/bin/sh
# Get absolute path to the script's directory
script_dir="$(cd "$(dirname "$0")" && pwd)"
# Generate timestamped filename
timestamp=$(date +"%Y%m%d_%H%M%S")
outfile="$script_dir/email_$timestamp.txt"
# Read email from stdin, save to file, and print
cat - | tee "$outfile"
The file has these permissions:
namei -l /usr/sbin/sendmail-custom
drwxr-xr-x root root /
drwxr-xr-x root root usr
drwxr-xr-x root root sbin
-rwxr-xr-x asterisk asterisk sendmail-custom
For some reasons, my shell script is never called. I am expecting a file to be created in the current working directory. What am I missing here?
Updates continue to break cron jobs. PLEASE FIX
No. I did not do that. To fix it we’ve deleted the backup job and recreated and deleted the cert and setup new.
Migration from 3CX to freePBX, is freePBX an alternative
Oh, sorry, I mean the Addons
I don’t understand them.
Conference, Parking, Caller ID Management for example is Asterisk default.
Mailcmd is being ignored
The script is trying to write to /usr/sbin/
which the asterisk user can’t write to. Change your output directory to somewhere writable:
#!/bin/sh
outfile="/tmp/email_$(date +"%Y%m%d_%H%M%S").txt"
cat - | tee "$outfile"
Also, FreePBX expects the mail command to actually send the email. Your script only saves it. Add the sendmail call:
#!/bin/sh
outfile="/tmp/email_$(date +"%Y%m%d_%H%M%S").txt"
cat - | tee "$outfile" | /usr/sbin/sendmail "$@"
Check /var/log/asterisk/full
for any errors when voicemail tries to send. You can also add debug logging to confirm the script is being called:
echo "$(date): called with $@" >> /tmp/sendmail-debug.log
New to FreePBX – Looking for Beginner Resources
Howdy! Welcome to the forums.
There’s some step-by-step links and (long-ish) video from last year that might help you install FreePBX v17 available on the official FreePBX.org website at FreePBX 17 | FreePBX - Let Freedom Ring.
Props to @20telecom for the clean, concise, and current FreePBX v16 video series – how Part 1 starts with Extensions and the focus stays on the GUI! Very helpful for first-time front desk end users starting to run their own phone system, as well as seasoned IT professionals and many in-between who are looking to learn the official FreePBX distro. Sam’s practical approach makes this FreePBX YouTube series feel like an agile co-pilot guiding you along every step of the way.
As for written documentation, the “Wiki” link at the top of the forums is your go-to for in-depth reading. For a newer interface to the Wiki, you might try the AI search features exposed at help.sangoma.com (include “freepbx” in your requests there to help narrow down between other Sangoma products.)
Can we use DNS-01 challenge for generating Let's Encrypt certificate?
Cert management is changing a lot in the wider world; so, yes, we are planning updates to the process in FreePBX. The DNS request seems reasonable. But, one might consider that if you are in control of your TXT records, then you are (maybe) also in control of the service(s) which are (not) sharing port 80. So OP’s case is somewhat unique and might lend itself to other solutions instead e.g. an NGINX proxy to re-direct incoming port 80 traffic based on the domain or user agent.
Blocking some sites even with firewall off
FreePBX 17.0.19.28
on Debian 12
I patch about once a month.
OK, this is weird. I had this happen to 3 sites where it blocks the site from pinging and connecting. The logs say it can’t reach my 3 sip providers and I can’t ping the site listed from freepbx. From any other computer on the same network I can ping it. I can ping many other sites from FreePBX just not my sip providers. I have tried restoring from backup but that did not work. I tried turning off the firewall but that did not work. I tried checking that there are no other devices with the freepbx ip (turning freepbx off and ping its address and then check my mac tables to see if there was something that isn’t pingable). Turning off the router and switch for a minute and bringing it back up in case of a corrupted mac table. Nothing worked. I checked the ip information and it was all correct. What else could be blocking a ping from freepbx? This happened after an improper shutdown. Something seems odd about the networking on freepbx. I have never had this happen on any other linux computer (or any other computer for that matter).
I did a fresh install on a fresh vm and I restored and got it working but that was a whole other mess I’ll post a new topic about that. I would still like to know what else could be causing it from pinging certain ip’s? This is just happening on a freepbx install. I have been using Linux for over 20 years. I have never had anything like this ever happen before. I still have the vm in an off state to test if anyone has ideas. I am scared of this happening again. The first sip provider it blocked the site provider had other sip addresses I could pick from that was 3 months ago. The recent 2 happend a few days ago. I could have picked a different site for one but this is getting ridiculous.
Fresh install issues
I did a fresh install. Is there no way to not register anymore? Registering is broken as it disconnects trying to register from a chrome based browser and leaves it in a perpetual loop. I was able to register from firefox after it disconnected it continued after it disconnected. Then another setup task setting the IP was broken in firefox and I needed to do in a chome based browser. I am disappointed on how many steps I needed to take before I could restore. I am unfamiliar with Debian default network setup and setting an ip address from the command line. I did find it in the FreePBX web interface. It seems to use something else than the debian networking tools. I even disable the networking service and was surprised that networking still worked. Not sure what FreePBX is using for networking and maybe it is why I had some other issues. Seems the network stack is different from any other distro I have used in the past.
Blocking some sites even with firewall off
It should not be hard to see where the ICMP is being dropped.
tcpdump ‘listens’ to received packets before any software firewall (iptables), and transmitted packets after iptables.
So, if tcpdump doesn’t show the ICMP echo request, iptables is blocking the transmission. If tcpdump shows the echo request and echo reply, but the ping fails, iptables is blocking the reception. If it show the request but no reply, the failure is elsewhere.
If this is indeed an iptables issue, you can look at what is still there (after turning FreePBX Firewall off) by issuing
iptables -vL
at a root shell prompt.
iptables -F
will flush all rules, though some process might reinstate them, so give
iptables -vL
again after ping fails to confirm that the rules are still gone.
If this is not an iptables issue, try tcpdump on the VM host. If not consistent with what shows on the VM (FreePBX), it’s a virtualization issue. The VM should be using bridged networking, with no filtering rules.
If tcpdump on the host shows echo requests going out but no replies, it’s a problem with your hardware router/firewall or modem. If your router supports packet capture on its WAN interface, check there to see whether the router is blocking packets.
Can we use DNS-01 challenge for generating Let's Encrypt certificate?
I actually have nginx reverse proxy and I tried to use it to handle port 80 for lets encrypt and it failed.
When i use NAT to forward port 80 directly to FreePBX it works with Let’s Encrypt flawlessly, but if use nginx reverse proxy which forwards connection to FreePBX it does not work.
I use same method to forward port 80 to other internal services via nginx reverse proxy (not for Let’s Encrypt usage) and it works fine. But fith FreePBX and Let’s Encrypt, it does not work.
It may be I fail to set something properly. I could not find any example or tutorial how to do it using nginx proxy.
It would all be much easier if there is not that silly requirement for port 80.
Connect FreePBX to my own program
Thanks for the pointer. Do I need a specific version of Asterisk to try those examples?
I was trying to run:
Terminal 1:
/etc/asterisk/asterisk-websocket-examples# ./mow_echo_test_server.py
[2025-06-28 23:05:24] server listening on 127.0.0.1:8787
[2025-06-28 23:05:24] server listening on [::1]:8787
Terminal 2:
/etc/asterisk# asterisk -r
Asterisk 22.4.1, Copyright (C) 1999 - 2025, Sangoma Technologies Corporation and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 22.4.1 currently running on FreePBX17 (pid = 1891)
FreePBX17*CLI> channel originate WebSocket/media_connection1/c(ulaw) extension echo@default
[2025-06-28 23:06:45] WARNING[216708]: channel.c:6262 request_channel: No channel type registered for 'WebSocket'
[2025-06-28 23:07:00] NOTICE[1939]: res_pjsip/pjsip_transport_management.c:170 idle_sched_cb: Shutting down transport 'TCP to 150.107.38.40:58868' since no request was received in 32 seconds
[2025-06-28 23:07:10] WARNING[1931]: pjproject: <?>: sip_parser.c Field Content-Length not found!
[2025-06-28 23:07:10] ERROR[1931]: pjproject: <?>: sip_endpoint.c Error processing packet from 150.107.38.40:59656: Missing required header(s) (PJSIP_EMISSINGHDR) CSeq [code 171050]:
GET / HTTP/1.1
Host: 76.14.48.209:5060
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0
New to FreePBX – Looking for Beginner Resources
Thanks @penguinpbx
Here is a link to the complete playlist on YouTube: How-to FreePBX 16 (2023)
Can we use DNS-01 challenge for generating Let's Encrypt certificate?
It’s not a silly requirement. Port 80 is one which the central management of an organisation would normally control over. It’s much easier for a hacker to spoof an official user if they have free choice of port number.
LetsEncrypt has weak authentication at the best of times, compared with a premium certificate, and certificates are about authentication, not encryptiong. They are important to secure access because there is no point in having an encrypted connection if it is actually to the attacker, acting as a man in the middle.
Connect FreePBX to my own program
The WebSocket channel driver is not yet merged[1] and thus not yet in a release.
[1] Media over Websocket Channel Driver by gtjoseph · Pull Request #1267 · asterisk/asterisk · GitHub
Can we use DNS-01 challenge for generating Let's Encrypt certificate?
I never went to deep into this topic but I guess if I already have valid certificate I can use it as proof of control to get renewal, and I do not need nothing more. the only issue would be if certificate expires as then it could not be used as a proof.
Requirement for port 80 basically means you have to obtain public IP for each service you want to use with Let’s Encrypt, expect for simple services like web server that can be handled using reverse proxy which would then handle certificates on their behalf.
Problem with FreePBX is that it needs to get certificate for itself because it is used for other stuff, not just for web so it cannot relay on reverse proxy.
But this is going out of scope of this discussion. This is about how to deal with existing functionality and limitations.
I am even thinking if it is possible to make FreePBX do knock knock to the firewall indicating it needs port 80 so firewall would temporarily redirect port to FreePBX and after certification is done, it returns port 80 for to it’s regular use.
Linksys PAP2T-NA Configuration 2025
Stewart1 I have a question. I was wondering what would cause the touch tone not to work with the grandstream device. I know you made some statments about the devices were old. Are there any devices out here with the FXO that are newer models?
Linksys PAP2T-NA Configuration 2025
The HT813 is a current device. It’s supported and maintained.
Queue terminates incoming call if remote user rejects
Hi, I am running FreePBX 16.0.40.13 with Asterisk 18.9 and I’m running in to an issue with queued calls.
We run a small security company and our alarm response number should route to some desk phones and some of our mobile phones in the patrol vehicles. The calls are routing through and ringing at all end points; the trouble I have is that if one of the mobiles is unavailable or if one of the guards rejects the call, the call ceases ringing on all end points and the caller gets “All circuits are busy now” followed by an engaged tone.
Call confirm is turned on
Ring strategy is ringall
I’ve tried Skip busy agents on both yes and no with the same result.
Guessing there is a setting or two that I’m missing which will resolve this? If anyone can point me in the correct direction it would be appreciated.
Linksys PAP2T-NA Configuration 2025
Possibly, DTMF is being blocked by your source. Temporarily disconnect it from the HT and connect it to an analog phone. Call in, answer the analog phone and press keys on the calling phone. If you can’t hear the tones loud and clear, you’ll probably need to get a different source (or a SIP connection from the existing provider).
If the source is ok, hook it back up to the HT, go to Asterisk Logfile Settings, turn on DTMF for ‘full’, call in, wait for the IVR to answer, press some keys on the calling phone, paste the Asterisk log for the call and post the link.