I am trying to make a call to zoom phone's shared line group using Twilio. I've also set a TwiML so that a message is played when the call is picked up. My code is written as below in Go.
func main() {
// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
client := twilio.NewRestClient()
params := &api.CreateCallParams{}
params.SetTwiml("<Response><Say>My auto-generated message goes here</Say></Response>")
params.SetTo("${my_zoom_phone_number}")
params.SetFrom("${my_twilio_phone_number}")
_, err := client.Api.CreateCall(params)
if err != nil {
fmt.Println(err.Error())
}
}
When I make a call using the above implementation, the message starts playing when the zoom phone starts to ring, so by the time I answer the phone, it would be halfway through the message. When I tried the same implementation but changed it so it would call my personal iPhone, the message started playing once I picked up the call, which is what I expect to happen for when I call my zoom phone account.
I've also tried to check what the call status is for when I call my iPhone vs when I call my zoom phone and here is what I got.
The first try is when I called my iPhone, and since I waited a few seconds before picking up the phone, the time between ringing
and in_progress
seems reasonable. The second try is when I called my zoom phone, and the status immediately changed from ringing
to in_progress
even though the phone is still ringing.
Does anyone have an idea as to why this is happening, and how to fix this?