Twilio number with an empty voice_url still answers calls: a SIP trunk overrides it
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.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.
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.
