\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Bell.Labs (Steve Fowlkes)} \pdfinfo{ /Title (the-session-initiation-protocol.pdf) /Creator (Cheatography) /Author (Bell.Labs (Steve Fowlkes)) /Subject (The Session Initiation Protocol Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{A31010} \definecolor{LightBackground}{HTML}{F9F0F0} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{The Session Initiation Protocol Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Bell.Labs (Steve Fowlkes)} via \textcolor{DarkBackground}{\uline{cheatography.com/20709/cs/3607/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Bell.Labs (Steve Fowlkes) \\ \uline{cheatography.com/steve-fowlkes} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 4th March, 2015.\\ Updated 13th May, 2016.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{SIP CALL FLOW}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{BASIC SIP CALL SCENARIO}} \newline % Row Count 1 (+ 1) {\bf{1.}} The UE sends a request or "INVITE" to setup session with Proxy-CSCF \newline % Row Count 3 (+ 2) {\bf{2.}} The Proxy-CSCF forwards this request to the Serving-CSCF. \newline % Row Count 5 (+ 2) {\bf{3.}} The request is routed to the application servers found in the subscribers profile for service handling. \newline % Row Count 8 (+ 3) {\bf{4.}} After originating services have been applied the Serviing-CSCF queries DNS (ENUM) for the address of the Interrogating-CSCF of the called UE and fowards the request to that Interrogating-CSCF. \newline % Row Count 12 (+ 4) {\bf{5.}} The I-CSCF then gets the address of the responsible S-CSCF from the HSS, and forwards the request to it. \newline % Row Count 15 (+ 3) {\bf{6.}} The request is given to the application server that is in the subscribers HSS. \newline % Row Count 17 (+ 2) {\bf{7.}} All terminating services are applied from the application server, the call is forwarded to the end users P-CSCF. \newline % Row Count 20 (+ 3) {\bf{8.}} Request forwarded to terminating UE, and a voice path is established.% Row Count 22 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{SIP Requests}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{REGISTER}} If user device is not registered, then this will be the first request sent. The caller's contact URI (sip:bob@google.com) will be bound to an Address of Record in the Proxy-CSCF \newline % Row Count 4 (+ 4) {\bf{INVITE}} If user device is already registered, then this will be the first request sent. Indicates a client is being invited to participate in a call session. Sent to the Proxy-CSCF, which forwards the request to the local S-CSCF, which in turn sends it to the 5420 Converged Telephony Server. It checks it's subscriber database for the called party and eventually passes the INVITE to the terminating S-CSCF \newline % Row Count 13 (+ 9) {\bf{ACK}} An acknowledgement packet to confirm prior message was received. \newline % Row Count 15 (+ 2) {\bf{BYE}} Terminates a call and can be sent by either the caller or the callee. \newline % Row Count 17 (+ 2) {\bf{OPTIONS}} Queries the capabilities of connecting servers. \newline % Row Count 19 (+ 2) {\bf{SUBSCRIBE}} Indicates that a user wishes to hear about changes in an application service. Examples of such services include automatic \newline % Row Count 22 (+ 3) callback services (based on device state events), buddy lists (based on user presence events), message waiting indications (based on mailbox state change events). Ex:"sip:steve@ALU.com" would be an appropriate URI to subscribe to for my presence state; it would also be an appropriate URI to subscribe to the state of my voice mailbox. To distinguish which, subscribers MUST include exactly one "Event" header in SUBSCRIBE requests. \newline % Row Count 31 (+ 9) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{SIP Requests (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{NOTIFY}} The updates given to the subscribed user device of any changes or events that happened to the service that they are subscribed to.% Row Count 3 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{The Session Initiation Protocol}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{SIP}} Ferries the signaling portion of the call setup and teardown \newline % Row Count 2 (+ 2) {\bf{RTP}} Ferries the data/voice portion of the user call session \newline % Row Count 4 (+ 2) {\bf{MEGACO}} is used with SIP to controlling gateway functions to the PSTN \newline % Row Count 6 (+ 2) SIP Return Codes \newline % Row Count 7 (+ 1) {\bf{1xx-}} Provisioning... \newline % Row Count 8 (+ 1) {\bf{2xx-}} Action was successful \newline % Row Count 9 (+ 1) {\bf{3xx-}} Redirect to another server \newline % Row Count 10 (+ 1) {\bf{4xx-}} Client error, bad syntax of request \newline % Row Count 11 (+ 1) {\bf{5xx-}} Server error, couldn't fulfill request \newline % Row Count 12 (+ 1) {\bf{6xx-}} Global Failure \newline % Row Count 13 (+ 1) *The IMS architecture is built around using SIP. \newline % Row Count 14 (+ 1) *SIP supports name mapping and redirection, this allows users to be found and reached from different varying locations. \newline % Row Count 17 (+ 3) *SIP uses a syntax very similar to HTTP. \newline % Row Count 18 (+ 1) *SIP is not as robust as it's rival protocol H.323 \newline % Row Count 20 (+ 2) *SIP often is implemented with SDP to fill in gaps.% Row Count 22 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Examples of SIP Services}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Basic Unassisted SIP Services:}} \newline % Row Count 1 (+ 1) Many services listed here, make use of the SUBSCRIBE/NOTIFY requests. \newline % Row Count 3 (+ 2) *Call Holding \newline % Row Count 4 (+ 1) *Auto-Redial \newline % Row Count 5 (+ 1) *Find-Me \newline % Row Count 6 (+ 1) More advanced features are assisted by an application server. The 5420 Converged Telephony Server is one such application server. \newline % Row Count 9 (+ 3) *Call Holding w/ Music \newline % Row Count 10 (+ 1) *Three Way Call \newline % Row Count 11 (+ 1) *Six-Way Call \newline % Row Count 12 (+ 1) *Call history \newline % Row Count 13 (+ 1) *Voicemail \newline % Row Count 14 (+ 1) *VPN Dialing \newline % Row Count 15 (+ 1) *Authorization for conference calls \newline % Row Count 16 (+ 1) *"Visitor Desk" \newline % Row Count 17 (+ 1) *RingBack Tones \newline % Row Count 18 (+ 1) *Caller Name/ID \newline % Row Count 19 (+ 1) *Call barring \newline % Row Count 20 (+ 1) *Presence Status% Row Count 21 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Common IMS Acronyms / Terms}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{UE}} User-Endpoint (the device used to place the call) \newline % Row Count 2 (+ 2) {\bf{P-CSCF}} Proxy Call Session Control Function First point of contact in IMS call flow. May provide TLS or IPSec security. \newline % Row Count 5 (+ 3) {\bf{S-CSCF}} Serving Call Session Control Function It is a SIP server, but performs session control too. It provides routing services, typically using Electronic Numbering (ENUM). Also it handles SIP registrations, which allows it to bind the user's location and the SIP address \newline % Row Count 11 (+ 6) {\bf{I-CSCF}} Interrogating Call Session Control Function It queries the HSS to retrieve the address of the proper S-CSCF and assign it to a user performing SIP registration.Also forwards SIP request or response to the S-CSCF. \newline % Row Count 16 (+ 5) {\bf{HSS}} Home Subscriber Server is a master database. It contains the subscription information like subscriber profiles, performs authentication and authorization of the user, and provides information about the subscriber's location and IP information. \newline % Row Count 22 (+ 6) {\bf{URI}} Uniform Resource Identifier. A string of characters used to identify a caller and the resource. It can be digits, such as tel:+1-555-123-4567 or alphanumeric, such as sip:john.doe@example.com \newline % Row Count 27 (+ 5) {\bf{Home Network}} The subscribers native, original provider's network \newline % Row Count 29 (+ 2) {\bf{Visited Network}} The network that the subscriber is using while away from the home network. \newline % Row Count 31 (+ 2) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Common IMS Acronyms / Terms (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{B2BUA}} A back-to-back user agent could be a physical server or software that receives SIP requests. It can then send back the proper responses. It then acts as a user agent device and generates requests to be sent to the real remote user agent device. Different than a proxy cscf in that the B2BUA maintains the complete call state and participates in all call requests. Provides accurate call accounting, pre-paid rating and billing, failover call routing \newline % Row Count 10 (+ 10) {\bf{AoR}} An address-of-record, represents an identity of the user, generally a long-term identity, and it does not have a dependency on any device. Users can move between devices or even be associated with multiple devices at on time while retaining the same address-of-record. A simple URI, generally of the form sip:steve@example.com, is used for an address-of-record.% Row Count 18 (+ 8) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}