Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Adding RESTful Application

Status
colourYellow
titleThis wiki has been updated for Version 13 of your PBX GUI

Commercial Module

Info
titlePrerequisites

Adding the Phone Apps to a device requires that you have the

...

Phone Apps module installed along with a valid license.

...

To purchase the

...

Phones Apps module, please see this wiki on how to Purchase Commercial Modules.

...

You will also need to make sure you have a valid Commercial End Point Manager module

...

.

Info
titleSangoma Phone Notice

If you are using a Sangoma s400, s500 or s700 phone you will not need to purchase the Phone Apps module or End Point Manager Module as these modules will work with Sangoma Phones out of the box with no license purchasing needed.

Info

Make sure you have the following versions installed

  • Phone Apps on version 13.0.9 or newer
  • End Point Manager on version 13.0.39 or newer
  • User Management on version 13.0.57 or newer

Once all the above requirement requirements are met, you can go through the below setup.

Table of Contents

Verify

...

  1. Verify the user you will be adding application to has been setup as a API user in the RESTful API module and they have access to either all modules or at the very least the module that the application will be using.
     
  2. Log into your Phone PBX Admin GUI and click on the module called RestAPI.
    Image Removed
     
  3. On the right is a list of users who have a RESTful API account setup.  Click on your user or if you do not see the user listed click the "New Token" option.
    Image Removed
     
  4. When you edit or setup a API user you can set the following options.
    1. Name- A name for this user.  Usually the extension number.
    2. Description-  Optional description about this API user 
    3. Associated User- Which Extension/User you want this key to be associated with.  If the extension is deleted the key will also be removed.  Also the status of the API Key can be enabled and disabled in the User Control Panel of the associated user along wth their API Tokens.
    4. Status- Enable or Disabled
    5. Users- Which user(s) data this token key can get and set.  Meaning if we were using the API token here for Do No Disturb the API token would only work to receive and set DND for these users.  Only set to the users you want this API token to be able to control and ususally is the same as the Associated User above.
    6. Modules- Which modules this users token has access to.  Default is to set this to "All" modules.
    7. Rate Limit- How many request per hour this token user can make.
      Image Removed
       
  5. Once done save your settings.

 

Phone Apps is Enabled for the User

  1. Review the User Management Module User Guide for full details on the User Management module which includes the ability to enable Phone Apps for users.  Below we will cover just the needs for the Phone Apps user section of User Management that we need to enable for Phone Apps to work.
     
  2. Navigate to your User Management module on your PBX.
     Image Added

  3. Edit a user that you want to enable for Phone Apps access to.
    Image Added 
     
  4. Navigate to the Phone Apps Section.
    Image Added

  5. Make sure the user is enabled for Phone Apps.
    1. Either set this option to Yes or if set to Inherit verify the Group that the User belongs to has the permissions set to Enabled under Group Permissions of User Management.
      Image Added
  6. You can also manage restrictions from within each application with these sub tabs.
    Image Added

  7. Save you changes
    Image Added

Map Applications to Phones

  1. Log into your Commercial commercial End Point Manager Manager (EPM) and either create or edit a template for a support upported device.  In In our example, we are going to pick Aastra and edit our "Sample" template.  For more information on using EPM please see this wiki.  For sakes Sangoma Brand. For the purpose of this wiki, we will assume you know how to use the Commercial commercial EPM, and just we will only cover how to add a an application to a template.
    Image Removed
    We can pick a phone model and setup a few buttons to be XML-API type.  Under the Value section will be a drop down of available RESTful Apps for you to choose from.
    Image Removed
  2. When done make sure to save your template and then map your devices to use this template in the Extension Mapping section.
     

External Phones

  1. If you phone is external from your PBX For more information on how to use the commercial EPM, please see the End Point Manager wiki.
    Image Added

  2. Click on the template in End Point Manager that you want add Applications for.
     Image Added

  3. Scroll to the bottom of the template and select a model number you want to add a Intercom Button for.
    Image Added 
     
  4. Scroll down the your first available Line Key that is not used
     Image Added

  5. From the Drop Down of button types pick XML-API
     Image Added

  6. You can optionally change the label name to be something different then Parking if you want.  The Label is the name that will be shown on your Phone Screen for that button.
     Image Added


  7. You can now drag the button to be in a different spot. In our example we will drag Button 21 that we just setup as a Intercom button up toward the top to make it button 4 on the phone.  Left click on the button and while holding down your left mouse drag the button to a different spot and release it.
     Image Added


  8. Save the Model using the 
    Image Added
     
  9. If you go back into the model number it will show Intercom as button 4 now.
    Image Added 
     
  10. We now need to update the phone config.  Our 3 options at the bottom of the template are
    • Save Template- This will only save your changed into the PBX Database but will not write out new config files for the phones that are using this template as mapped in Extension Mapping section of End Pint Manager.
    • and Rebuild Configs- This will save your changes to the PBX Database and will also write out new config file for the phones that are using this template as mapped in Extension Mapping section of End Pint Manager but the phones will need to be rebooted for it to retrieve the changes.
    • and Force Update- Will do both the Rebuild Configs option above but also update any phones that are mapped to use this template and currently registered to the PBX immediately with no need to reboot the phones.
       

      Image Added

Open the Phone Apps Port if Using External Phones

  1. If your phone is external from your PBX, and your PBX is behind a firewall, you will need to open the RestFUL Phone Apps port.  To To do this, go into the System Admin module and click click on the Click on the Port Management Section section.
    Image RemovedImage Added

  2. Locate the RESTful Phone  Phone Apps Port port.
    Image RemovedImage Added 
     
  3. From here you Optional: You can change the port to be something different.  Do this port if you would like. If you change it, click the Update Now button to save the changes.
    Image Added

  4. Do not forget to open your firewall for this port if you will have external phones connecting will connect to the PBX and needing need access to the RESTful Phone Apps.

 

 

  1. The phones will use this port when connecting to the phone apps.

Start the Process Script

  1. After you have licensed Phone Apps, you need to start the demon that watches for hints the first time, as this could not be started when there was no license. This script will be auto-started any time amportal start is run, which includes on boot up.

    1. PBX Version 13 or Newer

      1. fwconsole restart restapps

        Code Block
        [root@mypbx]# fwconsole restart restapps
        Restapps daemon stopped
        Running Restapps Hooks
        Starting Restapps daemon
        Restapps daemon done
        [root@mypbx]# 
    2. PBX Versiopn 12 or Older

      1. /etc/init.d/restapps restart

        Code Block
        [root@mybox ~]# /etc/init.d/restapps restart
        Shutting down REST applications daemon:                    [  OK  ]
        Starting REST applications daemon:                         [  OK  ]
        [root@mybox ~]#