1

I can see that for all the voice interactions, behind the scenes flex is using its voice API to create a conference between caller and worker. How do I obtain the created ConferenceSid after the task has been selected and reserved?

What I would like to do is simply Get the value upon connecting.

I can see a very long and not so pretty way of getting it, which is by running a twilio function that iterates over every conference, making additional requests to see the participants. But that seems way to complex to me. I can see in the logs that the conference friendly is being printed

ConferencesState handleConferenceUpdate WT5d0800a3ce8724fd55cf89841c48XXX

Is there anyone who can help here?

UPDATE: @philnash below answered the question exactly.

Judy007
  • 5,484
  • 4
  • 46
  • 68

1 Answers1

2

Twilio developer evangelist here.

There seems like a couple of ways to get hold of the Conference SID in a Flex interaction.

First, the task that your worker accepts has a number of attributes that are set by Flex and relevant for the type of task it is. For a voice call, you will find a conference key, which has an object including the sid as well as entries for the participants.

Secondly, I found that the <TaskCanvas> component in the UI is passed a context that includes a conference object. That object then has a source property which expands to an object with a conferenceSid property, as well as other properties, including a participants list.

Does that point you in the right direction?

philnash
  • 70,667
  • 10
  • 60
  • 88