that'd be awesome to have a tutorial with self signed cert! i think most phone can pull certs during auto-provisioning vs manual upload ? then all youd have to do i specify provision urlOh, that changes the story. You can buy a single domain certificate. Your phones should be registered to the same domain. Usually, your main DNS record points to your server. Only if you prefer dual registration in the future, when you have 2 servers, and if your phones support it, then you would need a wildcard certificate. Changing certificates is not hard, but does require a FreeSwitch restart.
Someone recently told me they generate their own Certificate Authority and certificate, and just upload it to the phones as trusted. It works just as well but requires a bit more work in the beginning. I think we are going to see more people leaning towards this way since the commercial certificates now have to be renewed every 7 months. We might even add a tutorial for this to our docs in the future.
care to share ? i have pangolin proxy in front of my fspbx nodes so i pull my LE certs from there so i'd need to modify the script to my env.Yes, it's every 3 months. The script does have an auto-restart for FreeSwitch, will keep you posted if it works and post the code here.
#!/bin/bash
# Called by dehydrated after cert renewal
# Hook: deploy_cert DOMAIN KEYFILE CERTFILE FULLCHAINFILE CHAINFILE TIMESTAMP
deploy_cert() {
local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" FULLCHAINFILE="${4}"
if [ "$DOMAIN" = "YOUR.DOMAIN.COM" ]; then
echo "Deploying renewed cert to FreeSWITCH..."
cat "$FULLCHAINFILE" > /etc/freeswitch/tls/all.pem
cat "$KEYFILE" >> /etc/freeswitch/tls/all.pem
chown -R www-data:www-data /etc/freeswitch/tls
chmod -R 640 /etc/freeswitch/tls/*
systemctl restart freeswitch
echo "FreeSWITCH restarted with new cert."
fi
}
HANDLER=$1; shift
[ -n "$(type -t $HANDLER)" ] && "$HANDLER" "$@"
0 3 * * * dehydrated -c && systemctl reload nginx


@pbxgeek it's just phones that connect to different "sip" domain pbx1.domain.com pbx2 etc but all can access GUI portal via pbx.domain.com.@yaboc, there have been some changes to port 80 to accommodate the Let's Encrypt HTTP challenge. It may not work with your proxy out of the box. You may need to look into making changes so both work without conflicting.
Why are your tenants using different domains? This isn't the intended way FS PBX operates. It's more related to FusionPBX, which wasn't designed optimally. FS PBX expects all users to access the portal via a single DNS entry. If you have two redundant FS PBX servers in primary-standby mode, this DNS entry can include a failover.