Post Transfer Action

I would like to send a push notification (with call properties like callerID and duration) after a Transferred call is complete.  I have tried several "on" events, but I am not getting any calls to my WebAPI python script.

Python code:

from itty import *
from tropo import Tropo

def index(request):
    t = Tropo()
    t.on(event="hangup", next="/callcomplete.json")
    return t.RenderJson()

# this is never called
def callcomplete(result):
    print 'call complete'
    # send push notification

run_itty(server='wsgiref', host='', port=8888)


Please sign in to leave a comment.