No commit activity in last 3 years
No release in over 3 years
Fluentd Output plugin to make a phone call with Twilio VoIP API. Twiml supports text-to-speech with many languages ref. https://www.twilio.com/docs/api/twiml/say
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 3.1.0

Runtime

< 2, >= 0.14.15
~> 5.5.0
 Project Readme

fluent-plugin-twilio

Overview

Fluentd Output plugin to make a call with twilio. Twilio free trial is available to signup at the official website. You can try call to your cellphone for free!

Requirements

fluent-plugin-twilio fluentd ruby
>= 0.1.0 >= v0.14.15 >= 2.1
< 0.1.0 >= v0.12.0 >= 1.9

Installation

install with gem or td-agent-gem command as:

### for local fluentd
$ gem install fluent-plugin-twilio

### for td-agent2 (standard)
$ sudo td-agent-gem install fluent-plugin-twilio

Configuration

Message Format

fluent_logger.post('notify.call', {
  :number   => '+8109012345678',  # Required if default_number is brank
  :message  => 'Hello World!'   # Required if default_message is brank
})

Sample

<source>
  @type http
  port 8888
</source>

<match notify.call>
  @type twilio

  # Set account Sid and Token from twilio.com/user/account
  account_sid     TWILIO_ACCOUNT_SID           # Required
  auth_token      TWILIO_AUTH_TOKEN            # Required

  # Set caller ID with country code
  from_number     +81312345678                 # Required

  # Set defaults of making outbound call.
  # To call multiple phone at the same time, list them with comma like below.
  default_number  +819012345678,+818012345678  # Optional
  default_message "call from fluentd."         # Optional

  # Set log level to prevent info error
  @log_level       warn
</match>

Sample to customize messages

You can customize message using filter_record_transformer.

<source>
  @type http
  port 8888
  @label @NOTIFY
</source>

<label @NOTIFY>
  <filter>
    @type record_transformer
    <record>
      message Hi. ${record["name"]} has made a order of ${record["item"]} just now.
    </record>
  </filter>
  <match>
    @type twilio
    # snip ...
  </match>
</label>

Quick Test

# test call to +819012345678 and say "Help! System ABC has down." with woman voice.
$ curl http://localhost:8888/notify.call -F 'json={"number":"+819012345678","voice":"woman","message":"Help! System ABC has down."}'

# check twilio activity log
$ tail -f /var/log/td-agent/td-agent.log

Backend Service

Blog Articles

TODO

Pull requests are very welcome!!

Copyright

Copyright © 2013- Kentaro Yoshida (@yoshi_ken)

License

Apache License, Version 2.0