We will explain how, rather than purchasing a phone number for your Telephony Bot App from Voicegain, you can use your Twilio phone number and point it to a Telephony Bot App's SIP address.
Get the SIP address for your Telephony Bot App
This can be found by clicking the Edit icon on the Telephony Bot App which will bring this dialog from which you can copy the SIP address
Configure Twilio TwiML Bin
Now we need to prepare a Twilio TwiML Bin that will contain the instructions to do a SIP INVITE to the Voicegain Telephony Bot App. The TwiML code is very simple. Note, it is important to use `transport=tcp` option as Voicegain Telephony Bot Apps do not support UDP for SIP negotiations. If you want you can pass custom SIP headers to your Telephony Bot App.
This example has <Say> before and after <Dial><Sip> command, but that is not necessary. It is useful for initial debugging, just to verify that the correct TwiML is executed, but can be removed after testing.
Getting Twilio Phone number
If you do not already have a Twilio phone number available you will need to purchase it.
Tie TwiML Bin to the phone number
This is the last step after which you will be able to make a call using that Twilio number via SIP INVITE to the Telephony Bot App. You will be presented with this option right after you purchase the new number. But you can also set the TwiML Bin for an existing number.