Issue
When using Twilio Elastic SIP Trunking for inbound origination, some customers may encounter issues where proprietary SIP headers (commonly known as X-Headers) are present in the SIP INVITE sent to their Origination URI. These additional headers can increase the size of the SIP INVITE, potentially causing the packet to exceed the path Maximum Transmission Unit (MTU) and resulting in fragmentation, especially when using UDP transport.
Common Scenario
A customer receives inbound SIP INVITEs from Twilio containing proprietary headers such as:
- X-SC-HOST
- X-SUB-ADX
- X-HOP-CNT
- X-CHARGE-NUM
- X-ORIG-CGPN
- X-CORP-ID
- X-ORIG-CDPN
These headers, when combined, may cause the SIP INVITE to exceed the GRE path MTU, leading to UDP fragmentation and possible issues with downstream equipment or network paths.
Can Twilio Strip or Suppress Proprietary X-Headers?
No, Twilio Elastic SIP Trunking does not currently support stripping or suppressing arbitrary proprietary SIP headers (X-Headers) on inbound origination calls.
The SIP Header Manipulation feature in Twilio Elastic SIP Trunking is limited to modifying specific user fields (such as values within the To, From, and Diversion headers). It cannot be used to remove or suppress custom X-Headers.
Product
Elastic SIP Trunking
Environment
Twilio Console
Resolution
If you are experiencing issues due to large SIP INVITEs caused by extra headers, consider the following options:
1. Use TCP or TLS for SIP Signaling
- Why: TCP and TLS transports do not have the same packet size limitations as UDP and can handle larger SIP messages without fragmentation.
- How: Configure your SIP infrastructure and Twilio trunk to use TCP or TLS instead of UDP for SIP signaling.
2. Upstream Header Suppression
- Why: If the proprietary headers are being added by an upstream carrier before reaching Twilio, you may be able to request that they suppress or remove these headers.
- How: Contact your upstream provider and ask if they can reduce or eliminate unnecessary X-Headers before the call reaches Twilio.
3. Routing Adjustments
- Note: Twilio does not provide customer-configurable options to route DIDs to different inbound carriers or paths specifically to avoid header issues. However, if you believe a routing-specific issue exists, you can provide detailed SIP traces to Twilio Support for further review.
Additional Information
- If you have sample SIP traces illustrating the fragmentation or header issue, sharing them with Twilio Support can help with further investigation.
- Always ensure your network and equipment are configured to handle the expected SIP message sizes, especially when using UDP.
Below you will find references to useful documents:
- Twilio Elastic SIP Trunking Documentation
- SIP Header Manipulation Guide
- Transport Protocols in SIP Trunking
Summary Table
| Issue | Twilio Support? | Workaround/Recommendation |
|---|---|---|
| Strip/suppress X-Headers | No | Use TCP/TLS, request upstream suppression |
| Modify To/From/Diversion fields | Yes | Use SIP Header Manipulation |
| Route DIDs to different carrier | Not customer-configurable | Contact Support for review |