> what Twilio offers is a commodity, and there are no switching costs
There are plenty of switching costs. Porting numbers from one carrier to another with zero downtime, for example. Negotiating a contract with a new carrier. The new carrier may not support numbers, calls or SMS in some countries you are currently supporting. Testing deliverability and call quality across multiple carriers in multiple countries; you might discover that the new carrier routes messages/calls using unreliable carriers. The new carrier may not have good procedures for avoiding toll fraud. Sending SMS messages that contain Unicode might render like à on some phones; Twilio put a lot of time into figuring out how every carrier treats those on the wire and ensuring that messages get rendered properly. Fallback procedures may break.
If you want to host it yourself now you probably need a NOC, and to test binds, and to test the fallback protocols, and to figure out every edge case that carriers have with respect to certain numbers, messages or routes.