项目作者: akitogo

项目描述 :
Implements Placetel API and notify for Coldfusion / Coldbox
高级语言: ColdFusion
项目地址: git://github.com/akitogo/placetel.git
创建时间: 2017-08-24T10:12:28Z
项目社区:https://github.com/akitogo/placetel

开源协议:GNU General Public License v3.0

下载


Placetel

Implements Placetel API and notify for Coldfusion / Coldbox
Placetel is a German Voip Provider, with this api you can be notfied of calls and other events, you can do routing of phone calls

For more information see:

https://www.placetel.de/hilfe/telefonanlage/api

https://github.com/Placetel/call-control-notify-api

Installation

You will need a Placetel Account to work with this API

  1. box install placetel

Usage

Notify

Use the notify handler to interact with incoming calls.

  • Enter the endpoint in you Placetel Api account, maybe you need to contact customer service to have access to this entry
  • Enter your url like: https://yourdomain/index.cfm/placetel/notify
  • Implement you own intercepter, for example see interceptors/notify.cfc
  1. function placetel_CallAccepted( event, interceptData ) {
  2. var prc = event.getCollection(private=true);
  3. var rc = event.getCollection();
  4. // prc.placetelResponse=Notify.reject();
  5. // prc.placetelResponse=Notify.reject("busy");
  6. // prc.placetelResponse=Notify.hangup();
  7. // prc.placetelResponse=Notify.queue(1234);
  8. }

Interact with the api

var ptc = getModel(“PlacetelConnection@placetel”);
ptc.setApiKey(‘YOUR API KEY GOES HERE’);

// this initiate a call, ring your phone/voip client
// and dial to somebody
var calling = getModel(“InitiateCall@placetel”);
calling.call(ptc,myVoipAccount,somebody);
```

Written by

www.akitogo.com

Disclaimer

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.