1.0.0 • Published 6 years ago

agent-call-feed v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
6 years ago

TeleCMI Agent Call Feed

Javascript agent live call feed SDK for india Virtual number and toll free number from TeleCMI cloud platform.

Documents

Install

Bower

bower install agent-call-feed

npm

npm install agent-call-feed

yarn

yarn add agent-call-feed

CDN

<script src="https://app.telecmi.com/1.0/agent-call-feed.min.js"></script>

Get Started

Create Telecmi Object

var telecmi = new TeleCMI(); 

Method

Register Using our Agent Login API you can get agent token. Using agent token you can create live call feed connection using following method.

telecmi.start('token')

Connect Callback

onConnect This callback will trigger once live call feed connection will try to establish with our TeleCMI platform.

Connect .

  telecmi.onConnect=function(data){
  //Data is JSON it contain event and status
  };

Example

  telecmi.onConnect=function(data){
  if(data.status=='connected'){
   //Live call feed ready start subscribe 
       telecmi.subscribeCalls();
     }else if(data.status=='error')
     {
        // Invalid token please check your token
     }
 };

List of response

StatusDescription
connectedLive call feed connection established
errorInvalid token need to check token

Subscribe

Call Events Subscribe incomming calls live feed

  telecmi.subscribeCalls();

Call Back .

  telecmi.onCalls=function(data){
  //Data is JSON it contain customer number,group id,time and call uuid
  };

Example

  telecmi.onCalls=function(data){
   console.log(data.from) //customer number
   console.log(data.agent) //Agent Id
   console.log(data.time) //Incomming call time
   console.log(data.status) // incomming call status is it answered or still ringing
 };

List of Response

actionagentgroupfromidinetnoleguidnameuuidstate
It's define channel property "ch-c" = channel create ."ch-s" = channel state change like early,answer. "ch-d" = channel deletedAgent idCall receiving team idcustomer numberrecord isYour app idcustomer channel uuidcustomer name if you savedagent call uuidcall status is it answered or ringing 'early' = Call ringing to agent 'answer' = Call answered by agent 'bridged' = Call established between customer and agent 'hangup' = Call disconnected
1.0.0

6 years ago