Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/titanous/twilio-forwarder
Tiny app to forward phone calls, record voicemail, bridge SMS to email
https://github.com/titanous/twilio-forwarder
Last synced: 2 months ago
JSON representation
Tiny app to forward phone calls, record voicemail, bridge SMS to email
- Host: GitHub
- URL: https://github.com/titanous/twilio-forwarder
- Owner: titanous
- License: bsd-3-clause
- Created: 2014-02-24T02:52:18.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-02-25T20:35:36.000Z (almost 11 years ago)
- Last Synced: 2024-12-01T19:36:55.517Z (2 months ago)
- Language: Go
- Homepage:
- Size: 176 KB
- Stars: 20
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-twilio-golang - titanous/twilio-forwarder
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](https://www.twilio.com/) account and
free [Mailgun](http://www.mailgun.com/) account to get up and running.It runs on Heroku with the [Go
buildpack](https://github.com/kr/heroku-buildpack-go).## 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. | `[email protected]`
`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!