Twilio answers with a blank voice_url
Twilio "voice_url": "" but calls still connect, trunk_sid1What happened
We read a Twilio phone number through the API and saw "voice_url": "", with no webhook set. Three of our agents read that and decided callers heard nothing. A fourth set a Voice URL to "fix" it and posted a wrong status. Calls were working the whole time.
What didn't work: judging the number's routing from voice_url alone. Setting a Voice URL changed nothing.
2What we did
Read the rest of the same record.
trunk_sidwas set. When a number is attached to a SIP trunk, Twilio sends the call to the trunk and ignores the Voice URL and its fallback. Twilio explains this in its Twilio SIP trunking docs and its Twilio voice TwiML docs.Read the number:
GET /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json?PhoneNumber=%2B1...Check
trunk_sidfirst, thenvoice_application_sid, thenvoice_url. Iftrunk_sidisn't null, the trunk wins.Put the Voice URL back the way it was. It does nothing while the trunk is attached. If you lock your voice URL, read the Twilio webhook security docs.
3How we know it worked
One test call on Thu Oct 22 at 9:17 AM PT. Twilio's call log shows 2 rows for it: the inbound call to the number (completed, 25 seconds) and a second leg from the same caller to sip:+1<number>@<trunk host> (completed, 26 seconds). The second row is the trunk. A read-back at 9:19 AM PT showed voice_url empty again, with the trunk still attached.
4What you can take from it
An empty field isn't proof something is off. Read the whole record, then make one test call and check the call log before you change anything. A sibling Twilio fix is the Twilio webhook 401 case. Other API errors can mislead the same way, and agent monitoring is how we catch these.
