Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

exotel-node

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exotel-node

A NodeJs wrapper for Exotel APIs

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

Exotel NodeJs Wrapper

A NodeJs wrapper for Exotel APIs. Converts Exotel XML response to Javascript object.

npm install exotel-node

Include and initialize

var Exotel = require('exotel-node');
Exotel.init(SID, TOKEN, EXOPHONE);

APIs available

  • Send SMS
  • Connect call
  • Get call details

Send SMS

Exotel.sendSMS(TO_NUMBER, MESSAGE, function(error, response) {
  if (!error) {
    console.log(response);
  }
});

Connect call (Connect agent to customer)

Exotel.connectCall(AGENT_NUMBER, CUSTOMER_NUMBER, function(error, response) {
  if (!error) {
    console.log(response);
  }
});

Get call details

Exotel.getCallDetails(CALL_SID, function(error, response) {
  if (!error) {
    console.log(response);
    console.log(response.DateCreated);  // Date created
    console.log(response.DateUpdated);  // Date updated
    console.log(response.AccountSid);   // Account SID used to create the call
    console.log(response.To);           // Customer number/2nd number in API call
    console.log(response.From);         // Agent number/1st number in API call
    console.log(response.Status);       // Call status
    console.log(response.StartTime);    // Call start time
    console.log(response.EndTime);      // Call end time
    console.log(response.Duration);     // Call duration
    console.log(response.Price);        // Call cost
    console.log(response.RecordingUrl); // Call recording url
  }
});

Submit issues

You can raise an issue in this repo or mail me at sidhant@hashexclude.com

Keywords

FAQs

Package last updated on 22 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc