How to I reload FreePBX 16.0.10.48 from the command line to get new PJSIP endpoints

I have tried, dialplan reload, core reload (and variants) and it looks like it’s reloading the dial plan but it is not loading the pjsip endpoints. Also tried module reload res_pjsip.so

I’ve tried the Asterisk Command Line Module, looks like it’s doing something but it doesn’t do what I want

It only loads the new pjsip send endpoints if I click the APPLY button.

fwconsole reload

Half way there. Yes it does work if I run it from the root login at the console.

However I want to be able to run this from a PHP script which I can call using my browser.

When I do this though I am getting this error : [RCONFFAIL] - ‘fwconsole reload’ failed, config not applied (The command “/usr/sbin/asterisk -rx ‘core show version’” failed.

I’m guessing it is a permission issue. Any thoughts on this?