forked from torrez/callme
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 98ef842
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
import argparse | ||
from twilio.rest import TwilioRestClient | ||
from twilio.rest.resources import Conferences | ||
import settings | ||
|
||
|
||
client = TwilioRestClient(settings.API_KEY, settings.API_TOK) | ||
|
||
parser = argparse.ArgumentParser(description='Call some people for a conference. Be sure you’ve set up your Twilio dealio.') | ||
parser.add_argument('numbers', metavar='N', type=str, nargs='+', | ||
help='Phone numbers to call into a conference.') | ||
|
||
args = parser.parse_args() | ||
numbers = vars(args)['numbers'] | ||
|
||
for number in numbers: | ||
call = client.calls.create(to=number, | ||
from_=settings.FROM_NUMBER, | ||
url=settings.CONFERENCE_URL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
API_KEY = "" #FROM TWILIO | ||
API_TOK = "" #FROM TWILIO | ||
FROM_NUMBER = "+12125551212" #Your Twilio number | ||
CONFERENCE_URL = "http://torrez.org/conference" | ||
#put a URL here that will respond to a POST with: | ||
# | ||
# <?xml version="1.0" encoding="UTF-8"?> | ||
# <Response> | ||
# <Say>Joining a conference room</Say> | ||
# <Dial> | ||
# <Conference>My Room</Conference> | ||
# </Dial> | ||
# </Response> | ||
# | ||
# Feel free to use my URL for as long as | ||
# I can remember not to delete it. | ||
# |