chrispopp Posted November 22, 2016 Report Share Posted November 22, 2016 In the process of building a softphone, and would like to provision my softphone. How would I retrieve the SIP pass via the REST api? Or is there another way? Quote Link to comment Share on other sites More sharing options...
ahennis@voicespring.net Posted November 22, 2016 Report Share Posted November 22, 2016 Not sure if you can pull the password from the REST API. You could just set the password to whatever you want. Quote Link to comment Share on other sites More sharing options...
chrispopp Posted November 23, 2016 Author Report Share Posted November 23, 2016 Problem is that we want to generate the password automatically and randomly. Otherwise generating all extensions with the same password, may pose a security risk. Also, changing the password randomly on the fly, will take the deskphones offline... which is not an option. Quote Link to comment Share on other sites More sharing options...
ahennis@voicespring.net Posted November 23, 2016 Report Share Posted November 23, 2016 Maybe someone from Vodia can chime in on getting the password via REST API. I guess another way to do it might be to grab it from the raw config file of the extension. Have you looked at these docs on the REST API? There is a "Get user settings" call you can make but I am hot sure what it does or returns. I have never done any programming with the REST API so I am completely ignorant of how it works however I am interested in learning more about it. https://vodia.com/doc/vodia_pbx_rest_api.pdf https://vodia.com/doc/vodia_php_rest_api Quote Link to comment Share on other sites More sharing options...
chrispopp Posted November 23, 2016 Author Report Share Posted November 23, 2016 Looked at both of these, and neither one provides the SIP password. Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted November 28, 2016 Report Share Posted November 28, 2016 Providing the password is not a good idea. If the admin account leaks out this would be a easy way to get all the passwords. An alternative would be to set the password (overwrite it). Quote Link to comment Share on other sites More sharing options...
chrispopp Posted November 28, 2016 Author Report Share Posted November 28, 2016 I believe that if the admin account leaks, it would be just as easy to log-on and take everything anyways. If we would overwrite it, that means that we would need to support another CMS. Otherwise we can specifically, use the MAC address field, and retrieve the credentials based on that. Only problem is that we currently cannot retrieve the SIP password. There should be a way to retrieve it. I would say that close to 80% of clients are asking for smartphone applications, and it's really hard to be copetitve without one. Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted November 28, 2016 Report Share Posted November 28, 2016 Ok, the solution is to leave this question to the operator... There is a setting called "rest_show_passwords" in the pbx.xml; if you set it to "true", you can get them with /rest/domain/<domain>/user_settings/<account>. Default is not to show the passwords. Quote Link to comment Share on other sites More sharing options...
chrispopp Posted November 30, 2016 Author Report Share Posted November 30, 2016 Great. Let me test with it. Thank you Quote Link to comment Share on other sites More sharing options...
chrispopp Posted March 26, 2018 Author Report Share Posted March 26, 2018 On 11/28/2016 at 3:49 PM, Vodia PBX said: Ok, the solution is to leave this question to the operator... There is a setting called "rest_show_passwords" in the pbx.xml; if you set it to "true", you can get them with /rest/domain/<domain>/user_settings/<account>. Default is not to show the passwords. Has this changed in the latest version? I am unable to get the passwords anymore... Quote Link to comment Share on other sites More sharing options...
Support Posted March 27, 2018 Report Share Posted March 27, 2018 Hi, You have to follow the same steps: 1) Setting called "rest_show_passwords" in the pbx.xml if you set it to "true". 2) Restart the PBX. 3) Use this REST API command 'sudo curl -u admin:password GET -D - http://127.0.0.1/rest/domain/<domain>/user_settings/<account>' Quote Link to comment Share on other sites More sharing options...
chrispopp Posted April 2, 2018 Author Report Share Posted April 2, 2018 I am able to retrieve the passwords from old releases. But does not work on the newest release. 60.0.1. Can you please check if it works? Quote Link to comment Share on other sites More sharing options...
Support Posted April 2, 2018 Report Share Posted April 2, 2018 Hi, The procedure we provided above is from the latest version 60.0.1. Did you follow the steps 2 and 3 exactly as it's shown? We also tried to "append" the outputs of the pbx.xml before and after restart and can clearly see the difference ( password visible) in the latter part of the file. Please test the API command above again, it has been edited to suit you better. Quote Link to comment Share on other sites More sharing options...
chrispopp Posted April 2, 2018 Author Report Share Posted April 2, 2018 Has the command changed from the previous releases? Quote Link to comment Share on other sites More sharing options...
Support Posted April 2, 2018 Report Share Posted April 2, 2018 Slightly, not much. But we gave you the exact one you need. Quote Link to comment Share on other sites More sharing options...
chrispopp Posted April 2, 2018 Author Report Share Posted April 2, 2018 Can you tell me the difference? The reason is that we had a third party app that was working using the SIP passwords. Now it simply returns an error. Trying to send it to the programmer to change the logic, but to be honest I cannot see a difference between the old command and the new one. Quote Link to comment Share on other sites More sharing options...
Support Posted April 2, 2018 Report Share Posted April 2, 2018 Hi, Give us a call and we can discuss this further. +1-617-446-1399 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.