2017 © Pedro Peláez
 

library catapult-php-examples

Catapult PHP Examples

image

bandwidth/catapult-php-examples

Catapult PHP Examples

  • Wednesday, January 17, 2018
  • by nadirhamid
  • Repository
  • 17 Watchers
  • 7 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

⚠️ DEPRECATED⚠️

Example Applications For Bandwidth's App Platform

Built using the PHP SDK, (*1)

Includes:

  • SMS Auto Replies
  • Call Transfers
  • Voice Reminders
  • Basic Voice Mail
  • Basic Conference
  • Advanced Conference
  • Keypad Simulator
  • BaML Call Transfers
  • SIP Domain & Endpoints *, (*2)

          * coming soon

Setup

  1. Starters file credentials.json stores your Bandwidth Credentials, you should edit this first, (*3)

  2. Each application has a application.json which includes information relative to the application. To run the app, please update this. You will also need to ensure numbers are in E.164 format and the Voices are valid for Catapult v1, (*4)

  3. Under your Catapult Account we've used a seperate Application for each application listed. You can do so as well by logging into your Catapult Account and making the applications. You will need to ensure:, (*5)

    1. Call URLs are setup properly this is the Callback URL please
      point this to the callback.php (each application has one), (*6)

    2. Make sure the numbers used in the application.json belong to the same application., (*7)

  4. To start testing please make sure you have ran an application once it will create all the table for these demos, (*8)

Getting The Dependancies

to get the latest php-bandwidth SDK run the following:, (*9)

composer update, (*10)

Heroku

You'll need to create a Heroku application, then you can deploy :, (*11)

heroku create "php-bandwidth-examples" git add * git commit -m 'updating php-bandwidth-examples!' git push heroku master, (*12)

To run these examples on heroku you will need clearDB OR Postgres, which can be installed using:, (*13)

heroku addons:add heroku-postgresql:dev, (*14)

OR, (*15)

heroku addons:add cleardb:ignite, (*16)

currently Heroku is tested with Heroku Postgres, (*17)

AWS

eb start git aws.push, (*18)

for AWS you will need to set:, (*19)

MYSQL_USER MYSQL_PASSWORD MYSQL_HOST MYSQL_DB, (*20)

App 001 SMS Auto Replies

Requirements: A Number under your Catapult account, (*21)

Setting up: 1. use callback.php as the callback to your application under https://catapult.inetwork.com/pages/catapult.jsf 2. Enter a valid number from your catapult account, (*22)

Other: Make sure the number is also under this application, (*23)

App 002 Call Transfers

Requirements: A listening and transfering number for your Catapult account, (*24)

Setting up: 1. use callback.php as the callback to your application under https://catapult.inetwork.com/pages/catapult.jsf 2. Enter two valid numbers from your catapult account in application.json, (*25)

App 003 Voice Reminders

Requirements: A number to use for voice reminders, (*26)

Setting up: 1. use callback.php as the callback to your application under https://catapult.inetwork.com/pages/catapult.jsf 2. Enter a valid number for your voice reminders, (*27)

App 004 Basic Voice Mail

Requirements: A number to use for voice reminders, (*28)

Setting up: 1. use callback.php as the callback to your application under https://catapult.inetwork.com/pages/catapult.jsf 2. Enter a valid number for your voice mail, (*29)

App 005 Basic Conference

Requirements: A number to use for the conference, (*30)

Setting up: 1. use callback.php as the callback to your application under https://catapult.inetwork.com/pages/catapult.jsf 2. Enter valid attendees and initial from number in application.json, (*31)

App 006 Advanced Conference

Requirements: A number to use for the conference, (*32)

Setting up: Setup is similar to basic conference, (*33)

App 007 Keypad Simulator

Keypad simulator is a quick way to simulate a fully capable keypad service it will provide an easy way to capture DTMF keys sequentially save them using SQLite and even perform transfers., (*34)

Setting up: 1. Enter valid numerical sequences for your keypad 2. Needs a valid incoming number 3. Existing start and intermediatte speech texts, (*35)

App 008 BaML Call Transfers

This will generate verbs in Bandwidth Markup Language the verbs will then be used to update your calls. In the log you will be able to see all the markup generated, (*36)

Setting up: We have listed 1. Enter a valid initial number and to number 2. Initiate a call, (*37)

App 009 SIP Domains

This application creates domains and endpoints using Catapult. It will provide an interface to do so. Through it you will be able to see step approach of creating these domains as well as integrating them with the endpoints., (*38)

As like the other interfaces you can also see the history of SIP calls made., (*39)

Setting Up: 1. Specify valid names to the interface 2. Use these domains in creating your endpoints, (*40)

Docs

These applications are documented in the following way: * Steps (these are things that are absolutely needed for the application to run) * Important (things that we need) * Recommendation (these are branches that are optional however highly recommended) * Optional (implementors choice), (*41)

Other:, (*42)

an Implementors Note will describe the segment and whether there are things they should be concerned with, (*43)

a Tip is a hint on which objects to use, (*44)

Validation will describe how to validate using the Catapult library, (*45)

Even more

TO make sure these examples run on your RBDMS we have used a simple style guide:, (*46)

  • underscores in all our table names
  • no infixes for the table names
  • reserved characters where applicable i.e "from" for postGresQL will be from for SQLite

Other Notes

  • Depending on how the callback is implemented some application records may take time to appear in the interface., (*47)

  • PHP's sleep/1 is added in multiple areas, this while commented for the examples use case, should be leveraged with how you build your applications. For more, you will find the sleep timeouts in application.json, (*48)

These examples require:, (*49)

Catapult PHP SDK >= 0.7.3 SQLite3 PHP 5.3.0 Apache HTTPd >= 2.2 OR nGinx, (*50)

Deploying Anywhere: SQLite3, (*51)

When using Heroku: PostGresQL ClearDB with MySQL, (*52)

AWS: MySQL, (*53)

Open external access via ngrock

As alternative to deployment to external hosting you can open external access to local web server via ngrock., (*54)

First instal ngrock on your computer. Run ngrock by, (*55)

ngrok http 80 #you can use another free port if need 

You will see url like http://XXXXXXX.ngrok.io on console output. Use this link to access your app externally., (*56)

The Versions

17/01 2018

dev-master

9999999-dev http://github.com/bandwidthcom/php-bandwidth-examples

Catapult PHP Examples

  Sources   Download

MIT

The Requires

 

by Nadir Hamid

php sdk bandwidth catapult

25/08 2017

dev-add-license-1

dev-add-license-1 http://github.com/bandwidthcom/php-bandwidth-examples

Catapult PHP Examples

  Sources   Download

MIT

The Requires

 

by Nadir Hamid

php sdk bandwidth catapult

11/06 2015

dev-CAT-3243_php_examples

dev-CAT-3243_php_examples http://github.com/bandwidthcom/php-bandwidth-examples

Catapult PHP Examples

  Sources   Download

MIT

The Requires

 

by Nadir Hamid

php sdk bandwidth catapult

11/04 2015

v0.5.0

0.5.0.0 http://github.com/bandwidthcom/php-bandwidth-examples

Catapult PHP Examples

  Sources   Download

MIT

by Nadir Hamid

php sdk bandwidth catapult