How to get caller details like (callsid, from , to ) in my Chatbot integration with twilio voice

Hi team,

I have integrated twilio voice channel in my bot.
I want to access caller details like(callsid, from , to) when i call to twilio number.

It is mentioned in twilio website when twilio request our webhook URL it sends all these parameters but my question is that how can i access that information.
Please tell me the steps.

Find the attached screen shots for more information.


1 Like

Very slow response from your side.Any update on this?

Continuing the discussion from How to get caller details like (callsid, from , to ) in my Chatbot integration with twilio voice.:

Hi Gaurav,
Hope you are doing good!

I just wanted to check if you were able to find the way to get caller details like (callsid, from , to ) from twilio’s API. If yes, could you please let me know of the steps.

Really appreciate any input with this.

Thanks!

@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
}
}
}

Hi,

I’m Using SmartAssist and for some reason I cannot find the phone number in context.session.BotUserSession.lastMessage

Please see attached JSON:

image

@moishe
Thanks for reaching out. Would you mind creating a new topic under SmartAssist? It will help us track better.

@swagata.sengupta

I created a new Topic with the above question under Smart Assist (It’s still pending)

Thank You

i am not able to get caller dialed number