...
The Sangoma Phone's development tools are available via a CGI that can be accessed from any desktop computer after you enable the phone's App Development mode. This guide describes how to access the app development CGI and use the tools via a commandline interface.
CGI Access
The Phone App web service is available from http:// phone-ip-address /cgi-bin/app_dev.cgi. The web service expects a mode parameter with additional parameters as appropriate to the mode.
Phone App Web Service Modes
mode=install
Action: Installs an application on the phone.
Required parameters: An uploaded zip file containing the application.
Optional parameters: name: The name of the app contained in the uploaded file. If the name does not match the name in the app.json file, the upload will be rejected.
Example:
Code Block curl --anyauth --form mode=install --form file=@/tmp/myapp.zip http://PHONE_IP/cgi-bin/app_dev.cgi --user admin:789
...
Action: Streams logging output from the app. This includes print() and println() output from the app iteself and certain error messages generated by the app engine related to the specified app.
Required parameters: appname: The name of the app.
Optional parameters: prebuffer: Some web browsers will wait until a certain amount of data is buffered up before attempting to display anything. Specifying prebuffer=1024 will cause 1024 spaces, followed by a newline, to be printed out before sending log data. This is normally not needed when using curl or an HTTP library, but can be useful when pointing a browser at this mode.
Example:
Code Block curl --anyauth --user admin:789 http://PHONE_IP/cgi-bin/app_dev.cgi --form mode=log --form appname=myapp --form prebuffer=1024
XML responses
In addition, all modes return a short XML document describing the results of the request.
...