tropo / tropo-webapi-python

A set of Python classes for working with the Tropo WebAPI
MIT License
85 stars 33 forks source link

Headers parameter missing for transfer() #19

Closed kevinbond closed 13 years ago

kevinbond commented 13 years ago

Unable to change headers using WebAPI. The parameter does not exist as shown below:

{ "transfer": {
        "to": String or Array,#Required
        "answerOnMedia": Boolean,
        "choices": Object,
        "from": String,
        "name": String,
        "required": Boolean,
        "terminator": String,
        "timeout": Float } }

I will be utilizing this feature as follows:

from itty import *
from tropo import Tropo, Session

@post('/PythonReverseSipT.json')

def index(request):

  s = Session(request.body)
  t = Tropo()

  t.say("Hello. , , , Transferring")
  t.transfer(to="sip:9991489767@sip.tropo.com", headers={"x-callername":"Kevin Bond"})

  return t.RenderJson()

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

Thank you!

egilchri commented 13 years ago

I believe I have fixed this. The example is in samples/gh-22.transfer.py.