Reputation: 48
I'm following a tutorial on Twilio TaskRouter. I have successfully set up a workspace, workflows, activities, taskqueues and workers. Currently i am looking at this documentation at step 3:
When my twilio number recieves an inbound call, my server returns a enqueue instruction. When a worker is reserved for my newly created task, my AssignmentCallback endpoint is hit.
My question is: How to i retrieve the phone number of the caller in my callback?
Thank you in advance!
Upvotes: 0
Views: 184
Reputation: 1293
TaskRouter engineer here.
In the sections below this in the documentation referenced you should see "Attaching data to a call using Tasks". For reference, any data you plop in here will end up in the Task's attributes
, which you can then inspect in your callback.
However, it's actually even easier than that, as the caller ID should already be there for you. Have a look at this documentation, which shows you the attributes
that will be populated for you simply by using the <Enqueue>
. In this case, I believe what you're after is from
.
Upvotes: 3