twilio-forwarder

command module
v0.0.0-...-9ec676c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2014 License: BSD-3-Clause Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Twilio Forwarder

This is a tiny Go app that forwards phone calls, records voicemail, and bridges SMS to email. You'll need a paid Twilio account and free Mailgun account to get up and running.

It runs on Heroku with the Go buildpack.

Environment Variables

Name Description Example
TWILIO_ACCOUNT Twilio Account Sid AC12345678123456781234567812345678
TWILIO_KEY Twilio Auth Token f1d2d2f924e986ac86fdf7b36c94bcdf32beec15
MAILGUN_PUBLIC_KEY Mailgun Public Key pubkey-3ax6xnjp29jd6fds4gc373sgvjxteol0
MAILGUN_KEY Mailgun API key key-3ax6xnjp29jd6fds4gc373sgvjxteol0
FROM_NUMBER Source number for outgoing SMS messages. Must be confirmed or owned in Twilio. +15555551212
FROM_DOMAIN Domain to use for email. Must be configured in Mailgun. sms.example.com
TO_EMAIL Email to send/receive SMS messages and voicemails to. Must sign outbound messages with DKIM and have valid SPF. user@example.com
CALL_DEST Number to forward phone calls to. Should not have voicemail enabled. +15555551212
BASE_URL The URL to the application with no trailing slash. https://example.herokuapp.com

Setup

Twilio

  • Set Voice Request URL to $BASE_URL/call.
  • Set Messaging Request URL to $BASE_URL/sms.

Mailgun

  • Add a route:
    • Filter Expression: catch_all()
    • Action: forward("$BASE_URL/email")

Usage

Send emails to $DEST@$FROM_DOMAIN (where $DEST is something like +15555551212) from $TO_EMAIL to send outbound SMS messages. Inbound SMS messages will be sent to $TO_EMAIL. Reply to SMS emails to send outbound replies. Inbound calls will be forwarded to $CALL_DEST. If the call is not answered a voicemail message will be recorded and the recording and transcript will be emailed to $TO_EMAIL.

This is obviously just a start and could be modified to be more sophisticated. Pull requests welcome!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/codegangsta/inject
Package inject provides utilities for mapping and injecting dependencies in various ways.
Package inject provides utilities for mapping and injecting dependencies in various ways.
_workspace/src/github.com/codegangsta/martini
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
_workspace/src/github.com/mbanzon/mailgun
Package mailgun provides methods for interacting with the Mailgun API.
Package mailgun provides methods for interacting with the Mailgun API.
_workspace/src/github.com/mbanzon/simplehttp
Package simplehttp provides some simple methods and types to do HTTP queries with form values and parameters easily - especially if the returned result is expected to be JSON or XML.
Package simplehttp provides some simple methods and types to do HTTP queries with form values and parameters easily - especially if the returned result is expected to be JSON or XML.
_workspace/src/github.com/subosito/twilio
Package twilio provides support for interacting with Twilio REST API
Package twilio provides support for interacting with Twilio REST API
_workspace/src/github.com/subosito/underscore
package underscore provides simple but useful utilities for Go development
package underscore provides simple but useful utilities for Go development

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址