SInce FreePBX does not honour the proxy settings via the bash export, you need to tell Apache instead to use a proxy. This would apply for FreePBX as well.
Here’s a how to for Debians.
1) #nano /etc/apache2/envvars
2) Add the following codes at the end. You will notice that there's repeats, sometimes they are needed so keep them there twice.
3) #/etc/init.d/apache2 restart
Where 10.50.19.206 is the proxy server and 8080 is the proxy port, you can also insert an auth username like this for all instances above.