Hi,
I purchased Endpoint Manager for phones provisioning and it works really great but only if I’m using it via GUI. So when I press e.g. “Save, Rebuild Config(s) and Update Phones” option from FreePBX EPM GUI, everything is ok.
But if I’m trying do the same from CLI - I get only “Update command sent to XXX” and phone is still unconfigured.
Eg:
[root@freepbx ~]# fwconsole epm listtemplates
±--------±-------------------±---------------±----------±---------------±------------------±-----------±---------±-----------------±-----------------+
| Brand | Template Name | Destination | Time Zone | Provision Type | Provision Address | Background | Firmware | Internal Default | External Default |
±--------±-------------------±---------------±----------±---------------±------------------±-----------±---------±-----------------±-----------------+
| yealink | t42s | 192.168.16.150 | -06:00 | HTTP | 192.168.16.150 | None | | | |
±--------±-------------------±---------------±----------±---------------±------------------±-----------±---------±-----------------±-----------------+
[root@freepbx ~]# fwconsole epm update t42s
Update command sent to 604
Update command sent to 644
Update command sent to 654
[root@freepbx ~]# su asterisk -c “fwconsole epm update t42s”
Update command sent to 604
Update command sent to 644
Update command sent to 654
And still phones are untouched.
Also tried with switch user to asterisk:
[asterisk@freepbx ~]$ fwconsole epm update t42s
Update command sent to 604
Update command sent to 644
Update command sent to 654
Are we talking about PJSIP endpoints with a single contact? I suspect this may be due to the recentish change of referring to pjsip contact one as XXXX-1 instead of XXXX. Support ticket pls.
That is not how the fwconsole command works. As long as it is execute with sudo rights, it will subsequently do what it needs to do with the proper user.
That was not my point. The point is that running anything in different environments is, well, not the same. Aas you see in this case the fwconsole wrapper does not achieve the same result, so at least try and normalize first.
Also as 99% of our readers do all this stuff as root, all the sudo stuff is kinda redundant
Yup, support confirmed that was a bug, fixed in EPM version 15.0.39.33.
Installation: fwconsole ma downloadinstall endpoint --tag=15.0.39.33
But I have another question about EPM. I thought that EPM can configure whole phone including SIP account. But when I’m trying to change SIP account on the phone via EPM it seems doesn’t works.
E.g. I have Yealink phone with configured SIP account:
If I want to change some configuration on it besides SIP account - it works.
But when I’m trying to change SIP account from e.g. 654 to 333 - nothing happens.
Is it bacause communication between FreePBX and phone is realized with extension number and EPM can’t change it on the phone or maybe this is another bug?
The point is you’re just trying to confuse things. When executing fwconsole with admin rights whether you are root or sudo it will do everything with the appropriate rights. There is never a need to execute it as the asterisk user.
Any linux command is always executed in the ‘environment’ of the user making that call, the ‘environment’ of the GUI is almost certainly not the same as the ‘environment’ of root or ‘sudo’ .
As I noted fwconsole will be executed using whatever ‘php’ is in the environment of the caller. as such ‘php’ could either be the found in PATH or directly defined , thus root might find php7.n but the asterisk user might find php5.6 , further the PATH used might find a different php binary in that family even when called.
If as the OP said it works in the gooey but does not in a shell then please agree that the gooey has a different ‘environment’ than any shell.
So likely the gooey is NOT using the fwconsole wrapper (why would it) , but the OP was, hence my post, confusing or not, it was a reasonable diagnostic that given the feedback I followed with an effective ‘then don’t do that’ .