I played around a lot now and still can't figure out if there is a way of starting a conference via the API.
What do I want to achieve: I would like to set up a conference, keep all participants still listening to music and than start that conference on a button press.
After reading the documentation about the conference API, I saw you can update the conference object status: https://www.twilio.com/docs/voice/api/conference-resource?code-sample=code-update-a-conference-to-end-it&code-language=Ruby&code-sdk-version=5.x
The update to end the conference works fine (the example):
conference = @client.conferences('CFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.update(status: 'completed')
But as soon as I try to use .update(status: 'in-progress')
to start the conference i get:
in-progress is not a valid choice
https://www.twilio.com/docs/errors/20001
The documentation sounds like you are able to do it:
The new status of the resource. Can be: Can be: init, in-progress, or completed. Specifying completed will end the conference and hang up all participants
Do I miss something?
Yes there are more than 2 calls connected, both of them with 'startConferenceOnEnter' set to false.