---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/13251#article
headline: "13251: Dial: Too many headers passed"
url: https://www.twilio.com/docs/api/errors/13251
inLanguage: en
dateModified: 2026-06-09T11:00:42.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 13251: Dial: Too many headers passed

Log Level: WARNING

## Description

This warning occurs when your `<Dial><Sip>` request or SIP `To` URI includes more header elements than Twilio accepts. Send SIP headers by appending them to the SIP URI. Keep the SIP URI under 255 characters and the headers portion under 1024 characters.

### Possible causes

* Your `<Sip>` noun or SIP `To` parameter includes too many query-style header pairs after the `?` in the SIP URI.
* Your application adds duplicate or unnecessary custom headers when it builds the SIP URI. Twilio accepts custom SIP headers when you append them to the URI, so extra generated parameters can push the request past the allowed limit.
* A header value contains `&` that was not encoded, so Twilio interprets it as additional header elements. For some SDKs, encode `&` as `%26`.

### Possible solutions

* Remove unneeded headers from the SIP URI and send only the headers your SIP endpoint requires.
* Consolidate related values into fewer headers when possible so your request stays within Twilio's accepted limits. Keep the SIP URI under 255 characters and the headers portion under 1024 characters.
* Use the `x-` prefix for custom headers. If you need supported non-`x-` headers, use only `User-to-User`, `Remote-Party-ID`, `P-Preferred-Identity`, or `P-Called-Party-ID`.
* If a header value includes `&`, encode it as `%26` so Twilio does not parse it as another header element.

#### Additional resources

* [TwiML Voice: `<Sip>`](/docs/voice/twiml/sip)
* [Making SIP Calls](/docs/voice/api/sip-making-calls)
* [TwiML Voice: `<Dial>`](/docs/voice/twiml/dial)
