Set Up Your Environment

You don't need anything special to get started, just a text editor and Git. However, we recommend the process below to make full use of the tools we've built, including the application simulator, code completion and linting.

Install Lua

Summit apps are written in Lua, a powerful, lightweight scripting language. Don't worry if you haven’t used Lua before — it's very easy to learn and well-documented.

Detailed installation instructions available here.

Mac OSX

curl -R -O http://www.lua.org/ftp/lua-5.2.3.tar.gz
tar zxf lua-5.2.3.tar.gz
cd lua-5.2.3
make macosx test

Linux

curl -R -O http://www.lua.org/ftp/lua-5.2.3.tar.gz
tar zxf lua-5.2.3.tar.gz
cd lua-5.2.3
make linux test

Windows

Installation depends on the compiler you use. Read more about installing Lua for Windows.

Install Helper Tools

Sublime Text 3

We recommend using Sublime Text 3 as your editor. Our Sublime Text 3 plugins make it much easier to validate and test your code pre-deployment. If you're not already using it, download Sublime Text 3 for free and try it out.

Package control is the easiest way to install, manage and use plugins for Sublime Text 3. Install Package Control, then in Sublime Text 3, use Ctrl + ⇧ + P (⌘+ ⇧ + P) to open the Command Panel, then start to type "Package Control : Install Package" and select it when it appears.

When the list of available packages loads, start to type "Summit." Select either SummitEditor or SummitLinter to install, then repeat for the other. You may also want to install the Git package at the same time for easy use of many Git commands directly from Sublime Text 3.

NOTE: SummitLinter has prerequisite dependencies on LuaRocks, luacheck and SublimeLinter 3, as well as the SummitEditor.

Install Git

Next, install Git if you haven't already.

Configure Your App

Unsure which applies to you?

  • Platform Developers: If you want to build telecom apps from scratch and are not an enterprise-level customer using the Mitel Flex Contact Center.
  • Product Developers: If you or your company is using the Mitel Flex Contact Center and you want to develop additional functionality or alter the functionality of our products.

Add Your SSH Key

Copy your SSH key using the one-liner below in Terminal or Git Bash (if you’re on Windows). If you don’t have an SSH key yet, GitHub has great instructions for generating a key.

Mac OSX

$ pbcopy < ~/.ssh/id_rsa.pub

Linux

$ sudo apt-get install xclip
$ xclip -sel clip < ~/.ssh/id_rsa.pub

Windows (in Git BASH)

$ clip < ~/.ssh/id_rsa.pub

Log into your account. Go to Access -> SSH Keys. Click the “Add” button. Give your key a description and paste the entire key into the “Key” field and click “Save.”

Add an App

Summit apps are simply Git repos that are run as applications. We’ll give you a repo to clone that includes code for a sample application. Simply write over our code to start building your own app.

Log into your account and go to Applications. Click the “Add” button. Give your app a Name and Description for your own use, then click “Save.”

Add a Number

Go to Numbers -> Orders and click the “Add” button to start a new phone number purchase. You’ll be able to search through our lot of numbers based on area code and chose one for immediate availability. To request a number that you don’t see available in the list or to begin porting a number you already own, contact Support.

Configure Your Routepoint

Routepoints connect numbers to apps. Go to Routepoints in the menu and you'll notice that one was automatically created for you when you added a number. Edit the routepoint and use the "Applications" dropdown to assign your application to your routepoint. Now, when you call into your number, your app should be available.

If your app will be used for inbound SMS, add your relay URL, then click “Save.”

Add An Endpoint

Optional

Endpoints are, in the simplest terms, phones. If you are building an IVR, or an app that doesn't require a human to answer, you likely do not need an endpoint. However, if you are building applications that require connecting to VOIP phones (like a PBX or business phone system), you will need to setup Endpoints to configure the connections to these phones and register them according to the administrative guidelines from the phone manufacturer.

The only requirements need in the Summit web interface are the Auth. Contact (typically user name) and Auth. Password, but you will need your SIP domain and outbound proxy to configure your phone. You can find these by going to "Tenant Info" in your account.

A setting group is a shortcut for setting up many endpoints with generally the same settings. Endpoints require a setting group, so if you are using endpoints, you must have at least one settings group. All settings from the settings group can be overriden on an individual endpoint.

Add An API Key

Optional

API Keys are required when using the Summit REST API to schedule outbound calls or SMS. Go to Access -> API Keys to generate a key. Take note of the Key and Secret Key. You will only be able to view the Secret Key once. If you lose the information, you will need to generate a new Secret Key.

Add Your SSH Key

Copy your SSH key using the one-liner below in Terminal or Git Bash (if you’re on Windows). If you don’t have an SSH key yet, GitHub has great instructions for generating a key.

Mac OSX

$ pbcopy < ~/.ssh/id_rsa.pub

Linux

$ sudo apt-get install xclip
$ xclip -sel clip < ~/.ssh/id_rsa.pub

Windows

$ clip < ~/.ssh/id_rsa.pub

Log into your account. Go to Summit -> Keys. Click the “Add” button. Give your key a description and paste the entire key into the “Key” field and click “Save.”

Add an App

Summit apps are simply Git repos that are run as applications. We’ll give you a repo to clone that includes code for a sample application. Simply write over our code to start building your own app.

Log into your account and go to Summit -> Apps. Click the “Add” button. Give your app a Name and Description for your own use, then click “Save.”

Find the Git URL that is listed with your App. Copy and paste the unique ID from end of this string (the part in bold show below, then move to step 3.

git@code.corvisacloud.com:12345678-1234-5678-1234-567812345678

Add a Provider

Providers give us a way to reference apps throughout the system and provide the extensibility to override default system components like voicemail or extensions.

Go to Summit ->Providers, then click the “Add” button. Paste your unique app ID from step 2 into the “App ID” field.

“Application Type” is a unique name for this application. There are two reserved application types, which when used in this field will REPLACE the specified functionality internally with your application. Those types are: voicemail, extension. Any other value can be used if you do not intend to use your app in replacement of the voicemail or extension modules.

Version ID is for your use, you can simply default to “1”.

Add a Route Point

Go to PBX -> Route Point, then click the “Add” button. Use the fields to adjust your settings for the app, and select the Provider you just made in the “Application” dropdown.

Start Your Development

Clone Your Repo

Go to Applications and copy the entire Git URL for your app. In Terminal (or Git Bash on Windows), clone your app’s repo using the form git clone <Git URL> appname, replacing <Git URL> with your own app’s URL and “appname” with the name of the directory you would like to create to hold your repo locally.

$ git clone git@code.corvisacloud.com:12345678-1234-5678-1234-567812345678 appname

Check the directory to verify that the sample files were cloned. Also! Check it out! That’s a real-live, working app you’ve got there!

Reset Your Remote

One of the coolest things about the Summit Platform is our deployment method: when you push back to our servers, we run a quick static code analysis, and your app is auto-deployed to our call servers. That’s it. You can deploy anytime — no waiting for release cycles.

To make use of the normal Git workflow without pushing code live, we recommend resetting the remote of your repo:

1. Change Directories into the directory you created for your repo
$ cd appname
2. Rename the default remote
$ git remote rename origin deploy

When checking out your Summit app a remote called 'origin' is created by default. Here we rename that destination to 'deploy'

3. Using Github, or other Git hosting, add a remote project by project URL
$ git remote add origin git@github.com/yourname/yourproject.git

This will create a new remote called 'origin' that is your own source.

Develop Your App

Follow our Sample App Tutorials to learn about building out an app, or dive right in with the API documentation. Or, you can test out the system and move onto the next steps to test and deploy the sample app that came in your Git repo.

Test Your App

In Sublime Text 3, go to File -> Open and select your app’s repo directory. Then, go to Project -> Save Project As… , name and save the project in the same directory.

Now that you have a project created, we need to add some simulator settings to it. Simply go to Project -> Edit Project and add the following:

"build_path": "/folder/that/contains/your/application/source"

build_path should point to the src directory's parent directory and not the src directory itself.

It should look something like this:

{
"folders":
  [
    {
      "follow_symlinks": true,
      "path": "/folder/that/contains/your/application/source"
    }
  ],
"build_path": "/folder/that/contains/your/application/source"
}

Now with all the .lua files in your project selected, go to View -> Syntax, and set the Syntax as Lua (Summit).

You can now simply press CTRL + B on Windows or Linux machines and ⌘ + B on Mac. This should cause a terminal window to open on your screen allowing you to interact with your simulated application.

For more configuration options, including using data from your Datastore, see the App Simulator & Debugger guide.

Deploy

Following the normal Git workflow, of staging files, committing and pushing throughout the development of your app. When you’re ready to deploy, just push your code back upstream:

git push deploy master

NOTE: By default, deployments are rejected if you do not maintain 80% code coverage, and/or if any of your unit tests fail. These settings can be changed at the repo level in the REPOCONF file. Code coverage can be adjusted at the file level via a comment at the top of the file. Read more about Testing in the API documentation for the Testing Library.