creating a new stream for another call

75 Views Asked by At

I am using twilio's connect().stream() for bidirectional synchronous stream. Now at a certain point i want to call another number for that i need a new stream so that conversations wont get mixed. But as that is indirectly getting executed inside media event(socket) , new stream is not getting generated.

I did research and its telling me to use . But to add participant , its asking for conferenceSid. But i dont know how can i get the conferenceSid.

i just cant get where i am going wrong?

const conference = twiml.dial().conference('MyConference', { startConferenceOnEnter: true, endConferenceOnExit: true, }); console.log('conference: ', conference, "conference SID::", conference?.sid); this.client.conferences.list({ friendlyName: 'MyConference', limit: 20 }) .then(conferences => conferences.forEach(c => console.log(c.sid)));

did this for getting conferenceSid , but got nothing

0

There are 0 best solutions below