@viswanathan @gourav.madan
It seems somehow this post was missed.
For all the channels, usually whatever Kore.ai platform gets is present in
context.session.BotUserSession.lastMessage
Please note that while accessing the values you should always do null-checks
This is an example of what we typically get when we do (Output (Some values are deliberately obfuscated))
print(JSON.stringify(context.session.BotUserSession.lastMessage));.
{
“channel”:“twiliovoice”,
“messagePayload”:{
“AccountSid”:“ACceaXXXXXXXXXXXXXXXXXXeeff27”,
“ApiVersion”:“2010-04-01”,
“ApplicationSid”:“APcaXXXXXXXXXXXXX38ff5369”,
“CallSid”:“ca6acXXXXXXXXXXX66a562e45”,
“CallStatus”:“in-progress”,
“Called”:"+150XXXX2782",
“CalledCity”:“CXXXXN”,
“CalledCountry”:“US”,
“CalledState”:“NM”,
“CalledZip”:“XXXXX”,
“Caller”:"+26XXXX87",
“CallerCity”:"",
“CallerCountry”:“LS”,
“CallerState”:"",
“CallerZip”:"",
“Confidence”:“0.98762906”,
“Direction”:“inbound”,
“From”:“ca6acfXXXXXXXXXXXX66a562e45”,
“FromCity”:"",
“FromCountry”:“LS”,
“FromState”:"",
“FromZip”:"",
“Language”:“en-US”,
“SpeechResult”:“salary”,
“To”:"+150XXXX2782",
“ToCity”:“CXXXXN”,
“ToCountry”:“US”,
“ToState”:“NM”,
“ToZip”:“88415”,
“fromPhoneNumber”:“26XXXX687”,
“requestId”:“tcbr-caXXXXXXXXXXXXXXXXXXXXX6a562e45”,
“trace”:{
“id”:“TWILIO-VOICE-TRACE-XXXXXXXXX”,
“idPrefix”:“TWILIO-VOICE-TRACE”,
“isNew”:true,
“useRemoting”:true
}
}
}