Fetch the Initial Text of Any SMS or Instant Message on Tropo
Another of the multi-modal features we added to Tropo, is the ability to capture the first text a user send via SMS or Instant Message. Previously, when a user would send a message to an SMS/IM application you had written, you had no way to capture that first message. Instead you would have to send a prompt/ask back to the user to start receiving input, having lost that first message.
With the new release, this is no longer the case. With the hosted API, the initial text message is stored in the call object available at the start of your script. You may obtain the initial text string as follows (depending on the language):
$currentCall.initialText # or currentCall.initialTextIf you are using the new Tropo Web API, then you may find the ‘initialText’ value in the session JSON string you first receive with each new session, as follows:
{ "session": { "initialText": "Hello, I would like to ask you about your app." } }Enjoy.
Originally from Voxeo Blogs

Leave a Reply