0

how to manage calls via rest API

I'm trying to get the following scenario to work:

1.  Caller dials tropo number

2.  Use Say and Ask to gather information 

3.  Use Say to play music until a conference is ready to begin (this is determined in another thread)

4.  When instructed, join this call to other similar caller legs into a single conference call.

I can get 1-3 working using the outdated tropo-webapi-python..  The music plays... but I cannot figure out how, from within the python API,  to get the current call "ID" such that I can then make a request to join ID's together.

Since the python api seems so dated,  I tried this using the rest API..  While steps 1-3 are running,  I execute this command:

curl https://api.tropo.com/1.0/sessions?token=my_token

and get something back in XML as an ID.  I was hoping to then use this to control my call with something like this:

curl "https://api.tropo.com/v1/sessions/ID_provided_above/signals?action=signal&value=exit"

but this does nothing to the call.

Perhap it's not "session" I should be using?

This is just the beginning of my troubles porting an app from plivo / twilio to include tropo support.   The Node api seems more well developed.  Has anyone built a conferencing or IVR app that is not "tropo hosted"?   I can't find any good examples in github... BTW, this is not "outbound conferencing" but inbound.

Graham

0 comments

Please sign in to leave a comment.