you cannot directly connect the device to Twilio, as they do not support device registration. So as it would work, is that you would need to connect your device to some or other sip registration server. There is an example that I know of using FreeSwitch, perhaps you can get a few ideas from it.
https://www.twilio.com/blog/2013/03/trying-out-the-twilio-sip-noun-using-freeswitch.html
you cannot directly connect the device to Twilio, as they do not support device registration. So as it would work, is that you would need to connect your device to some or other sip registration server. There is an example that I know of using FreeSwitch, perhaps you can get a few ideas from it. https://www.twilio.com/blog/2013/03/trying-out-the-twilio-sip-noun-using-freeswitch.html