Migrating from Bandwidth to Twilio requires porting phone numbers from Bandwidth's carrier network to Twilio, replacing Bandwidth API calls with Twilio REST API equivalents, updating webhook responses from Bandwidth BXML to Twilio TwiML, and registering A2P 10DLC campaigns on Twilio before ported US numbers can send SMS. Businesses migrate from Bandwidth to Twilio for access to Twilio's broader product ecosystem including Twilio Flex, Verify, Conversations, and Video, for Twilio's more extensive global SMS coverage beyond Bandwidth's North America focus, and for Twilio's pay-as-you-go pricing model that benefits lower-volume customers compared to Bandwidth's minimum commitment structure. The migration is notable because Bandwidth is itself a Tier 1 carrier, meaning number ports from Bandwidth to Twilio are true inter-carrier ports that may take longer than ports from aggregator-based carriers.
What You Need Before You Start
Create a Twilio account and complete business verification, noting that because Bandwidth is a direct carrier your LOA must include your Bandwidth account number, which is found in the Bandwidth Dashboard under Account, then Account Overview, as Twilio submits the LOA directly to Bandwidth for inter-carrier porting approval. Export your Bandwidth number inventory from the Bandwidth Dashboard at dashboard.bandwidth.com by navigating to Numbers, then My Numbers, selecting all numbers, and exporting to CSV, recording each number's full E.164 format, the Bandwidth sub-account it belongs to, and any configured voice application ID or messaging application ID. Complete Twilio A2P 10DLC Brand registration before initiating any US number ports by navigating to the Twilio Console under Messaging, then Regulatory Compliance, then US A2P 10DLC, as US 10DLC numbers ported to Twilio cannot send SMS until a campaign is registered and the brand status shows Approved. Audit your Bandwidth API integration by searching your codebase for bandwidth-sdk or @bandwidth/numbers and documenting each API call including voice call initiation with bandwidth.ApiController.createCall, outbound SMS with bandwidth.ApiController.createMessage, and inbound webhook handling so you have a complete inventory of changes needed.
Step-by-Step Integration Guide
Submit a Twilio number port request for Bandwidth numbers by navigating to Phone Numbers, then Port and Host in the Twilio Console, entering each number to port, uploading your LOA with Bandwidth account number included, and expecting a processing time of 5 to 10 business days for US local numbers ported from Bandwidth as a Tier 1 carrier, with the port typically completing between 21:00 and 23:00 local time on the completion date to minimize customer impact. Replace Bandwidth outbound SMS API calls in Node.js from new MessagesApi(bandwidthClient).createMessage(accountId, { applicationId: appId, to: [toNumber], from: fromNumber, text: body }) to Twilio's equivalent: client.messages.create({ to: toNumber, from: fromNumber, body: body }) using the twilio npm package initialized with your Twilio Account SID and Auth Token. Replace Bandwidth inbound voice webhooks by converting BXML responses to TwiML: replace Bandwidth's SpeakSentence BXML tag with Twilio's Say TwiML verb, replace Bandwidth's Gather BXML tag with Twilio's Gather verb with the action attribute pointing to your digit handler, and replace Bandwidth's Transfer BXML tag with Twilio's Dial verb containing a Number noun, updating response Content-Type to text/xml. Update inbound SMS webhook field parsing by replacing Bandwidth's webhook field names message.from, message.to[0], and message.text with Twilio's From, To, and Body top-level POST parameters, and replacing Bandwidth's event validation using your Bandwidth username and password with Twilio's HMAC-SHA256 signature validation using twilio.validateRequest.
Common Issues and How to Fix Them
Bandwidth as a Tier 1 carrier has a strict LOA rejection policy where the business name on the LOA must match the legal entity name registered with Bandwidth down to punctuation and abbreviation style, and discrepancies such as Inc. versus Incorporated or missing comma in the legal entity name cause the port to be rejected and require a new LOA submission that extends the timeline by 5 to 10 days. Request your exact account name from Bandwidth support by emailing porting@bandwidth.com before preparing the LOA, copy the name exactly as provided including punctuation, and have the same authorized signatory sign the LOA as appears on the original Bandwidth service agreement. Bandwidth toll-free numbers use a different porting process than local numbers and must be ported through the US Toll-Free Number Administration, requiring a separate LOA and a longer 10 to 15 business day porting window with Twilio submitting the request to the toll-free number admin rather than directly to Bandwidth. Separate toll-free numbers from local numbers in your port order submission and note the extended timeline in your migration schedule, beginning toll-free ports earlier than local number ports to ensure both complete around the same time. Bandwidth BXML voice applications reference media files using the mediaUrl attribute in BXML audio tags, while Twilio's TwiML Play verb requires a publicly accessible HTTPS URL for audio files, and any media files previously hosted on Bandwidth's media storage service must be migrated to your own CDN or a public storage bucket before the voice webhook cutover. Move all BXML-referenced audio files to a publicly accessible S3 bucket or CDN before porting voice numbers, update your TwiML Play verb URLs to the new storage locations, and test each voice application using Twilio's TwiML Bins to verify audio playback before the porting window.
How to Get More from This Integration
Build a migration validation dashboard by instrumenting both your Bandwidth and Twilio API calls with the same structured logging format, writing message SID, from number, to number, body length, timestamp, and delivery status to a shared database table keyed by a canonical message ID, and running a comparison report after 48 hours of parallel traffic to verify that Twilio's delivery rate meets or exceeds Bandwidth's for each destination country in your customer base. Add Twilio Messaging Services after completing the migration to replace the fixed Bandwidth application ID routing with dynamic Twilio sender selection, creating a Messaging Service in the Twilio Console, adding all ported numbers as senders, and replacing your application's hardcoded from number with a single MessagingServiceSid that Twilio routes intelligently based on destination geography and number health. Implement Twilio Traffic Optimization after migration by enabling Sticky Sender on your Messaging Service in the Twilio Console, which routes each customer's outbound messages through the same From number for the life of the relationship, maintaining number consistency that Bandwidth's application-based routing provided and improving reply threading for two-way SMS conversations. Extend the migration to include Twilio Voice Intelligence by adding the intelligence feature to your Twilio voice application using addIntelligenceService in the VoiceIntelligenceService API, enabling automated call transcription and sentiment analysis on ported numbers that Bandwidth's voice platform did not natively provide.
Conclusion
Migrating from Bandwidth to Twilio is a structured inter-carrier port process that requires careful LOA preparation and a parallel validation period to ensure zero-downtime cutover for voice and SMS traffic. Get in touch with Telphi Consulting to manage your Bandwidth to Twilio migration from LOA preparation through production cutover.
Ready to Transform Your Business Communications?
Get a free consultation with our VoIP experts and discover how we can help you save costs, improve efficiency, and scale your business.
Comments (0)
Join the discussion and share your thoughts (AI-moderated for quality)
Be the first to comment
No comments yet. Share your thoughts below.