Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

SIP INVITEs


A SIP INVITE is a SIP request message that initiates a SIP call.

A SIP INVITE is made up of lines of text. The first line in an INVITE is called a Request-Line, which is followed by more lines of text called "headers". The headers contain information about the INVITE, such as the identity of the caller, whether the INVITE was forwarded before being sent to the recipient, and the number of times a call may be forwarded.


Table of Contents

table-of-contents page anchor

Below is an example of a SIP INVITE request message, which includes some commonly-used SIP INVITE headers.


_11
INVITE sip:+14155552222@example.pstn.twilio.com SIP/2.0
_11
Via: SIP/2.0/UDP 192.168.10.10:5060;branch=z9hG4bK776asdhds
_11
Max-Forwards: 70
_11
To: "Bob" <sip:+14155552222@example.pstn.twilio.com>
_11
From: "Alice" <sip:+14155551111@example.pstn.twilio.com>;tag=1
_11
Call-ID: a84b4c76e66710
_11
CSeq: 1 INVITE
_11
Contact: "Alice" <sip:+14155551111@192.168.10.10:5060>
_11
Diversion: "Sales" <sip:+14155550000@example.pstn.twilio.com>
_11
P-Asserted-Identity: "Alice" <sip:+14155551111@example.pstn.twilio.com>
_11
Content-Length: 0


In the INVITE above, you can see several examples of what are called SIP URIs that look like email addresses. A SIP URI identifies a users' contact information by indicating a specific user at a specific host/domain. A SIP URI could be an identifier for a specific person, a voice mailbox, a group within an organization (like "sales" or "marketing"), etc.


_10
sip:+14155552222@example.pstn.twilio.com

The parts of a SIP URI are described below.

SIP User

sip-user page anchor

The user is a phone number, word, or username that sits between the sip: and the @ in a SIP URI.

  • sip: +14155552222 @example.pstn.twilio.com
  • sip: sales @example.pstn.twilio.com
  • sip: maria.hernandez @example.pstn.twilio.com

The host or domain follows the @ in a SIP URI and can be a domain or IP address.

  • sip:+14155552222@ example.pstn.twilio.com
  • sip:+14155552222@ 192.168.10.10

A SIP URI can also contain a port number. It is written after a : following the host. If no port is included in the SIP URI, the default SIP port 5060 is used.


A SIP INVITE is a type of SIP request. The first line in any SIP request is called the Request-Line.


_11
INVITE sip:+14155552222@example.pstn.twilio.com SIP/2.0
_11
Via: SIP/2.0/UDP 192.168.10.10:5060;branch=z9hG4bK776asdhds
_11
Max-Forwards: 70
_11
To: "Bob" <sip:+14155552222@example.pstn.twilio.com>
_11
From: "Alice" <sip:+14155551111@example.pstn.twilio.com>;tag=1
_11
Call-ID: a84b4c76e66710
_11
CSeq: 1 INVITE
_11
Contact: "Alice" <sip:+14155551111@192.168.10.10:5060>
_11
Diversion: "Sales" <sip:+14155550000@example.pstn.twilio.com>
_11
P-Asserted-Identity: "Alice" <sip:+14155551111@example.pstn.twilio.com>
_11
Content-Length: 0

The Request-Line contains three parts:


The Request-URI is the contact information for the recipient of the SIP INVITE. It is found within the Request-Line of the INVITE.

  • The Request-URI : INVITE sip:+14155552222@example.pstn.twilio.com SIP/2.0
  • The Request-URI User : INVITE sip: +14155552222 @example.pstn.twilio.com SIP/2.0
  • The Request-URI Host : INVITE sip:+14155552222@ example.pstn.twilio.com SIP/2.0

Common SIP INVITE Headers

common-sip-invite-headers page anchor

SIP headers contain information about the SIP message.

3

_11
INVITE sip:+14155552222@example.pstn.twilio.com SIP/2.0
_11
Via: SIP/2.0/UDP 192.168.10.10:5060;branch=z9hG4bK776asdhds
_11
Max-Forwards: 70
_11
To: "Bob" <sip:+14155552222@example.pstn.twilio.com>
_11
From: "Alice" <sip:+14155551111@example.pstn.twilio.com>;tag=1
_11
Call-ID: a84b4c76e66710
_11
CSeq: 1 INVITE
_11
Contact: "Alice" <sip:+14155551111@192.168.10.10:5060>
_11
Diversion: "Sales" <sip:+14155550000@example.pstn.twilio.com>
_11
P-Asserted-Identity: "Alice" <sip:+14155551111@example.pstn.twilio.com>
_11
Content-Length: 0

The SIP headers in a SIP request follow the Request-Line.

A SIP header has a name and a value. The header name is before the colon (:), the header value is what follows the colon. For the header on line 7 above, the header would be called the "CSeq header", and value of the CSeq header is 1 INVITE.



_11
INVITE sip:+14155552222@example.pstn.twilio.com SIP/2.0
_11
Via: SIP/2.0/UDP 192.168.10.10:5060;branch=z9hG4bK776asdhds
_11
Max-Forwards: 70
_11
To: "Bob" <sip:+14155552222@example.pstn.twilio.com>
_11
From: "Alice" <sip:+14155551111@example.pstn.twilio.com>;tag=1
_11
Call-ID: a84b4c76e66710
_11
CSeq: 1 INVITE
_11
Contact: "Alice" <sip:+14155551111@192.168.10.10:5060>
_11
Diversion: "Sales" <sip:+14155550000@example.pstn.twilio.com>
_11
P-Asserted-Identity: "Alice" <sip:+14155551111@example.pstn.twilio.com>
_11
Content-Length: 0

This header field describes the transport used for the transaction (SIP/2.0/UDP) and identifies where responses should be sent (to 192.168.10.10 on port 5060). The branch parameter is a unique value used to identify the transaction that is created by the SIP request.



_11
INVITE sip:+14155552222@example.pstn.twilio.com SIP/2.0
_11
Via: SIP/2.0/UDP 192.168.10.10:5060;branch=z9hG4bK776asdhds
_11
Max-Forwards: 70
_11
To: "Bob" <sip:+14155552222@example.pstn.twilio.com>
_11
From: "Alice" <sip:+14155551111@example.pstn.twilio.com>;tag=1
_11
Call-ID: a84b4c76e66710
_11
CSeq: 1 INVITE
_11
Contact: "Alice" <sip:+14155551111@192.168.10.10:5060>
_11
Diversion: "Sales" <sip:+14155550000@example.pstn.twilio.com>
_11
P-Asserted-Identity: "Alice" <sip:+14155551111@example.pstn.twilio.com>
_11
Content-Length: 0

This header limits the number of hops a request can make on the way to its destination. The value is an integer that decreases by one at each hop. If the value of the Max-Forwards header reaches 0 before the SIP request reaches its destination, the request will be rejected with a 483 error (Too Many Hops).



_11
INVITE sip:+14155552222@example.pstn.twilio.com SIP/2.0
_11
Via: SIP/2.0/UDP 192.168.10.10:5060;branch=z9hG4bK776asdhds
_11
Max-Forwards: 70
_11
To: "Bob" <sip:+14155552222@example.pstn.twilio.com>
_11
From: "Alice" <sip:+14155551111@example.pstn.twilio.com>;tag=1
_11
Call-ID: a84b4c76e66710
_11
CSeq: 1 INVITE
_11
Contact: "Alice" <sip:+14155551111@192.168.10.10:5060>
_11
Diversion: "Sales" <sip:+14155550000@example.pstn.twilio.com>
_11
P-Asserted-Identity: "Alice" <sip:+14155551111@example.pstn.twilio.com>
_11
Content-Length: 0

The To header contains the contact information for the called party (the recipient of the SIP INVITE).



_11
INVITE sip:+14155552222@example.pstn.twilio.com SIP/2.0
_11
Via: SIP/2.0/UDP 192.168.10.10:5060;branch=z9hG4bK776asdhds
_11
Max-Forwards: 70
_11
To: "Bob" <sip:+14155552222@example.pstn.twilio.com>
_11
From: "Alice" <sip:+14155551111@example.pstn.twilio.com>;tag=1
_11
Call-ID: a84b4c76e66710
_11
CSeq: 1 INVITE
_11
Contact: "Alice" <sip:+14155551111@192.168.10.10:5060>
_11
Diversion: "Sales" <sip:+14155550000@example.pstn.twilio.com>
_11
P-Asserted-Identity: "Alice" <sip:+14155551111@example.pstn.twilio.com>
_11
Content-Length: 0

The From header contains the contact information for the party that initiated the SIP INVITE.


_11
INVITE sip:+14155552222@example.pstn.twilio.com SIP/2.0
_11
Via: SIP/2.0/UDP 192.168.10.10:5060;branch=z9hG4bK776asdhds
_11
Max-Forwards: 70
_11
To: "Bob" <sip:+14155552222@example.pstn.twilio.com>
_11
From: "Alice" <sip:+14155551111@example.pstn.twilio.com>;tag=1
_11
Call-ID: a84b4c76e66710
_11
CSeq: 1 INVITE
_11
Contact: "Alice" <sip:+14155551111@192.168.10.10:5060>
_11
Diversion: "Sales" <sip:+14155550000@example.pstn.twilio.com>
_11
P-Asserted-Identity: "Alice" <sip:+14155551111@example.pstn.twilio.com>
_11
Content-Length: 0

The Call-ID header acts as a unique identifier that helps group a series of messages together. It must be the same for all requests and responses sent by either party in a dialog (an exchange of related messages between two user-agents). The value should be a cryptographically random group of characters, and can be followed by @ and a host/domain.



_11
INVITE sip:+14155552222@example.pstn.twilio.com SIP/2.0
_11
Via: SIP/2.0/UDP 192.168.10.10:5060;branch=z9hG4bK776asdhds
_11
Max-Forwards: 70
_11
To: "Bob" <sip:+14155552222@example.pstn.twilio.com>
_11
From: "Alice" <sip:+14155551111@example.pstn.twilio.com>;tag=1
_11
Call-ID: a84b4c76e66710
_11
CSeq: 1 INVITE
_11
Contact: "Alice" <sip:+14155551111@192.168.10.10:5060>
_11
Diversion: "Sales" <sip:+14155550000@example.pstn.twilio.com>
_11
P-Asserted-Identity: "Alice" <sip:+14155551111@example.pstn.twilio.com>
_11
Content-Length: 0

The CSeq header serves as a way to identify and order transactions. It is made up of an integer and a SIP method.



_11
INVITE sip:+14155552222@example.pstn.twilio.com SIP/2.0
_11
Via: SIP/2.0/UDP 192.168.10.10:5060;branch=z9hG4bK776asdhds
_11
Max-Forwards: 70
_11
To: "Bob" <sip:+14155552222@example.pstn.twilio.com>
_11
From: "Alice" <sip:+14155551111@example.pstn.twilio.com>;tag=1
_11
Call-ID: a84b4c76e66710
_11
CSeq: 1 INVITE
_11
Contact: "Alice" <sip:+14155551111@192.168.10.10:5060>
_11
Diversion: "Sales" <sip:+14155550000@example.pstn.twilio.com>
_11
P-Asserted-Identity: "Alice" <sip:+14155551111@example.pstn.twilio.com>
_11
Content-Length: 0

The Contact header provides a SIP or SIPS URI that should be used to contact the user agent that sent the INVITE.

  • Contact display name : Contact: " Alice " <sip:+14155551111@192.168.10.10:5060>
  • Contact URI : Contact: "Alice" < sip:+14155551111@192.168.10.10:5060 >
  • Contact user : Contact: "Alice" <sip: +14155551111 @192.168.10.10:5060>
  • Contact host : Contact: "Alice" <sip:+14155551111@ 192.168.10.10 :5060>


_11
INVITE sip:+14155552222@example.pstn.twilio.com SIP/2.0
_11
Via: SIP/2.0/UDP 192.168.10.10:5060;branch=z9hG4bK776asdhds
_11
Max-Forwards: 70
_11
To: "Bob" <sip:+14155552222@example.pstn.twilio.com>
_11
From: "Alice" <sip:+14155551111@example.pstn.twilio.com>;tag=1
_11
Call-ID: a84b4c76e66710
_11
CSeq: 1 INVITE
_11
Contact: "Alice" <sip:+14155551111@192.168.10.10:5060>
_11
Diversion: "Sales" <sip:+14155550000@example.pstn.twilio.com>
_11
P-Asserted-Identity: "Alice" <sip:+14155551111@example.pstn.twilio.com>
_11
Content-Length: 0

The Diversion header contains information about any re-directing/forwarding the call has undergone. It includes the contact information for the party that forwarded the call.


P-Asserted-Identity header

p-asserted-identity-header page anchor

_11
INVITE sip:+14155552222@example.pstn.twilio.com SIP/2.0
_11
Via: SIP/2.0/UDP 192.168.10.10:5060;branch=z9hG4bK776asdhds
_11
Max-Forwards: 70
_11
To: "Bob" <sip:+14155552222@example.pstn.twilio.com>
_11
From: "Alice" <sip:+14155551111@example.pstn.twilio.com>;tag=1
_11
Call-ID: a84b4c76e66710
_11
CSeq: 1 INVITE
_11
Contact: "Alice" <sip:+14155551111@192.168.10.10:5060>
_11
Diversion: "Sales" <sip:+14155550000@example.pstn.twilio.com>
_11
P-Asserted-Identity: "Alice" <sip:+14155551111@example.pstn.twilio.com>
_11
Content-Length: 0

The P-Asserted-Identity header contains the Caller ID information for the call that was authenticated in some way. This header may be used when forwarding calls within trusted domains, in order to maintain the original caller's caller ID rather than the forwarding entity's.

  • P-Asserted-Identity display name : P-Asserted-Identity: " Alice " <sip: +14155551111@example.pstn.twilio.com >
  • P-Asserted-Identity URI : P-Asserted-Identity: "Alice" < sip:+14155551111@example.pstn.twilio.com >
  • P-Asserted-Identity user : P-Asserted-Identity: "Alice" <sip: +14155551111 @example.pstn.twilio.com>
  • P-Asserted-Identity host : P-Asserted-Identity: "Alice" <sip:+14155551111@ example.pstn.twilio.com >

Other SIP INVITE Headers

other-sip-invite-headers page anchor

Remote-Party-Id (RPID) header

remote-party-id-rpid-header page anchor

_10
Remote-Party-Id: “Alice” <sip:+14155551111@example.pstn.twilio.com>

The Remote-Party-Id (RPID) header identifies the originator of the call.

  • Remote-Party-Id (RPID) display name : Remote-Party-Id: " Alice " <sip: +14155551111@example.pstn.twilio.com >
  • Remote-Party-Id (RPID) URI : Remote-Party-Id: "Alice" < sip:+14155551111@example.pstn.twilio.com >
  • Remote-Party-Id (RPID) user : Remote-Party-Id: "Alice" <sip: +14155551111 @example.pstn.twilio.com>
  • Remote-Party-Id (RPID) host : Remote-Party-Id: "Alice" <sip:+14155551111@ example.pstn.twilio.com >


_10
P-Charge-Info: “Alice” <sip:+14155551111@example.pstn.twilio.com>

The P-Charge-Info header contains information about the identity of the party to be charged.

  • P-Charge-Info display name : P-Charge-Info: " Alice " <sip: +14155551111@example.pstn.twilio.com >
  • P-Charge-Info URI : P-Charge-Info: "Alice" < sip:+14155551111@example.pstn.twilio.com >
  • P-Charge-Info user : P-Charge-Info: "Alice" <sip: +14155551111 @example.pstn.twilio.com>
  • P-Charge-Info host : P-Charge-Info: "Alice" <sip:+14155551111@ example.pstn.twilio.com >

Rate this page: