-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add answer to TROPO JSON helper library with support for RPID parameters - WebAPI Python
- Loading branch information
1 parent
b1bcf22
commit 595fd39
Showing
2 changed files
with
50 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,19 @@ | ||
import sys | ||
sys.path = ['..'] + sys.path | ||
from itty import * | ||
from tropo import Tropo | ||
|
||
|
||
@post('/index.json') | ||
def index(request): | ||
t = Tropo() | ||
t.answer(headers={"P-Header":"value goes here","Remote-Party-ID":"\"John Doe\"<sip:jdoe@foo.com>;party=calling;id-type=subscriber;privacy=full;screen=yes"}) | ||
t.say('This is your mother. Did you brush your teeth today?') | ||
json = t.RenderJson() | ||
print json | ||
return json | ||
|
||
|
||
run_itty(server='wsgiref', host='192.168.26.1', port=8888) | ||
|
||
|
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