Can't Generate LetsEncrypt Certificates

I can’t generate lLetsEncrypt certificates, trying to follow the 7th video in the Freepbx series by crosstalk solutions. Please let me know how to get around this. Thanks!

Start by assuming that the error message is truthful (DNS lookup of your hostname really does fail).

From a shell prompt, can you ping google.com ? If not, fix that first.
Next, is the host that can’t be resolved the correct name?
What happens when you try to ping it?

Plus check Sangoma Wiki for LE settings and @Stewart1 mentioned you good points for check. Good luck.
https://wiki.freepbx.org/display/FPG/Certificate+Management+User+Guide

I pinged google.com
48 packets sent, 48 received, 0% packet loss 47063ms

As for the host, I changed it back to freepbx.sangoma.local, still will not work for the letsencrypt certificate.

The cert must be generated with an fqdn that will resolve to PBX.
https://wiki.freepbx.org/display/FPG/Certificate+Management+User+Guide#CertificateManagementUserGuide-GenerateLet’sEncryptCertificate