Sunteți pe pagina 1din 60

Table of Contents _____________________________

SIP Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 SIP Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 3 SIP User Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Presence Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 SIP Gateways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 SIP Proxy Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 SIP Redirect Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 SIP Registration Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 SIP Protocol Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 SIP Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 SIP Message Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Generic Message Structure . . . . . . . . . . . . . . . . . . . . . . . . . 9 SIP Method Message Structure . . . . . . . . . . . . . . . . . . . . . . 9 SIP Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 SIP Responses Class 1XX . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 SIP Responses Class 2XX . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 SIP Responses Class 3XX . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 SIP Responses Class 4XX . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 SIP Responses Class 5XX . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 SIP Responses Class 6XX . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Legend for Header Table . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Header Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 SIP Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 SIP Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 SDP Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 SDP Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 SDP Field Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 SIP Responses to ISUP Release Cause Mapping . . . . . . . . . . 35 SIP Call Flow Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Call Flow Messages Invite #1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Invite #2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 100 Trying #3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 100 Trying #4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 180 Ringing #5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 180 Ringing #6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 200 OK #7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
SIP Pocket Guide 1

Table of Contents

(Continued)

_____________________

200 OK #8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 ACK #9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 ACK #10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 BYE #11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 BYE #12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 200 OK #13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 200 OK #14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Registration Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Registration Messages Register #1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 402 Unauthorized #2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Register #3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 200 OK #4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Additional Sample Messages Cancel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Subscribe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 302 Moved Temporarily . . . . . . . . . . . . . . . . . . . . . . . . . 50 401 Unauthorized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 403 Forbidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 404 Unknown User Account . . . . . . . . . . . . . . . . . . . . . . 52 407 Proxy Authentication Required . . . . . . . . . . . . . . . . . 52 408 Request Timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 481 Transaction Does Not Exist . . . . . . . . . . . . . . . . . . . . 53 487 Request Terminated . . . . . . . . . . . . . . . . . . . . . . . . . 53 Glossary of SIP Related Terms . . . . . . . . . . . . . . . . . . . . . . . 54 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

SIP Pocket Guide

SIP DEFINITION
Session Initiation Protocol (SIP) is a signaling protocol specified by the Internet Engineering Task Force (IETF) for establishing, modifying, and terminating sessions in an IP network. These session are independent of the SIP protocol and can be voice, video, or any other type of media. The current baseline specification for SIP is IETF RFC 3261 with other RFCs further defining extensions to the SIP Protocol.

SIP NETWORK ARCHITECTURE

NOTES:

SIP Pocket Guide

SIP USER AGENTS


SIP User Agents are SIP-enabled devices that take input from users and act on their behalf.

Rules for User Agents _____________________________________________


UAs must be capable of establishing media sessions with other UAs. UAs must maintain call states of calls it initiates or participates in. Even after the call has been terminated the UA must maintain the call state for 32 seconds in case of lost messages. UAs must support UDP transport. UAs must support TCP transport if they send messages greater than 1000 octets. UAs must support Session Description Protocol (SDP) for media description. UAs must be understand extensions contained in the Require header of received request from other UAs. UAs may ignore unknown header fields.

200 OK

NOTES:

SIP Pocket Guide

PRESENCE AGENTS

Support the SIP Event Specification (RFC 3856). Receives subscription request (SUBSCRIBE Messages). Validates the SUBSCRIBE Messages. Can collect presence information from multiple sources. - User Agents publishing presence information - Registration servers - Non SIP Sources Sometimes acts as a presence agent collecting presence information. Sometimes acts as a proxy forwarding subscription request to other Presence Agents. Authenticates the Subscription Request.

SIP GATEWAYS

Applications that allow a SIP network to interface with a non-SIP network (PSTN, H323 etc.). Can be thought of as protocol converters or media converters depending on the type of network being interfaced.

NOTES:

SIP Pocket Guide

SIP PROXY SERVERS

Accept session request from a SIP User Agent and query the SIP Registration Server for the address of the callED party. It then forwards the session invitation to either the SIP User Agent or another Proxy Server based on whether the callED party is in the same domain as the callING party. Proxy Servers may be either Stateful or Stateless.

SIP REDIRECT SERVERS


Receive SIP Request. Respond to but do not forward SIP Request. Uses databases or Location Servers to find user location. Respond to originator with 300 Class. Response messages (redirection class).

SIP REGISTRATION SERVERS


Registration Servers are databases that contain the location of User Agents within a domain. They retrieve and send participants IP address and other information to the SIP Proxy Server.

NOTES:

SIP Pocket Guide

NOTES:

SIGNALING
Media Coding RTP UDP IP DNS DHCP

MEDIA

UTILITY

SDP SIP

SIP PROTOCOL STACK

RTSP

SIP Pocket Guide

TCP

SCTP

PPP

V.90

Ethernet

SIP ADDRESSING

Is used to identify a user by its SIP Uniform Resource Identifiers (URI) (RFC 2396). A SIP URI consists of a user and a domain delimited by one @, as is shown in the following examples: user@domain user@machine user@ip_address telephone_number@gateway

SIP MESSAGE DEFINITIONS


SIP Methods _____________________________________________________
SIP Messages that request an action to take place in another user agent or server.

SIP Responses ___________________________________________________


SIP Messages generated by a UA or SIP server in response to a SIP request or method.

NOTES:

SIP Pocket Guide

GENERIC MESSAGE STRUCTURE


Item
Request Line / Start Line Header #1 Header #N Message Body

Description
Identifies the message type, address of recipient and the version of SIP Transport specific information determined by the header type Transport specific information determined by the header type This portion of the message contains Session Description Protocol (SDP) which defines the media information

Maximum Length
256 Bytes 256 Bytes 256 Bytes

1000 Bytes

SIP METHOD MESSAGE STRUCTURE


Item
Request Line / Start Line Method Request URI SIP Version Header #1 Header #N Message Body

Description
Identifies the message type, address of recipient, and the version of SIP Defines the method type: ACK, BYE, CANCEL, INFO, INVITE, MESSAGE, NOTIFY OPTIONS, PRACK, PUBLISH, REFER, REGISTER, SUBSCRIBE, and UPDATE Remote target address "SIP/2.0" current version of SIP Information for 1st header Information for Nth header This portion of the message contains Session Description Protocol (SDP) which defines the media information Defines parameters associated with required media. SDP Fields: Protocol Version Number, Owner/Creator, Session Name, Session Info., Uniform Resource Identifier, E-Mail Address, Phone Number, Connection Information, Bandwidth Info., Timer Sessions (Start/Stop, Repeat Times, and Time Zone Corrections) Encryption Key, Attribute Lines, Media Info., and Media Attributes

Message Headers Transport specific information determined by the header type

SDP Fields

NOTES:

SIP Pocket Guide

SIP METHODS
ACK (RFC 3261) _________________________________________________
The ACK method is used to acknowledge the final response to an INVITE method. Final responses are response classes 2XX, 3XX, 4XX, and 5XX.

Bye (RFC 3261) _________________________________________________


The Bye method is used to terminate an established media session.

Cancel (RFC 3261) _____________________________________________________


The Cancel method is used to terminate a session before the session is established.

Info (RFC 2976) __________________________________________________


The INFO method is used to carry call signaling information from a user agent to another user agent, with which it has an established media session.

Invite (RFC 3261) ________________________________________________


The Invite method is used by a user agent to request the establishment of a session to another user agent.

Message (RFC 3428) _____________________________________________


The Message method is used to transfer Instant Message information in SIP.

Notify (RFC 3265) ________________________________________________


The Notify method is used to provide the updated event and status information requested in the Subscribe Method.

Options (RFC 3261) ______________________________________________


The Options method is used to query a user agent or server about its capabilities and discover its current availability.

PRACK (RFC 3262) ______________________________________________


The PRACK method is used to acknowledge reliability transported provisional responses (1XX Class responses).

Publish (RFC 3903) ______________________________________________


The Publish method is used by a user agent to send/publish event state information to a SIP Server known as an Event State Compositor (ESC).

10

SIP Pocket Guide

SIP METHODS

(Continued)

Refer (RFC 3515) ________________________________________________


The Refer method is used by a user agent to request another user agent access to a particular SIP URI. This method is also used to perform a call transfer.

Register (RFC 3261) _____________________________________________


The Register method is used by a SIP User Agent to notify the SIP network of its current Contact URI (IP Address) and to provide the URI that should be used for the routing of request to the User Agent.

Subscribe (RFC 3265) ____________________________________________


The Subscribe method is used to request event and status updates from a remote device.

Update (RFC 3311) _______________________________________________


The Update method is used to modify the state of a session without changing the state of the existing dialog.

NOTES:

SIP Pocket Guide

11

SIP RESPONSES CLASS 1XX


Provisional Response Class (1XX)
Provisional responses, also known as informational responses, indicate that the server contacted is performing some further action and does not yet have a definitive response. A server sends a 1XX response if it expects to take more than 200 ms to obtain a final response.

100 Trying (RFC 3261) ___________________________________________


This response indicates that the request has been received by the next-hop server and that some unspecified action is being taken on behalf of this call.

180 Ringing (RFC 3261) __________________________________________


The UA receiving the INVITE is trying to alert the user. This response MAY be used to initiate local ringback.

181 Call Is Being Forwarded (RFC 3261) ___________________________


A server MAY use this status code to indicate that the call is being forwarded to a different set of destinations.

182 Queued (RFC 3261) __________________________________________


The called party is temporarily unavailable, but the server has decided to queue the call rather than reject it. When the callee becomes available, it will return the appropriate final status response.

183 Session Progress (RFC 3261) _________________________________


The 183 (Session Progress) response is used to convey information about the progress of the call that is not otherwise classified.

NOTES:

12

SIP Pocket Guide

SIP RESPONSES CLASS 2XX


Success Response Class (2XX)
Success responses indicate that the request was successful.

200 OK (RFC 3261) __________________________________________


The request has succeeded. The information returned with the response depends on the method used in the request.

202 Accepted (RFC 3265) _________________________________________


Indicates that the subscription request has been understood, and that authorization may or may not have been granted.

SIP RESPONSES CLASS 3XX


Redirection Class (3XX)
3XX responses give information about the user's new location, or about alternative services that might be able to satisfy the call.

300 Multiple Choice (RFC 3261) ___________________________________


The address in the request resolved to several choices, each with its own specific location, and the user (or UA) can select a preferred communication end point and redirect its request to that location.

301 Moved Permanently (RFC 3261) _______________________________


The user can no longer be found at the address in the Request-URI, and the requesting client SHOULD retry at the new address given in the Contact header field.

302 Moved Temporarily (RFC 3261) ________________________________


The requesting client SHOULD retry the request at the new address(es) given in the Contact header field.

305 Use Proxy (RFC 3261) ________________________________________


The requested resource MUST be accessed through the proxy listed in the Contact field. The Contact field gives the URI of the proxy.

380 Alternative Service (RFC 3261) ________________________________


The call was not successful, but alternative services are possible. The alternative services are described in the message body of the response.

SIP Pocket Guide

13

SIP RESPONSES CLASS 4XX


Client Error Class (4XX)
4XX responses are failure responses from a particular server. The client SHOULD NOT retry the same request without modification.

400 Bad Request (RFC 3261) _____________________________________


The request could not be understood due to malformed syntax. The ReasonPhrase SHOULD identify the syntax problem in more detail, for example, "Missing Call-ID header field."

401 Unauthorized (RFC 3261) _____________________________________


The request requires user authentication. This response is issued by UASs and Registrars.

402 Payment Required (RFC 3261) ________________________________


Reserved for future use.

403 Forbidden (RFC 3261) ________________________________________


The server understood the request, but is refusing to fulfill it. Authorization will not help, and the request SHOULD NOT be repeated.

404 Not Found (RFC 3261) ________________________________________


The server has definitive information that the user does not exist at the domain specified in the Request-URI.

405 Method Not Allowed (RFC 3261) _______________________________


The method specified in the Request-Line is understood, but not allowed for the address identified by the Request-URI. The response MUST include an Allow header field containing a list of valid methods for the indicated address.

406 Not Acceptable (RFC 3261) ___________________________________


The resource identified by the request is only capable of generating response entities that have content characteristics not acceptable according to the Accept header field sent in the request.

407 Proxy Authentication Required (RFC 3261) ______________________


This response indicates that the client MUST first authenticate itself with the proxy.

408 Request Timeout (RFC 3261) __________________________________


The server could not produce a response within a suitable amount of time, for example, if it could not determine the location of the user in time. 14 SIP Pocket Guide

SIP RESPONSES CLASS 4XX

(Continued)

410 Gone (RFC 3261) ____________________________________________


The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent.

412 Conditional Request Failed (RFC 3903) _________________________


Indicates that the precondition given for the request has failed.

413 Request Entity Too Large (RFC 3261) __________________________


The server is refusing to process a request because the request entity-body is larger than the server is willing or able to process.

414 Request-URI Too Long (RFC 3261) _____________________________


The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret.

415 Unsupported Media Type (RFC 3261) ___________________________


The server is refusing to service the request because the message body of the request is in a format not supported by the server for the requested method. The server MUST return a list of acceptable formats using the Accept, AcceptEncoding, or Accept-Language header field, depending on the specific problem with the content.

416 Unsupported URK Scheme (RFC 3261) _________________________


The server cannot process the request because the scheme of the URI in the Request-URI is unknown to the server.

417 Unknown Resource-Priority (RFC 4412) _________________________


A request containing Require: resource-priority and an unknown value for Resource-Priority header field will receive the 417 Unknown Resource Priority response.

420 Bad Extension (RFC 3261) ____________________________________


The server did not understand the protocol extension specified in a ProxyRequire or Require header field.

421 Extension Required (RFC 3261) _______________________________


The UAS needs a particular extension to process the request, but this extension is not listed in a Supported header field in the request. Responses with this status code MUST contain a Require header field listing the required extensions.

SIP Pocket Guide

15

SIP RESPONSES CLASS 4XX

(Continued)

422 Session Interval Too Small (RFC 4028) _________________________


Indicates that the session timer duration was too small.

423 Interval Too Brief (RFC 3261) __________________________________


The server is rejecting the request because the expiration time of the resource refreshed by the request is too short.

429 Provide Referror Identify (RFC 3892) ___________________________


Is used by the refer target to indicate that the referee must provide a valid Referred-BY token.

433 Anonymity Disallowed (RFC 4079) _____________________________


Indicates that the server refused to fulfill the request because the requestor was anonymous. Its default reason phrase is "Anonymity Disallowed."

436 Bad Identity-Info (RFC 4474) __________________________________


This response code is used when the Identity-Info header contains a URI that cannot be de-referenced by the verifier (either the URI scheme is unsupported by the verifier, or the resource designated by the URI is otherwise unavailable).

437 Unsupported Certificate (RFC 4474) ____________________________


This response code is used when the verifier cannot validate the certificate referenced by the URI of the Identity-Info header

438 Invalid Identity Header (RFC 4474) _____________________________


This response code is used when the verifier receives a message with an Identity signature that does not correspond to the digest-string calculated by the verifier.

470 Consent Needed (RFC 5360) __________________________________


Indicates that the request that triggered the response contained a URI list with at least one URI for which the relay had no permissions.

480 Temporarily Unavailable (RFC 3261) ____________________________


The callee's end system was contacted successfully but the callee is currently unavailable (for example, is not logged in, logged in but in a state that precludes communication with the callee, or has activated the "do not disturb" feature.

16

SIP Pocket Guide

SIP RESPONSES CLASS 4XX

(Continued)

481 Call/Transaction Does Not Exist (RFC 3261) _____________________


This status indicates that the UAS received a request that does not match any existing dialog or transaction.

482 Loop Detected (RFC 3261) ____________________________________


The server has detected a loop.

483 Too Many Hops (RFC 3261) ___________________________________


The server received a request that contains a Max-Forwards header field with the value zero.

484 Address Incomplete (RFC 3261) _______________________________


The server received a request with a Request-URI that was incomplete. Additional information SHOULD be provided in the reason phrase.

485 Ambiguous (RFC 3261) _______________________________________


The Request-URI was ambiguous. The response MAY contain a listing of possible unambiguous addresses in Contact header fields.

486 Busy Here (RFC 3261) ________________________________________


The callee's end system was contacted successfully, but the callee is currently not willing or able to take additional calls at this end system.

487 Request Terminated (RFC 3261) _______________________________


The request was terminated by a BYE or CANCEL request. This response is never returned for a CANCEL request itself.

488 Not Acceptable Here (RFC 3261) _______________________________


The response has the same meaning as 606 (Not Acceptable), but only applies to the specific resource addressed by the Request-URI and the request may succeed elsewhere.

489 Bad Event (RFC 5360) ________________________________________


Indicates that the specified event/event class is not understood.

491 Request Pending (RFC 3261) __________________________________


The request was received by a UAS that had a pending request within the same dialog.

SIP Pocket Guide

17

SIP RESPONSES CLASS 4XX

(Continued)

493 Undecipherable (RFC 3261) ___________________________________


The request was received by a UAS that contained an encrypted MIME body for which the recipient does not possess or will not provide an appropriate decryption key.

494 Security Agreement Required (RFC 3329) _______________________


A server receiving an unprotected request that contains a Require or ProxyRequire header field with the value "sec-agree" MUST respond to the client with a 494 (Security Agreement Required) response.

NOTES:

18

SIP Pocket Guide

SIP RESPONSES CLASS 5XX


Server Failure (5XX)
5XX responses are failure responses given when a server itself has erred.

500 Server Internal Error (RFC 3261) _______________________________


The server encountered an unexpected condition that prevented it from fulfilling the request. The client MAY display the specific error condition and MAY retry the request after several seconds.

501 Not Implemented (RFC 3261) __________________________________


The server does not support the functionality required to fulfill the request.

502 Bad Gateway (RFC 3261) _____________________________________


The server, while acting as a gateway or proxy, received an invalid response from the downstream server it accessed in attempting to fulfill the request.

503 Service Unavailable (RFC 3261) _______________________________


The server is temporarily unable to process the request due to a temporary overloading or maintenance of the server.

504 Server Time-Out (RFC 3261) ___________________________________


The server did not receive a timely response from an external server it accessed in attempting to process the request.

505 Version Not Supported (RFC 3261) _____________________________


The server does not support, or refuses to support, the SIP protocol version that was used in the request.

513 Message Too Large (RFC 3261) _______________________________


The server was unable to process the request since the message length exceeded its capabilities.

580 Precondition Failure (RFC 3312) _______________________________


When a UAS, acting as an answerer, cannot or is not willing to meet the preconditions in the offer, it SHOULD reject the offer by returning a 580 Precondition-Failure) response.

NOTES:

SIP Pocket Guide

19

SIP RESPONSES CLASS 6XX


Global Failures (6XX)
6XX responses indicate that a server has definitive information about a particular user, not just the particular instance indicated in the Request-URI.

600 Busy Everywhere (RFC 3261) __________________________________


The callee's end system was contacted successfully but the callee is busy and does not wish to take the call at this time.

603 Decline (RFC 3261) __________________________________________


The callee's machine was successfully contacted but the user explicitly does not wish to or cannot participate.

604 Does Not Exist Anywhere (RFC 3261) __________________________


The server has authoritative information that the user indicated in the Request URI does not exist anywhere.

606 Not Acceptable (RFC 3261) ___________________________________


The user's agent was contacted successfully but some aspects of the session description such as the requested media, bandwidth, or addressing style were not acceptable.

NOTES:

20

SIP Pocket Guide

LEGEND FOR HEADER TABLE


Legend Where column: R = Header field may only appear in request r = Header field may only appear in responses 2XX, 4XX, etc. = Numerical value of the range of response codes c = Header field copied from the request to the responses Empty field = Header field may be present in all request and responses Proxy column: a = Proxy can add or concatenate the header field if not present m = Proxy can modify an existing header field value d = Proxy can delete a header field value r = Proxy must be able to read the header field value, thus this header field cannot be encrypted "Named Request" column: m = Header field is mandatory m* = Header field SHOULD be sent, however clients/servers need to be prepared to receive the message without the header field o = Header field is Optional t = Header field SHOULD be sent, however clients/servers need to be prepared to receive the message without the header field - = Header field is not applicable

NOTES:

SIP Pocket Guide

21

HEADER TABLE

22 INV o o c o o o c o o c o o o o o o o o o o o o o o o o o c c c o m* o o o o o o o o o o o o c o o o c c c o o c m* o o m* m* o o o o o o o o o o c o c o o o o o o o o o o o o m* o m* o o o c c c o o c m* c o m* o o o m* m* o o o o o o o o OPT REG PUB PRA SUB NOT UPD MSG REF INF

Header Field

RFC Where Proxy ACK No.

BYE

CAN

Accept

3261

Accept

3261

2XX

Accept

3261

415

Accept-Contact

3261

ar

Accept-Encoding

3261

Accept-Encoding

3261

2XX

Accept-Encoding

3261

415

SIP Pocket Guide

Accept-Language

3261

Accept-Language

3261

2XX

Accept-Language

3261

415

Accept-Resource-Priority

4412

200

amdr

Accept-Resource-Priority

4412

417

amdr

Alert-Info

3261

ar

Alert-Info

3261

180

ar

Allow

3261

Header Field INV m* o o m o o m m o o o o o o m m m m m* m o o m o o o o o o o m o m o o o o m o m* o o o o

RFC Where Proxy ACK No. OPT REG PRA SUB NOT UPD MSG REF INF PUB

BYE

CAN

Allow

3261

2XX

Allow

3261

HEADER TABLE

Allow

3261

405

Allow-Events

3265

(Continued)

Allow-Events

3265

2XX

Allow-Events

3265

489

Answer-Mode o o o m o o o o o m o m m m o o m m m o o o m o m o m o m o o o o o m o o o o o o o m o m o m o

5373 o o m o o o o m m m o o o m o o m o o

SIP Pocket Guide

Authentication-Info

3261

2XX

Authorization

3261

Call-ID

3261

Call-Info

3261

ar

Contact

3261

Contact

3261

1XX

Contact

3261

2XX

Contact

3261

3XX

23

HEADER TABLE

24 INV o o o o t * m o o o o o m m o o o o o o m m m o m o o m o o o o o m m o o m o m o o m o o m o o o o o o o o o o o m m m m m m * * * * * * * m o o t t t t t t t t * m o o o o o o o o o o t * m o o o o o o o o o o o o o o o o o o o o o t * m o o m o m m o o o o o o o o o o o OPT REG PRA SUB NOT INF PUB UPD MSG REF (Continued)

Header Field

RFC Where Proxy ACK No.

BYE

CAN

Contact

3261

485

Content-Disposition

3261

Content-Encoding

3261

Content-Language

3261

Content-Length

3261

ar

Content-Type

3261

Cseq

3261

SIP Pocket Guide

Date

3261

Error-Info

3261

300699

Event

3265

Expires

3261

EXPIRES

3261

2XX

From

3261

History-Info

4244

amdr

Identity

4474

Header Field INV o o o m o o o o o o o o o o o o o o o o m o o m o o o o o o o o o o o o o o o o o m m o o o o o m m m m m m m* m o m m o o o o o o o o o o o o o OPT REG PRA SUB MSG REF INF PUB

RFC Where Proxy ACK No. NOT UPD

BYE

CAN

Identity-Info

4474

In-Reply-To

3261

HEADER TABLE

Join

3911

Max-Forwards

3261

amr

(Continued)

Min-Expires

3261

423

MIME-Version

3261

Min-SE

4028

amr

SIP Pocket Guide

Min-SE

4028

422

Organization

3261

ar

P-Access-Network-Info

3455

dr

P-Answer-State

4964

18X, 2XX

ar

P-Answer-State

4964

P-Asserted-Identity

3325

adr

P-Associated-URI

3455

2XX

P-Called-Party-ID

3455

amr

25

HEADER TABLE

26 INV o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o OPT REG PRA SUB NOT UPD MSG REF INF PUB (Continued)

Header Field

RFC No.

Where Proxy ACK BYE CAN

P-Charging-Function-Address 3455

adr

P-Charging-Vector

3455

admr

P-DCS-Trace-Party-ID

3603

dr

P-DCS-OSPS

3603

dr

P-DCS-Billing-Info

3603

admr

P-DCS-LAES

3603

adr

P-DCS-Redirect

3603

adr

SIP Pocket Guide

P-Early-Media

5009

amr

P-Early-Media

5009

18X

amr

P-Early-Media

5009

2XX

amr

P-Media-Authorization

3313

ad

P-Media-Authorization

3313

2XX

ad

P-Media-Authorization

3313

101199

ad

P-Preferred-Identity

3325

adr

P-Profile-Key

5002

Header Field

RFC Where Proxy ACK No. INV OPT REG PRA SUB NOT UPD MSG REF INF PUB

BYE

CAN

P-User-Database o o o o o o o o o o o o o

4457

P-Visited-Network-ID

3455

ad

HEADER TABLE

Path

3327

ar

Path

3327

2XX

(Continued)

Priority

3261

ar

Priv-Answer-Mode o m o o o m o o o o o o o o o o o o o o m m m m m m o o o o o o o o o

5373 o m o o o o m o o o o o o o o m o o o

Privacy

3323

amdr

SIP Pocket Guide o o o o o o o o o o o o

Proxy-Authenticate

3261

407

ar

Proxy-Authenticate

3261

401

ar

Proxy-Authorization

3261

ar

Proxy-Require

3261

ar

RAck

3262

Reason

3326 o o o o

Record-Route

3261

ar

Record-Route

3261

2XX, 18X

mr

27

HEADER TABLE

28 INV o o o o o c o o o o c o o o c c o o o o c o o o o o o o o o c o o o o o o o o o o c o o c c o c o c o o o o c o o o c o o o o o o c o o o o c o o o o o o o o o o o o c o o o o o OPT REG PRA SUB NOT UPD MSG REF PUB INF o o o o o o c (Continued)

Header Field

RFC No.

Where

Proxy

ACK BYE CAN

Refer-Sub

4488

R, 2XX

Refer-To

3515

Referred-By

3892

Reject-Contact

3841

ar

Replaces

3891

Reply-To

3261

Request-Disposition 3841

ar

SIP Pocket Guide

Require

3261

ar

Resource-Priority

4412

amdr

Retry-After

3261 404,413,480,486

500, 503

600, 603

Route

3261

adr

Rseq

3262

1XX

Security-Client

3329

ard

Header Field o o o o o m* o o o o o o m o o o o o o o o o o o o o o o o o o o m* m* o o o o o m o o o o o o o o o o o o o o o o o

RFC No. INV OPT REG PRA SUB NOT UPD MSG REF INF PUB

Where

Proxy ACK

BYE

CAN

Security-Server

3329

421,494

Security-Verify

3329

ard

HEADER TABLE

Server

3261

Service-Route

3608

2XX

ar

(Continued)

Session Expires

4028

amr

Session Expires

4028

2XX

ar

SIP-ETag

3903

2XX

SIP Pocket Guide o o m m o m o m o m o m o m

SIP-If-Match

3903

Subject

3261

Subscription-State

3265

Supported

3261

Supported

3261

2XX

Target-Dialog

4538 o m o m o m

Timestamp

3261

To

3261

29

HEADER TABLE

30 INV OPT REG PRA SUB NOT UPD MSG REF INF PUB m o m m o m o o o o o o o m m m m m m o o o o o o m o m m m m m m m m o m o m m m m m m m m o o o o o o o o o m m o o o m m m o o o o m o o o m m o m o (Continued)

Header Field

RFC Where Proxy ACK No.

BYE

CAN

Trigger-Consent

5360

Unsupported

3261

420

User-Agent

3261

Via

3261

amr

Via

3261

rc

dr

Warning

3261

WWW-Authenticate

3261

401

ar

SIP Pocket Guide

WWW-Authenticate

3261

407

ar

SIP EVENTS
SIP events provide a mechanism whereby an interested UA can be notified of the state of another UA. The SIP events are primarily used in the Subscribe and Notify methods.

SIP EVENTS Event


Conference Dialog

Description
Provides a list of URIs for participants of the conference. Allows the subscribed party to be notified if the target changes state. Enables monitoring of Dual Tone Multi-Frequency (DTMF) signals and uses Extensible Markup Language (XML) documents referred to as Key Press Markup Language (KPML). Carries message waiting status and message summaries from a messaging system to an interested User Agent. Supports publication, subscription, and notification of additional capabilities required by the "Push to Talk over Cellular" service. Presence, also known as presence information, conveys the ability and willingness of a user to communicate across a set of devices. Allows the subscribed to be notified if the target has a change in registration. Is used in a call transfer to indicate to the transferor the states of the transfer. Watcher information refers to the set of users subscribed to a particular resource within a particular event package.

RFC
4575 4235

KPML

4730

Message/ Summary/ Message Waiting PoC-Settings

3842

4354 3856 3680 3515 3857

Presence Registrations Refer Winfo

NOTES:

SIP Pocket Guide

31

SIP TIMERS
SIP TIMERS Timer
T1 T2

Value
500 ms Default 4S

RFC 3261 Section


Section 17.1.1.1 Section 17.1.2.2

Meaning
RTT Estimate The maximum retransmit interval for non-INVITE requests and INVITE responses Maximum duration a message will remain in the network INVITE request retransmit interval, for UDP only INVITE transaction timeout timer proxy INVITE transaction timeout Wait time for response retransmits non-INVITE request retransmit interval, UDP only non-INVITE transaction timeout timer INVITE response retransmit interval Wait time for ACK receipt Wait time for ACK retransmits Wait time for non-INVITE request retransmits Wait time for response retransmits

T4 Timer A Timer B Timer C Timer D Timer E Timer F Timer G Timer H Timer I Timer J Timer K

5S initially T1 64*T1 > 3min > 32s for UDP 0s for TCP/SCTP initially T1 64*T1 initially T1 64*T1 T4 for UDP 0s for TCP/SCTP 64*T1 for UDP 0s for TCP/SCTP T4 for UDP 0s for TCP/SCTP

Section 17.1.2.2 Section 17.1.1.2 Section 17.1.1.2 Section 16.6 bullet 11 Section 17.1.1.2 Section 17.1.2.2 Section 17.1.2.2 Section 17.2.1 Section 17.2.1 Section 17.2.1 Section 17.2.2 Section 17.1.2.2

NOTES:

32

SIP Pocket Guide

SDP DESCRIPTION
SDP is used to convey information about media streams in multimedia sessions. It allows the recipients of a session description to participate in the session. SDP is primarily intended for use in an internetwork, although it is sufficiently general that it can describe conferences in other network environments. Media streams can be many-to-many. Sessions need not be continually active.

SDP FIELDS
Field
v o s i u e p c b t r z k a m Protocol Version Origin Session Name Session Information Uniform Resource Identifier Email Address Phone Number Connection Data Bandwidth Information Time Sessions Starts and Stops Repeat Times Time Zone Corrections Encryption Key Attribute Lines Media Information

Name

Mandatory/ Optional
m m m o o o o m m m o o o o o

NOTES:

SIP Pocket Guide

33

SDP FIELD DESCRIPTIONS


Protocol Version Is 0 for SDP version 0. Origin Contains information about the originator of the session and session identifiers. Session Name Contains the name of the session. Session Information Contains information about the session. Uniform Resource Identifier Contains a uniform resource identifier with more information about the session. Email Address Contains the email address of the host of the session. Phone Number Contains the phone number of the Originator. Should be in the format of + country code, city code and number. Connection Data Contains IN for internet, the address type IP4 or IP6 for IPv4 or IPv6, and address sending packets. Bandwidth Information Contains information about the bandwidth required. Time Session Starts and Stops Contains the start and stop time of the session. Repeat Times Contains information about the repeat times in NTP or days, hour, and minutes. Time Zone Corrections Gives the time zone offset to be used, i.e., daylight-savings to standard time. Encryption Key Contains the encryption key for the session where the encryption key equals clear, base64, URI, or prompt. Attribute Lines Contains information about the described media session. Media Information Contains information about the type of media session required, i.e., audio, video, application data, telephone-event, or control. All underlined letters indicate the short version of the parameter names.

34

SIP Pocket Guide

SIP RESPONSES TO ISUP RELEASE CAUSE MAPPING


SIP to ISUP Mapping #
400 401 402 403 404 405 406 407 408 410 413 414 415 416 420 421 423 480 481 482 483 484 485 486 487 488 500 501 502 503 504 505 513 600 603 604 606

Received Response
Bad Request Unauthorized Payment Required Forbidden Not Found Method Not Allowed Not Acceptable Proxy Authentication Required Request Timeout Gone Request Entity Too Long Request URI Too Long Unsupported Media Type Unsupported URI Scheme Bad Extension Extension Required Interval Too Brief Temporarily Unavailable Call/Transaction Does Not Exist Loop Detected Too Many Hops Address Incomplete Ambiguous Busy Here Request Terminated Not Accepted Here Server Internal Error Not Implemented Bad Gateway Service Unavailable Server Timeout Version Not Supported Message Too Large Busy Everywhere Decline Does Not Exist Anywhere Not Acceptable

#
41 21 21 21 1 63 79 21 22

ISUP Cause Value


Temporary Failure Call Rejected Call Rejected Call Rejected Unallocated Number Service or Option Unavailable Service or Option Not Implemented Call Rejected Number Changed w/o Diagnostics

102 Recovery on Timer Expiry 127 Interworking 127 Interworking 79 Service or Option Not Implemented 127 Interworking 127 Interworking 127 Interworking 127 Interworking 18 41 25 25 28 1 17 No User Responding Temporary Failure Exchange Error Routing Exchange Error Routing Invalid Number Format Unallocated Number User Busy (NOT MAPPED) (NOT MAPPED) 41 79 38 41 Temporary Failure Service or Option Not Implemented Network Out of Order Temporary Failure

102 Recovery on Timer Expiry 127 Interworking 127 Interworking 17 21 1 User Busy Call Rejected Unallocated Number (NOT MAPPED)

SIP Pocket Guide

35

SIP CALL FLOW NETWORK

NOTES:

36

SIP Pocket Guide

INVITE #1
Request Line INVITE sip:9103682854@192.168.16.140 SIP/2.0 Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754z2651db598629a27e-1---d8754z-;rport Max-Forwards: 70 Contact: <sip:9103683957@192.168.16.105:44646 To: "Jane Doe"<sip:9103682854@192.168.16.140 From: "John Smith"<sip:9103683957@192.168.16.140>;tag=5c06d71d Call-ID: Yzk2ZjQ5YzJhOWVmNTJmNjk5MWMxYmMxMmJiNzQwOTg. Headers CSeq: 2 INVITE Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO Content-Type: application/sdp Proxy-Authorization: Digest username="9103683957",realm ="192.168.16.140",nonce="2b028e9e929f845f097aa41196e511ac",ur i="sip:9103682854@192.168.16.140",response="e714b87b94f9f5d4c a3b288984963fb5",cnonce="dc58e9e10d0a63b19d65b1380324a101 ",nc= User-Agent: X-Lite release 1104o stamp 56125 Content-Length: 322 Empty Line v=0 o=- 3 2 IN IP4 192.168.16.105 s=CounterPath X-Lite 3.0 c=IN IP4 192.168.16.105 t=0 0 Message Body m=audio 32854 RTP/AVP 107 0 8 101 a=alt:1 2 : oND7cBBb qhQukSDp 10.100.100.250 32854 a=alt:2 1 : napYhQOC H731+lWt 192.168.16.105 32854 a=fmtp:101 0-15 a=rtpmap:107 BV32/16000 a=rtpmap:101 telephone-event/8000 a=sendrecv

NOTES:

SIP Pocket Guide

37

INVITE #2
Request Line INVITE sip:9103682854@192.168.16.102:56912 SIP/2.0 Via: SIP/2.0/UDP 192.168.16.140:5060;branch=z9hG4bK85z25d58d7461b9 Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754z2651db598629a27e-1---d8754z;received=192.168.16.105;rport=44646 Max-Forwards: 69 Contact: <sip:9103683957@192.168.16.105:44646> To: "Jane Doe"<sip:9103682854@192.168.16.140> Headers From: "John Smith"<sip:9103683957@192.168.16.140>;tag=5c06d71d Call-ID: Yzk2ZjQ5YzJhOWVmNTJmNjk5MWMxYmMxMmJiNzQwOTg. CSeq: 2 INVITE Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO Record-Route: <sip:192.168.16.140;lr> User-Agent: X-Lite release 1104o stamp 56125 Content-Type: application/sdp Content-Length: 322 Empty Line v=0 o=- 3 2 IN IP4 192.168.16.105 s=CounterPath X-Lite 3.0 c=IN IP4 192.168.16.105 Message Body SDP t=0 0 m=audio 32854 RTP/AVP 107 0 8 101 a=alt:1 2 : oND7cBBb qhQukSDp 10.100.100.250 32854 a=alt:2 1 : napYhQOC H731+lWt 192.168.16.105 32854 a=fmtp:101 0-15 a=rtpmap:107 BV32/16000

NOTES:

38

SIP Pocket Guide

100 TRYING #3
Request Line

SIP/2.0 100 Trying Via: SIP/2.0/UDP 192.168.16.140:5060;branch=z9hG4bK85z25d58d7461b9 Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754z2651db598629a27e-1---d8754z;received=192.168.16.105;rport=44646

Headers

To: "Jane Doe"<sip:9103682854@192.168.16.140 From: "John Smith"<sip:9103683957@192.168.16.140>;tag=5c06d71d Call-ID: Yzk2ZjQ5YzJhOWVmNTJmNjk5MWMxYmMxMmJiNzQwOTg. CSeq: 2 INVITE Content-Length: 0

100 TRYING #4
Request Line SIP/2.0 100 Trying Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754z2651db598629a27e-1---d8754z;received=192.168.16.105;rport=44646 To: "Jane Doe"<sip:9103682854@192.168.16.140 From: "John Smith"<sip:9103683957@192.168.16.140>;tag=5c06d71d Call-ID: Yzk2ZjQ5YzJhOWVmNTJmNjk5MWMxYmMxMmJiNzQwOTg. CSeq: 2 INVITE Max-Forwards: 70 Record-Route: <sip:192.168.16.140;lr> Content-Length: 0

Headers

NOTES:

SIP Pocket Guide

39

180 RINGING #5
Request Line SIP/2.0 180 Ringing Via: SIP/2.0/UDP 192.168.16.140:5060;branch=z9hG4bK85z25d58d7461b9 Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754z2651db598629a27e-1---d8754z;received=192.168.16.105;rport=44646 Record-Route: <sip:192.168.16.140;lr Contact: <sip:9103682854@192.168.16.102:56912 Headers To: "Jane Doe"<sip:9103682854@192.168.16.140>;tag=f63e876c From: "John Smith"<sip:9103683957@192.168.16.140>;tag=5c06d71d Call-ID: Yzk2ZjQ5YzJhOWVmNTJmNjk5MWMxYmMxMmJiNzQwOTg. CSeq: 2 INVITE User-Agent: X-Lite release 1104o stamp 56125 Content-Length: 0

180 RINGING #6
Request Line SIP/2.0 180 Ringing Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754z2651db598629a27e-1---d8754z;received=192.168.16.105;rport=44646 Contact: <sip:9103682854@192.168.16.102:56912 To: "Jane Doe"<sip:9103682854@192.168.16.140>;tag=f63e876c From: "John Smith"<sip:9103683957@192.168.16.140>;tag=5c06d71d Headers Call-ID: Yzk2ZjQ5YzJhOWVmNTJmNjk5MWMxYmMxMmJiNzQwOTg. CSeq: 2 INVITE Max-Forwards: 70 Record-Route: <sip:192.168.16.140;lr User-Agent: X-Lite release 1104o stamp 5612 Content-Length: 0

NOTES:

40

SIP Pocket Guide

200 OK #7
Request Line SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.16.140:5060;branch=z9hG4bK85z25d58d7461b9 Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754z2651db598629a27e-1---d8754z;received=192.168.16.105;rport=44646 Record-Route: <sip:192.168.16.140;lr Contact: <sip:9103682854@192.168.16.102:56912 To: "Jane Doe"<sip:9103682854@192.168.16.140>;tag=f63e876c Headers From: "John Smith"<sip:9103683957@192.168.16.140>;tag=5c06d71d Call-ID: Yzk2ZjQ5YzJhOWVmNTJmNjk5MWMxYmMxMmJiNzQwOTg. CSeq: 2 INVITE Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO Content-Type: application/sdp User-Agent: X-Lite release 1104o stamp 56125 Content-Length: 270 Empty Line v=0 o=- 8 2 IN IP4 192.168.16.102 s=CounterPath X-Lite 3.0 c=IN IP4 192.168.16.102 Message Body SDP t=0 0 m=audio 10574 RTP/AVP 107 0 8 101 a=alt:1 1 : EBcwd5ZA XQt5DSSm 192.168.16.102 10574 a=fmtp:101 0-15 a=rtpmap:107 BV32/16000 a=rtpmap:101 telephone-event/8000 a=sendrecv

NOTES:

SIP Pocket Guide

41

200 OK #8
Request Line SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754z2651db598629a27e-1---d8754z;received=192.168.16.105;rport=44646 Contact: <sip:9103682854@192.168.16.102:56912 To: "Jane Doe"<sip:9103682854@192.168.16.140>;tag=f63e876c From: "John Smith"<sip:9103683957@192.168.16.140>;tag=5c06d71d Headers Call-ID: Yzk2ZjQ5YzJhOWVmNTJmNjk5MWMxYmMxMmJiNzQwOTg. CSeq: 2 INVITE Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO Max-Forwards: 70 Record-Route: <sip:192.168.16.140;lr User-Agent: X-Lite release 1104o stamp 56125 Content-Type: application/sdp Content-Length: 270 Empty Line v=0 o=- 8 2 IN IP4 192.168.16.102 s=CounterPath X-Lite 3.0 c=IN IP4 192.168.16.102 Message Body SDP t=0 0 m=audio 10574 RTP/AVP 107 0 8 101 a=alt:1 1 : EBcwd5ZA XQt5DSSm 192.168.16.102 10574 a=fmtp:101 0-15 a=rtpmap:107 BV32/16000 a=rtpmap:101 telephone-event/8000 a=sendrecv

NOTES:

42

SIP Pocket Guide

ACK #9
Request Line ACK sip:9103682854@192.168.16.102:56912 SIP/2.0 Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754zcd63ad64065fb73c-1---d8754z-;rport Max-Forwards: 70 Route: <sip:192.168.16.140;lr Contact: <sip:9103683957@192.168.16.105:44646 To: "Jane Doe"<sip:9103682854@192.168.16.140>;tag=f63e876c From: "John Smith"<sip:9103683957@192.168.16.140>;tag=5c06d71d Headers Call-ID: Yzk2ZjQ5YzJhOWVmNTJmNjk5MWMxYmMxMmJiNzQwOTg. CSeq: 2 ACK Proxy-Authorization: Digest username="9103683957",realm="192.168.16.140",nonce="2b028e9e929f 845f097aa41196e511ac",uri="sip:9103682854@192.168.16.140",res ponse="e714b87b94f9f5d4ca3b288984963fb5",cnonce="dc58e9e10 d0a63b19d65b1380324a101",nc= User-Agent: X-Lite release 1104o stamp 56125 Content-Length: 0

ACK #10
Request Line ACK sip:9103682854@192.168.16.102:56912 SIP/2.0 Via: SIP/2.0/UDP 192.168.16.140:5060;branch=z9hG4bK85zc6a60d74d3d4 Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754zcd63ad64065fb73c-1---d8754z;received=192.168.16.105;rport=44646 Max-Forwards: 69 Contact: <sip:9103683957@192.168.16.105:44646 To: "Jane Doe"<sip:9103682854@192.168.16.140>;tag=f63e876c Headers From: "John Smith"<sip:9103683957@192.168.16.140>;tag=5c06d71d Call-ID: Yzk2ZjQ5YzJhOWVmNTJmNjk5MWMxYmMxMmJiNzQwOTg. CSeq: 2 ACK Route: <sip:192.168.16.140;lr Record-Route: <sip:192.168.16.140;lr User-Agent: X-Lite release 1104o stamp 56125 Content-Length: 0

SIP Pocket Guide

43

BYE #11
Request Line BYE sip:9103682854@192.168.16.102:56912 SIP/2.0 Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754zf8728d218024a502-1---d8754z-;rport Max-Forwards: 70 Route: <sip:192.168.16.140;lr> Contact: <sip:9103683957@192.168.16.105:44646> To: "Jane Doe"<sip:9103682854@192.168.16.140>;tag=f63e876c From: "John Smith"<sip:9103683957@192.168.16.140>;tag=5c06d71d Headers Call-ID: Yzk2ZjQ5YzJhOWVmNTJmNjk5MWMxYmMxMmJiNzQwOTg. CSeq: 3 BYE Proxy-Authorization: Digest username="9103683957",realm="192.168.16.140",nonce="2b028e9e929f 845f097aa41196e511ac",uri="sip:9103682854@192.168.16.102:569 12",response="4fe9122045c410cf3b5c2b2f828142e3",cnonce="ffec2 900d9477f14248fcbb76b4d020 User-Agent: X-Lite release 1104o stamp 56125 Reason: SIP;description="User Hung Up" Content-Length: 0

BYE #12
Request Line BYE sip:9103682854@192.168.16.102:56912 SIP/2.0 Via: SIP/2.0/UDP 192.168.16.140:5060;branch=z9hG4bK85zf7828d7482d1 Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754zf8728d218024a502-1---d8754z;received=192.168.16.105;rport=44646 Max-Forwards: 69 Contact: <sip:9103683957@192.168.16.105:44646 To: "Jane Doe"<sip:9103682854@192.168.16.140>;tag=f63e876c Headers From: "John Smith"<sip:9103683957@192.168.16.140>;tag=5c06d71d Call-ID: Yzk2ZjQ5YzJhOWVmNTJmNjk5MWMxYmMxMmJiNzQwOTg. CSeq: 3 BYE Reason: SIP;description="User Hung Up" Route: <sip:192.168.16.140;lr Record-Route: <sip:192.168.16.140;lr User-Agent: X-Lite release 1104o stamp 56125 Content-Length: 0 44 SIP Pocket Guide

200 OK #13
Request Line SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.16.140:5060;branch=z9hG4bK85zf7828d7482d Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754zf8728d218024a502-1---d8754z;received=192.168.16.105;rport=44646 Record-Route: <sip:192.168.16.140;lr Contact: <sip:9103682854@192.168.16.102:56912 Headers To: "Jane Doe"<sip:9103682854@192.168.16.140>;tag=f63e876 From: "John Smith"<sip:9103683957@192.168.16.140>;tag=5c06d71 Call-ID: Yzk2ZjQ5YzJhOWVmNTJmNjk5MWMxYmMxMmJiNzQwOTg. CSeq: 3 BYE User-Agent: X-Lite release 1104o stamp 56125 Content-Length: 0

200 OK #14
Request Line SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754zf8728d218024a502-1---d8754z;received=192.168.16.105;rport=44646 Contact: <sip:9103682854@192.168.16.102:56912 To: "Jane Doe"<sip:9103682854@192.168.16.140>;tag=f63e876c From: "John Smith"<sip:9103683957@192.168.16.140>;tag=5c06d71d Call-ID: Yzk2ZjQ5YzJhOWVmNTJmNjk5MWMxYmMxMmJiNzQwOTg. CSeq: 3 BYE Max-Forwards: 70 Record-Route: <sip:192.168.16.140;lr User-Agent: X-Lite release 1104o stamp 56125 Content-Length: 0

Headers

NOTES:

SIP Pocket Guide

45

REGISTRATION PROCESS

NOTES:

46

SIP Pocket Guide

REGISTRATION MESSAGES Register #1


Request Line REGISTER sip:192.168.16.140 SIP/2.0 Via: SIP/2.0/UDP 192.168.16.102:10658;branch=z9hG4bK-d8754zf64d606d85428835-1---d8754z-;rport Max-Forwards: 70 Contact: <sip:9103682854@192.168.16.102:10658;rinstance=c1bbc08e764e1a59> To: Jane Doe"<sip:9103682854@192.168.16.140> Headers From: Jane Doe"<sip:9103682854@192.168.16.140>;tag=74215226 Call-ID: MjNmYjBlZjhiODJiZmI4MjdhMzViNmIyMDFkNzk5MzQ. CSeq: 1 REGISTER Expires: 3600 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO User-Agent: X-Lite release 1104o stamp 56125 Content-Length: 0

402 Unauthorized #2
Request Line SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 192.168.16.102:10658;branch=z9hG4bK-d8754zf64d606d85428835-1---d8754z;received=192.168.16.102;rport=10658 To: Jane Doe"<sip:9103682854@192.168.16.140> From: Jane Doe"<sip:9103682854@192.168.16.140>;tag=74215226 Headers Call-ID: MjNmYjBlZjhiODJiZmI4MjdhMzViNmIyMDFkNzk5MzQ. CSeq: 1 REGISTER WWW-Authenticate: Digest realm="192.168.16.140",qop="auth", nonce="b409d25d445aa41753167c2d96645524",opaque="",stale=F ALSE Server: TekSIP/v2.7 Content-Length: 0

NOTES:

SIP Pocket Guide

47

REGISTRATION MESSAGES Register #3


Request Line

(Continued)

REGISTER sip:192.168.16.140 SIP/2.0 Via: SIP/2.0/UDP 192.168.16.102:10658;branch=z9hG4bK-d8754z8c733834e54a867d-1---d8754z-;rport Max-Forwards: 70 Contact: <sip:9103682854@192.168.16.102:10658;rinstance=c1bbc08e764e1a59> To: Jane Doe"<sip:9103682854@192.168.16.140> From: Jane Doe"<sip:9103682854@192.168.16.140>;tag=74215226 Call-ID: MjNmYjBlZjhiODJiZmI4MjdhMzViNmIyMDFkNzk5MzQ. CSeq: 2 REGISTER Expires: 3600 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO User-Agent: X-Lite release 1104o stamp 56125 [truncated] Authorization: Digest username="9103682854",realm="192.168.16.140",nonce="b409d25d445 aa41753167c2d96645524", uri="sip:192.168.16.140",response="3017cba4e1a09d6deafdbb876cf f13ca",cnonce= "6def0392c6f264bc88216693693ec23a",nc=00000001,qo Content-Length: 0

Headers

NOTES:

48

SIP Pocket Guide

REGISTRATION MESSAGES 200 OK #4


Status Line SIP/2.0 200 OK

(Continued)

Via: SIP/2.0/UDP 192.168.16.102:10658;branch=z9hG4bK-d8754z8c733834e54a867d-1---d8754z;received=192.168.16.102;rport=10658 Max-Forwards: 69 Contact: <sip:9103682854@192.168.16.102:10658; rinstance=c1bbc08e764e1a59> To: Jane Doe"<sip:9103682854@192.168.16.140>;tag=43a8aa5e From: Jane Doe"<sip:9103682854@192.168.16.140>;tag=74215226 Headers Call-ID: MjNmYjBlZjhiODJiZmI4MjdhMzViNmIyMDFkNzk5MzQ. CSeq: 2 REGISTER Allow: INVITE, BYE, CANCEL, OPTIONS, ACK, REGISTER, SUBSCRIBE, PUBLISH Server: TekSIP/v2.7 Date: Fri, 30 Jul 2010 15:19:23 GMT Allow-Events: presence, presence.winfo, message-summary Expires: 3600 Content-Length: 0

ADDITIONAL SAMPLE MESSAGES Cancel


Request Line CANCEL sip:9103683957@192.168.16.140 SIP/2.0 From:sip:9193682854@192.168.16.124;tag=206c220a To:"John Smith" <sip:9103683957@192.168.16.140> Call-ID:89ba95c0a00025ac4c52f44c62f6a CSeq:32042 CANCEL Headers Via:SIP/2.0/UDP 192.168.16.124;branch=z9hG4bK5vz9fc21 Contact:<sip:9193682854@192.168.16.124> Max-Forwards:70 User-Agent:Whistle/iPhone 1.11 (VailSIP 20100330) Content-Length:0

NOTES:

SIP Pocket Guide

49

ADDITIONAL SAMPLE MESSAGES Subscribe


Request Line

(Continued)

SUBSCRIBE sip:9103683957@192.168.16.140 SIP/2.0 Via: SIP/2.0/UDP 192.168.16.105:35948;branch=z9hG4bK-d8754z286c717328298f0b-1---d8754z-;rport Max-Forwards: 70 Contact: <sip:9103683957@192.168.16.105:35948 To: "John Smith"<sip:9103683957@192.168.16.140> From: "John Smith"<sip:9103683957@192.168.16.140>;tag=c178351b

Headers

Call-ID: MmM3OTdjY2EzYjhjM2M3NGNiMmFlYTlmMGM4NDNkYzQ. CSeq: 1 SUBSCRIBE Expires: 300 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO User-Agent: X-Lite release 1104o stamp 56125 Event: message-summary Content-Length: 0

302 Moved Temporarily


Status Line SIP/2.0 302 Moved Temporarily Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754z7608a74aaf06f27b-1---d8754z;received=192.168.16.105;rport=44646 To: "Operator"<sip:0@192.168.16.140 From: "John Smith"<sip:9103683957@192.168.16.140>;tag=ba2caa50 Call-ID: MTZhOWZkMTNmMjMwODZiMzUwNzlhOTIzMDUyNjAwMGY. CSeq: 1 INVITE Contact: <sip:TekIVR@192.168.16.140 Server: TekSIP/v2.7 Content-Length: 0

Headers

NOTES:

50

SIP Pocket Guide

ADDITIONAL SAMPLE MESSAGES 401 Unauthorized


Status Line SIP/2.0 401 Unauthorized

(Continued)

Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK- d8754z57270431f4098616-1---d8754z;received=192.168.16.105;rport=44646 To: "John Smith"<sip:9103683957@192.168.16.140> From: "John Smith"<sip:9103683957@192.168.16.140>;tag=80131533 Headers Call-ID: NGU3ODEyMjZmMTA2NmVjMWNhMTgxYzJmODY2MTcyYTg. CSeq: 1 SUBSCRIBE WWW-Authenticate: Digest realm="192.168.16.140", qop="auth", nonce="722568b6b454974a153a48f363aa21a8", opaque="", stale=FALSE Server: TekSIP/v2.7 Content-Length: 0

403 Forbidden
Status Line SIP/2.0 403 Forbidden Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK- d8754z8c2d83501a781052-1---d8754z;received=192.168.16.105;rport=44646 To: "John Smith"<sip:9103683957@192.168.16.140> Headers From: "John Smith"<sip:9103683957@192.168.16.140>;tag=932b104c Call-ID: ZWFlMjEzZTk2NGI0MGQzM2NmM2JjYTczYTQyYzE1Mzc. CSeq: 2 SUBSCRIBE Server: TekSIP/2.7 Content-Length: 0

NOTES:

SIP Pocket Guide

51

ADDITIONAL SAMPLE MESSAGES 404 Unknown User Account


Status Line

(Continued)

SIP/2.0 404 Unknown user account Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754ze937b55f7a01eb67-1---d8754z;received=192.168.16.105;rport=44646 To: "Operator"<sip:0@192.168.16.140> From: "John Smith"<sip:9103683957@192.168.16.140>;tag=ba2caa50 Call-ID: MTZhOWZkMTNmMjMwODZiMzUwNzlhOTIzMDUyNjAwMGY. CSeq: 2 INVITE Server: TekSIP/v2.7 Content-Length: 0

Headers

407 Proxy Authentication Required


Status Line SIP/2.0 407 Proxy Authentication Required Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754z436c29051a613325-1---d8754z;received=192.168.16.105;rport=44646 To: "Jane Doe"<sip:9103682854@192.168.16.140> From: "John Smith"<sip:9103683957@192.168.16.140>;tag=f432004c Headers Call-ID: MzZlNWZkMWQ3MmYyMTBkNGJmZTYyYzAzNDRjZGNjZTY. CSeq: 1 INVITE Proxy-Authenticate: Digest realm="192.168.16.140", qop="auth", nonce="2809403cbd9d849c8193a3c1945100bb", opaque="", stale=FALSE Server: TekSIP/v2.7 Max-Forwards: 70 Content-Length: 0

NOTES:

52

SIP Pocket Guide

ADDITIONAL SAMPLE MESSAGES 408 Request Timeout


Status Line SIP/2.0 408 Request Timeout

(Continued)

Via: SIP/2.0/UDP 192.168.16.140:5060;branch=z9hG4bK85zc6b38d7423a3;received=208.69.225.66 Via: SIP/2.0/UDP 192.168.16.105:44646;branch=z9hG4bK-d8754zc263ba338c372e5b-1---d8754z;received=192.168.16.105;rport=44646 To: "15402042001"<sip:15402042001@sip.callwithus.com>;tag= 8e6t8arXaZr8m From: "John Smith"<sip:9103683957@sip.callwithus.com>;tag=61163c00 Call-ID: OWY2N2QzODU5OGZhNjkzNmE4MmE3YjcyOTA3ZDM4YTQ. CSeq: 3 BYE Server: CWU SIP GW Content-Length: 0

Headers

481 Transaction Does Not Exist


Status Line SIP/2.0 481 Call/Transaction Does Not Exist Via: SIP/2.0/UDP 192.168.16.140:5060;branch=z9hG4bK-pOuOgO6t Via: SIP/2.0/UDP 192.168.16.124;branch=z9hG4bKpgOOu6Ot; received=192.168.16.124 To: "John Smith"<sip:9103683957@192.168.16.140>;tag=9317f75f Headers From: <sip:3333@192.168.16.140>;tag=2f488d9b Call-ID: 9b5a99ed1f38aabb4c52f472c4872 CSeq: 26145 BYE Accept-Language: en Content-Length: 0

487 Request Terminated


Status Line SIP/2.0 487 Request Terminated Via: SIP/2.0/UDP 192.168.16.140:5060;branch=z9hG4bK-5zf2v9c1 Via: SIP/2.0/UDP 192.168.16.124;branch=z9hG4bK5vz9fc21;received=192.168.16.124 To: "John Smith"<sip:9103683957@192.168.16.140>;tag=fe3ce576 Headers From: <sip:3333@192.168.16.140>;tag=206c220a Call-ID: 89ba95c0a00025ac4c52f44c62f6a CSeq: 32044 INVITE User-Agent: X-Lite release 1104o stamp 56125 Content-Length: 0

SIP Pocket Guide

53

GLOSSARY OF SIP RELATED TERMS


DHCP _____________________________________________________
Dynamic Host Configuration Protocol

DNS ______________________________________________________
Domain Name System

IETF ______________________________________________________
Internet Engineering Task Force

IP ______________________________________________________________
Internet Protocol

PPP ______________________________________________________
Point-to-Point Protocol

PSTN _____________________________________________________
Public Switched Telephone Network

RFC ______________________________________________________
Request for Comments

RTP_______________________________________________________
Real-time Transport Protocol

RTSP _____________________________________________________
Real-time Streaming Protocol

SCTP _____________________________________________________
Stream Control Transmission Protocol

SDP ______________________________________________________
Session Description Protocol

SIP _______________________________________________________
Session Initiation Protocol

TCP ______________________________________________________
Transmission Control Protocol

UA________________________________________________________
User Agent

UAC ______________________________________________________
User Agent Client

UAS ______________________________________________________
User Agent Server

UDP ______________________________________________________
User Datagram Protocol

URI _______________________________________________________
Uniform Resource Identifier

54

SIP Pocket Guide

REFERENCES
RFC 2976 RFC 3261 RFC 3262 RFC 3265 RFC 3311 RFC 3312 RFC 3313 RFC 3323 RFC 3325 RFC 3326 RFC 3327 RFC 3329 RFC 3372 RFC 3398 RFC 3428 RFC 3455 RFC 3515 RFC 3578 RFC 3588 RFC 3603 The SIP INFO Method SIP: Session Initiation Protocol Reliability of Provisional Responses in Session Initiation Protocol (SIP) Session Initiation Protocol (SIP) - Specific Event Notification The Session Initiation Protocol (SIP) UPDATE Method Integration of Resource Management and Session Initiation Protocol (SIP) Private Session Initiation Protocol (SIP) Extensions for Media Authorization A Privacy Mechanism for the Session Initiation Protocol (SIP) Private Extensions to the Session Initiation Protocol (SIP) for Asserted Identity within Trusted Networks The Reason Header Field for the Session Initiation Protocol (SIP) Session Initiation Protocol (SIP) Extension Header Field for Registering Non-Adjacent Contracts Security Mechanism Agreement for the Session Initiation Protocol (SIP) Session Initiation Protocol for Telephones (SIP-T): Context and Architectures Integrated Services Digital Network (ISDN) User Part (ISUP) to Session Initiation Protocol (SIP) Mapping Session Initiation Protocol (SIP) Extension for Instant Messaging Private Header (P-Header) Extensions to the Session Initiation Protocol (SIP) for the 3rd-Generation Partnership Project (3GPP) The Session Initiation Protocol (SIP) Refer Method Mapping of Integrated Services Digital Network (ISDN) User Part (ISUP) Overlap Signaling to the Session Initiation Protocol (SIP) Diameter Base Protocol Private Session Initiation Protocol (SIP) Proxy-to-Proxy Extensions for Supporting the PacketCable Distributed Call Signaling Architecture Real Time Control Protocol (RTCP) Attribute in Session Description Protocol (SDP)

RFC 3605

SIP Pocket Guide

55

REFERENCES
RFC 3608 RFC 3841 RFC 3891 RFC 3892 RFC 3903 RFC 3911 RFC 4028 RFC 4244 RFC 4354

(Continued)

Session Initiation Protocol (SIP) Extension Header Field for Service Route Discovery During Registration Caller Preferences for the Session Initiation Protocol (SIP) The Session Initiation Protocol (SIP) Replaces Header The Session Initiation Protocol (SIP) Referred-By Mechanism Session Initiation Protocol (SIP) Extension for Event State Publication The Session Initiation Protocol (SIP) Join Header Session Timers in the Session Initiation Protocol (SIP) An Extension to the Session Initiation Protocol (SIP) for Request History Information A Session Initiation Protocol (SIP) Event Package and Data Format for Various Settings in Support for the Push-to-Talk over Cellular (PoC) Service Communications Resource Priority for the Session Initiation Protocol (SIP) The Session Initiation Protocol (SIP) P-User-Database PrivateHeader (P-Header) Enhancements for Authenticated Identify Management in the Session Initiation Protocol (SIP) Suppression of Session Initiation Protocol (SIP) REFER Method Implicit Subscription Request Authorization through Dialog Identification in the Session Initiation Protocol (SIP) SDP: Session Description Protocol The P-Answer-State Header Extension to the Session Initiation Protocol for the Open Mobile Alliance Push-to-Talk over Cellular The Session Intiation Protocol (SIP) P-Profile-Key Private Header (P-Header) Private Header (P-Header) Extension to the Session Initiation Protocol (SIP) for Authorization of Early Media Rejecting Anonymous Requests in the Session Initiation Protocol (SIP) A Framework for Consent-Based Communications in the Session Initiation Protocol (SIP)

RFC 4412 RFC 4457 RFC 4474 RFC 4488 RFC 4538 RFC 4566 RFC 4964 RFC 5002 RFC 5009 RFC 5079 RFC 5360

56

SIP Pocket Guide

REFERENCES
RFC 5373 RFC 5503

(Continued)

Requesting Answering Modes for the Session Initiation Protocol (SIP) Private Session Initiation Protocol (SIP) Proxy-to-Proxy Extensions for Supporting the PacketCable Distributed Call Signaling Architecture The Use of the SIPS URI Scheme in the Session Initiation Protocol (SIP) Updates to Asserted Identify in the Session Initiation Protocol (SIP) The Internet Engineering Task Force: www.ietf.org Johnston, Alan B., SIP Understanding the Session Initiation Protocol (2009, ARTECH HOUSE Norwood MA) Camarillo, Gonzalo, SIP Demystified (2002, McGraw-Hill) Sinnreich, Henry & Johnston, Alan B. Internet Communications Using SIP (2006, Wiley Publishing, Indianapolis, IN) Jenkins, Thomas W. SIP to ISUP Mapping course (2004, Center Point Consulting, Inc., Swansboro, NC) Jenkins, Thomas W. SIP Protocol course (2004, Center Point Consulting, Inc., Swansboro, NC)

RFC 5630 RFC 5876

SIP Pocket Guide

57

NOTES:

58

SIP Pocket Guide

S-ar putea să vă placă și