exotel-client is a basic exotel api client fore nodejs.  This is a basic wrapper for the Exotel APIs.  

Fore more advanced features, use the exotel APIs.    
(http://support.exotel.in/support/solutions/folders/92360)

Installation
------------

    npm install exotel-client --save

Basic Usage
-----------

Require the exotel package.

    var exotel = require('exotel-client');

Initialize with the exotel_sid & exotel_token.  This can be obtained from the exotel dashboard.  (http://www.my.exotel.in)

    exotel.init(exotel_sid, exotel_token);

Use the following methods as required:

    //Make a call to connect a number to another.
    exotel.call_number(from, exophone, to, callback);

    //Make a call to connect a number to a flow.
    exotel.call_flow(from, exophone, flowId, callback);

    //Send an SMS.
    exotel.send_sms(from, to, body, callback);

    //Check Call status.
    exotel.call_status(callSid, callback);

    //Check SMS status.
    exotel.sms_status(SmsId, callback);

**Callback Parameters**

    //Callback Example: 
    callback(error, data);

On success, the '**error**' parameter is null, and the '**data**' parameter contains the response received from the Exotel API.  
In case of an error, the '**error**' parameter contains the error message and the '**data**' parameter is null.

On success **data** parameter contains a JSON response.