I'm trying to initiate calls on my mobile app (Inbound call ) through my node server. I have set up all credentials in the env file and cross-checked them many times. I'm doing so using the Twiml. I'm sending the below the Twiml response to Twilio but the call just keeps routing back to the Webhook URL. How can I route the call on the device if this is not the right way to do it.
Twiml Response :
<Response>
<Dial>
<Number>+12528881526</Number>
</Dial>
</Response>
My Node.js code
let twimlResponse = new VoiceResponse()
const dial = twimlResponse.dial()
dial.number({}, "+1234567891")
console.log(twimlResponse.toString())
return response.send(twimlResponse.toString())
Solution: We need to initiate calls using the identity and Twilio will start sending VoIP notifications
let twimlResponse = new VoiceResponse()
const dial = twimlResponse.dial()
dial.client({}, "alice")
console.log(twimlResponse.toString())
return response.send(twimlResponse.toString())