\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{seashore} \pdfinfo{ /Title (cna2.pdf) /Creator (Cheatography) /Author (seashore) /Subject (CNA2 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}{FF9E1F} \definecolor{LightBackground}{HTML}{FFF8F1} \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{CNA2 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{seashore} via \textcolor{DarkBackground}{\uline{cheatography.com/31325/cs/9478/}}} \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}seashore \\ \uline{cheatography.com/seashore} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 7th January, 2017.\\ 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{1.69218 cm} x{3.28482 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Core SIP}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{WebRTC}} & A new specification that promises to change communication across the web yet it lacks a signaling protocol. \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} {\bf{SIP benefit 1}} & Services on offers - Offers voicemail, video, call conferencing, IM, and SMS all for a small cost and sometimes NO cost to user. \tn % Row Count 10 (+ 5) % Row 2 \SetRowColor{LightBackground} {\bf{SIP benefit 2}} & Mobility - Presence based services that allow users to control what is seen about them and control over where calls are routed based on their presence status \tn % Row Count 17 (+ 7) % Row 3 \SetRowColor{white} {\bf{Why SIP?}} & Price - drastically reduce LD costs. Calls are carried across the Internet or other networks for most of the journey. \tn % Row Count 22 (+ 5) % Row 4 \SetRowColor{LightBackground} & Flexibility - in adding to or removing trunks as you need them without hardware changes \tn % Row Count 26 (+ 4) % Row 5 \SetRowColor{white} & Features - help facilitate multiple forms of communication such as video and IM \tn % Row Count 30 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.69218 cm} x{3.28482 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Core SIP (cont)}} \tn % Row 6 \SetRowColor{LightBackground} {\bf{What is SIP?}} & Session Initiation Protocol \tn % Row Count 2 (+ 2) % Row 7 \SetRowColor{white} & Signalling protocol used for controlling multi-media sessions \tn % Row Count 5 (+ 3) % Row 8 \SetRowColor{LightBackground} & Can setup, modify, and tear down sessions \tn % Row Count 7 (+ 2) % Row 9 \SetRowColor{white} & Helps establish user presence and locate users when using mobile and desktop \tn % Row Count 10 (+ 3) % Row 10 \SetRowColor{LightBackground} {\bf{IETF RFC 3261}} & SIP is an application layer control protocol \tn % Row Count 12 (+ 2) % Row 11 \SetRowColor{white} & Can establish, modify, and terminate multimedia sessions (conferences) such as Internet telephony calls \tn % Row Count 16 (+ 4) % Row 12 \SetRowColor{LightBackground} & Can invite participants to already existing sessions, such as multicast conferences. \tn % Row Count 20 (+ 4) % Row 13 \SetRowColor{white} & Media can be added to and removed from an existing session \tn % Row Count 23 (+ 3) % Row 14 \SetRowColor{LightBackground} & SIP transparently supports name mapping and redirection services - users can maintain a single externally visible identifier regardless of these network location \tn % Row Count 30 (+ 7) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.69218 cm} x{3.28482 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Core SIP (cont)}} \tn % Row 15 \SetRowColor{LightBackground} {\bf{RFC}} & Request for Comments \tn % Row Count 1 (+ 1) % Row 16 \SetRowColor{white} & - idea for the Internet \tn % Row Count 2 (+ 1) % Row 17 \SetRowColor{LightBackground} & - crate a draft doc \tn % Row Count 3 (+ 1) % Row 18 \SetRowColor{white} {\emph{IETF}} & - submit it to Internet Engineering Task Force \tn % Row Count 5 (+ 2) % Row 19 \SetRowColor{LightBackground} & - proposed standard \tn % Row Count 6 (+ 1) % Row 20 \SetRowColor{white} & - draft standard \tn % Row Count 7 (+ 1) % Row 21 \SetRowColor{LightBackground} & - Internet standard \tn % Row Count 8 (+ 1) % Row 22 \SetRowColor{white} {\bf{SIP based on HTTP}} & Is a textual based protocol, written in ASCII format \tn % Row Count 10 (+ 2) % Row 23 \SetRowColor{LightBackground} & It is based on the client-server model \tn % Row Count 12 (+ 2) % Row 24 \SetRowColor{white} {\emph{Client-server model}} & {\emph{requests}} from a client device are sent to a server device which then {\emph{responds}} to the client \tn % Row Count 16 (+ 4) % Row 25 \SetRowColor{LightBackground} & This request invokes a {\emph{method}} on the server which normally makes something happen \tn % Row Count 20 (+ 4) % Row 26 \SetRowColor{white} {\bf{Working group}} & Are created by the Internet Engineering Steering Group to work on limited set of tasks described in its charter and will normally be closed one the work described in its charter is finished. \tn % Row Count 28 (+ 8) \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 on the OSI chart}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1476573506_sip_on_osi.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{SIP lives at the application layer above its transport protocol UDP that runs over IP. SIP carries SDP messages in its body to help describe the audio and media components of a session. \newline \newline RTP (real time protocol) deliver the media after DNS has found out where the destination is} \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 User Agents}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1476574081_sip_agents.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{A UAC is an application or device that acts on behalf of a user. The UAC will initiate a call and the UAS will receive the call. \newline \newline UAC are also UAS so that they can initiate and receive calls.} \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 HEADER - 200 Response}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1477439827_Picture1.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Via headers are inserted by servers into requests to detect loops and to allow responses to find their way back to the client 'VIA' the server.} \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}{Simple Call Session Setup}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1476575547_session.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{The user dial a destination number, the UAC will send an INVITE message to the destination device. If the destination device answers the call it also returns a '200 OK' message to say that this has happened. The caller will then acknowledge this event. Voice, video, or whatever can pass between the two devices. \newline \newline When one device hangs up, it sends a 'BYE" message which is responded to with a '200 OK' message.} \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 System Architecture}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1476576281_architecture.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{User Agents - SIP VoIP phone, wireless PDA, softphone \newline \newline SIP Proxy - assist in the Discovery and Setup of the sessions between the UA \newline \newline SIP Registrar - UA use the Register their current location on a Network \newline \newline SIP Location Server - contains the registered location info. Usually the Registrar and Location services run on the same server. \newline \newline SIP gateway - translates Signaling and probably media as well so that SIP devices can communicate with legacy devices.} \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}{Mini Quizlet}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{What is the 1st SIP message of Method sent out when a SIP US wants to setup a call with another SIP device?} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}INVITE} \tn % Row Count 4 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{URL / URI}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1476577809_2iD7U.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.94103 cm} x{3.03597 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{URI/ URL}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{URI}} & is a string that identifies some kind of resources \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} & \seqsplit{graham@vocaletraining.com} \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} & URI is an identifier, an email address but it does not tell you how to move emails to this address \tn % Row Count 10 (+ 5) % Row 3 \SetRowColor{white} & General form is User@Host \tn % Row Count 12 (+ 2) % Row 4 \SetRowColor{LightBackground} & User = name, telephone number \tn % Row Count 14 (+ 2) % Row 5 \SetRowColor{white} & Host = Domain name, IP address \tn % Row Count 16 (+ 2) % Row 6 \SetRowColor{LightBackground} {\emph{Main types of URI}} & Service, Device, and User \tn % Row Count 18 (+ 2) % Row 7 \SetRowColor{white} & - With a Service, the URI could point to a conferencing unit that SIP users can reference and join \tn % Row Count 23 (+ 5) % Row 8 \SetRowColor{LightBackground} & - With a Device, the URI represents a single device or app \tn % Row Count 26 (+ 3) % Row 9 \SetRowColor{white} & - With a User, the URI can be static. This URI or AOR - address of record will map to as many other SIP URIs as the user wants or needs \tn % Row Count 32 (+ 6) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.94103 cm} x{3.03597 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{URI/ URL (cont)}} \tn % Row 10 \SetRowColor{LightBackground} {\bf{URL}} & is a form of a URI that not only identifies a resource but tells you how to reach the resource \tn % Row Count 4 (+ 4) % Row 11 \SetRowColor{white} & http://www.google.com \tn % Row Count 5 (+ 1) % Row 12 \SetRowColor{LightBackground} & URL tells you the address of the web server and that a HTTP request should be sent to retrieve a web page \tn % Row Count 10 (+ 5) % Row 13 \SetRowColor{white} {\bf{Goal of SIP addressing}} & To provide all users with a single URI, which when used in conjunction with DNS will reveal all the other info relating to user or agent, such as email address, voice, data, video capabilities \tn % Row Count 18 (+ 8) \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 device start up}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1476581177_startup.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{When a SIP device starts up it sends its current address and location details to its Registrar server. This server then updates the users location in the location server. \newline \newline Once the client's details are updated, they can be contacted using their published address which resolves to their current IP address.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.24425 cm} x{3.73275 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Registration}} \tn % Row 0 \SetRowColor{LightBackground} Feature types & When a SIP UA registers it ell the Registrar about its feature capabilities. This is useful info for SIP devices wanting to make contact with the UA \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} RFC 3840 & whole list of features \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.33919 cm} x{2.63781 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{SIP Proxy Server}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Proxy Server}} & forwards requests to the next server after working out which is the next server to talk to \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} & It will interpret a request message and if necessary rewrite the message before forwarding it. \tn % Row Count 10 (+ 5) % Row 2 \SetRowColor{LightBackground} & It can issue both requests and responses so it is in effect a SIP client and a server. \tn % Row Count 15 (+ 5) % Row 3 \SetRowColor{white} & It can fork the incoming request to multiple locations if someone has multiple location registrations \tn % Row Count 20 (+ 5) % Row 4 \SetRowColor{LightBackground} Stateful Proxy & remembers incoming requests and outgoing requests \tn % Row Count 23 (+ 3) % Row 5 \SetRowColor{white} & This keeps 'state' info for the entire duration of a SIP session. This is useful for implementing extra services such as call forward on busy or no answer. \tn % Row Count 31 (+ 8) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.33919 cm} x{2.63781 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{SIP Proxy Server (cont)}} \tn % Row 6 \SetRowColor{LightBackground} Stateless Proxy & forgets all information once an outgoing request is generated. \tn % Row Count 3 (+ 3) % Row 7 \SetRowColor{white} & This keeps a no 'state informations and as soon as it has helped out a UA it forgets everything about the transaction. \tn % Row Count 9 (+ 6) % Row 8 \SetRowColor{LightBackground} {\bf{Why do you need a Proxy Server?}} & sometimes only by contacting a proxy server SIP signalling actually be allowed to leave a corporate network \tn % Row Count 15 (+ 6) % Row 9 \SetRowColor{white} & may also be acting as the corporate firewall \tn % Row Count 18 (+ 3) % Row 10 \SetRowColor{LightBackground} {\bf{UA proxy details}} & a UA gets its proxy details either by manual configuration or via DHCP \tn % Row Count 22 (+ 4) % Row 11 \SetRowColor{white} Transaction stateful & This keeps all state info on all transactions that are pending. Once a session is established, the proxy forgets the state info. \tn % Row Count 29 (+ 7) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Mini Quizlet}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{A 'Stateful Proxy' forgets incoming and outgoing SIP requests once they have been processed} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}false} \tn % Row Count 3 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.34379 cm} x{3.63321 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{DHCP and SIP}} \tn % Row 0 \SetRowColor{LightBackground} DHCP server & can send proxy details in either the DNS or IP address format in DHCP option 120 \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} DHCP option 120 & The option is used to provide SIP server IP address or FQDN to SIP client \tn % Row Count 6 (+ 3) \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 Proxy - Trapezoid model}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1476585037_trapaz.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{100 trying - progress of the call setup \newline 180 ringing - when the destination starts ringing \newline 200 Ok - message is sent on device pick-up which is relayed and followed by an acknowledgement. \newline BYE - when one device hangs up} \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 server in proxy mode}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{In proxy mode, all SIP messaging goes via the Proxy} \tn % Row Count 2 (+ 2) \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 server in Proxy Redirect Mode}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Once the proxy finds the 'called to' location from the location server, it sends the contact details to the calling device. The INVITE is then reissued with my specific contact details 'directly' to the called softphone.} \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{The proxy is doing less work with this setup.} \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Mini Quizlet}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{What is the SIP 'Response code' that signifies 'Ringing'?} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}180} \tn % Row Count 3 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Location Server}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{A location server is used by a SIP proxy servor or redirect server to obtain information about a called party's possible location(s)} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Will have a database to hold location info for the SIP UA and this is kept up to date via the Registrar service this is processing Register and Re-Register messages from clients. The SIP proxy will then use the Location service to help find the current location details of the destination SIP URI in a SIP INVITE mesage} \tn % Row Count 10 (+ 7) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Location Server - components}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1476590794_comp.jpg}}} \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}{Location Server - Information sources}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1476591281_sources.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Sources - \newline Local database provides as part of the location server product \newline DNS - it will store the location details of other servers in other domains that the location server may need to contact \newline Microsoft Active directory that uses LDAP protocol} \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}{Location Server}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1476592617_Picture13.jpg}}} \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}{Configuration scenarios}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1476620579_Picture14.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{1. Get config via TFTP file on boot up \newline 2. Get config via config server as defined in RFC 6011 \newline 3. Manual configuration.} \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 basic elements that all clients need}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1476621061_Picture15.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{SIP registration server hostname /IP \newline DNS server address if using DNS names for SIP registration \newline SIP port number \newline User account / password \newline SIP proxy hostname or IP address to direct calls} \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 Messages}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{SIP Messages are normally requests and responses. The request from client to server, the response back to the client from the server.} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Request and responses use different headers in the SIP message to describe the detail of the communication between agents} \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Authorization and encryption is use to make SIP more secure} \tn % Row Count 8 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.33919 cm} x{2.63781 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Basic SIP Request methods}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{INVITE}} & initiates a call by inviting a user to particle in a session. INVITEs can also be used for session modification \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} {\bf{ACK}} & ACKnowledgement is used as a respne to a 200 OK response that was the result of an initial INVITE request. A session should now be in place. ACK is only used with INVITE and reINVITES requests \tn % Row Count 16 (+ 10) % Row 2 \SetRowColor{LightBackground} {\bf{BYE}} & is used to indicate termination of a call or session \tn % Row Count 19 (+ 3) % Row 3 \SetRowColor{white} {\bf{CANCEL}} & is used to cancel a pending request \tn % Row Count 21 (+ 2) % Row 4 \SetRowColor{LightBackground} {\bf{REGISTER}} & is used to register the user agent by temporarily binding the Agent URI to an AOR (address of record) so the SIP server knows the location of the user agent \tn % Row Count 29 (+ 8) % Row 5 \SetRowColor{white} {\bf{OPTIONS}} & is used to find out what a server or UA media capabilites are but does not set up a session \tn % Row Count 34 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.33919 cm} x{2.63781 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Basic SIP Request methods (cont)}} \tn % Row 6 \SetRowColor{LightBackground} {\bf{INFO}} & is used for communicating mid-session signaling info \tn % Row Count 3 (+ 3) % Row 7 \SetRowColor{white} {\bf{PRACK}} & is a Provisional ACK and is only used in response to a 1XX 'style' response message. \tn % Row Count 7 (+ 4) % Row 8 \SetRowColor{LightBackground} & IF an initial INVITE had no SDP body, then after a 1xx 'style' response the PRACK can include the relevant SDP detail. \tn % Row Count 13 (+ 6) % Row 9 \SetRowColor{white} & Each provisonal response (eg. from a UAS, a 183 session in progress) is given a seq number, carried in the RSeq header field in the response \tn % Row Count 20 (+ 7) % Row 10 \SetRowColor{LightBackground} & The PRACK message from the UAC contain an RAck header field, which indicates the seq num of the provisional response that is being ack. \tn % Row Count 27 (+ 7) % Row 11 \SetRowColor{white} {\emph{Session Description Protocol (SDP)}} & describes the media of a session. It is important to realize that it doesn't negotiate the media. \tn % Row Count 32 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.33919 cm} x{2.63781 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Basic SIP Request methods (cont)}} \tn % Row 12 \SetRowColor{LightBackground} & SIP deals with establishing, modifying, and tearing down sessions, SDP is solely concerned with the media within those sessions. \tn % Row Count 7 (+ 7) % Row 13 \SetRowColor{white} & SDP is used when one party tells the other party, "here are all the media types I can support — pick one and use it." \tn % Row Count 13 (+ 6) % Row 14 \SetRowColor{LightBackground} {\bf{SUBSCRIBE}} & method is used to req notification of an event or set of events at a later time \tn % Row Count 17 (+ 4) % Row 15 \SetRowColor{white} & eg. requesting a notification when another persons 'IM Presence' details change. \tn % Row Count 21 (+ 4) % Row 16 \SetRowColor{LightBackground} {\bf{NOTIFY}} & is used to notify that an event which was requested by an earlier SUBSCRIBE method has occurred. \tn % Row Count 26 (+ 5) % Row 17 \SetRowColor{white} & Used by a SIP server to NOTIFY a client of an event. eg. a VM has been left for the client. \tn % Row Count 31 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.33919 cm} x{2.63781 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Basic SIP Request methods (cont)}} \tn % Row 18 \SetRowColor{LightBackground} {\bf{REFER}} & is used to Transfer calls and also to contact external resources \tn % Row Count 4 (+ 4) % Row 19 \SetRowColor{white} {\bf{UPDATE}} & allows a client to update parameters of a session such as set of media streams and their codecs, but has no impact on state of dialog \tn % Row Count 11 (+ 7) % Row 20 \SetRowColor{LightBackground} {\bf{SERVICE}} & method can carry a SOAP message as its payload \tn % Row Count 14 (+ 3) % Row 21 \SetRowColor{white} {\emph{SOAP}} & Simple Object Access Protocol is a lightweight protocol that defines a framework for encoding request and response message in XML \tn % Row Count 21 (+ 7) % Row 22 \SetRowColor{LightBackground} {\bf{BENOTIFY}} & Best Effort NOTIFY \tn % Row Count 22 (+ 1) % Row 23 \SetRowColor{white} & is used by MS Lync, LCS, and Skype for Business comm products. \tn % Row Count 25 (+ 3) % Row 24 \SetRowColor{LightBackground} & Unlike a NOTIFY method, BENOTIFY doesn't require a response as apps may not need a NOTIFY response to a certain request thus reducing SIP signaling traffic, which is important for deployments with large number of clients on server \tn % Row Count 36 (+ 11) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.33919 cm} x{2.63781 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Basic SIP Request methods (cont)}} \tn % Row 25 \SetRowColor{LightBackground} {\bf{MESSAGE}} & method is an ext. to SIP that allows transfer of IM where requests will normally carry the IM content in the request body. \tn % Row Count 6 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.54287 cm} x{3.43413 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{SIP Response Codes}} \tn % Row 0 \SetRowColor{LightBackground} SIP response codes & are made up of 3 digits. The first digit in the code indicates the class of the response and the other two digits are used to represent a reason or 'reason phrase'. \tn % Row Count 7 (+ 7) % Row 1 \SetRowColor{white} {\bf{1xx}} & style response is an informational response. The request was received and is still being processed. \tn % Row Count 11 (+ 4) % Row 2 \SetRowColor{LightBackground} {\bf{2xx}} & style response is a sucess respone. The action was received, understood and accepted \tn % Row Count 15 (+ 4) % Row 3 \SetRowColor{white} {\bf{3xx}} & style response is a redirection response. Further action needs to be taken in order to complete the request \tn % Row Count 19 (+ 4) % Row 4 \SetRowColor{LightBackground} {\bf{4xx}} & style response is a 'client error' response. For some reason, such as bad syntax, the request cannot be fulfilled at this server. \tn % Row Count 24 (+ 5) % Row 5 \SetRowColor{white} {\bf{5xx}} & style response is a 'server error' response. For some reason, the server cannot fulfill a valid request. \tn % Row Count 28 (+ 4) % Row 6 \SetRowColor{LightBackground} {\bf{6xx}} & style response is a 'global error' response. The request being made is invalid at any server. \tn % Row Count 32 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Mini Quizlet}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Which 'Method' is an extension to SIP that allows the transfer of Instant Messages?} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}MESSAGE} \tn % Row Count 3 (+ 3) \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 Header - INVITE}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1477439344_Picture1.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{The header indicates the method type. eg INVITE, the SIP URI of the target UA and SIP version 2.0 \newline \newline Via shows the layer 4 transport protocol to use, eg UDP, IP address, and port where the respnse is to be sent back to. eg. senders gateway 82.36.89.78:2051 \newline \newline branch - parameter is used to uniquely identify this transaction and should not change \newline \newline From shows the details of the Caller and Callers SIP URI, it's the callers Caller ID} \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}{INVITE}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{To shows the details of the Called party \newline % Row Count 1 (+ 1) Call-Id is a globally unique ID for this particular dialog. It will be the same for all request and response transactions within this dialog. \newline % Row Count 4 (+ 3) CSeq is used to indentify and order transactions. eg. sequence 1 and method INVITE. Each of the parties in a call will maintain their own Cseq numbers and these numbers and these numbers increment for every successive command in a call. 70 is the recommended default value. \newline % Row Count 10 (+ 6) Max-Forwards field is used to limit the number of proxies or gateways that can forward the request to the next downstream server. eg. 70 will be decremented by each server that forwards the request. \newline % Row Count 14 (+ 4) Contact shows the SIP URI that can be used to contact this agent with subsequent requests \newline % Row Count 16 (+ 2) User-Agent indicates telephone modem, firmware version, MAC address \newline % Row Count 18 (+ 2) If the Accept field is not present the receiving server should assume application/sdp \newline % Row Count 20 (+ 2) The Allow field lists the set of methods supported by the UA generating the message. \newline % Row Count 22 (+ 2) Allow-Events details some basic events that the UA supports. eg. Talk, Put on Hold, and Refer (or Transfer) a call or session. \newline % Row Count 25 (+ 3) Session-Expires header conveys the session interval for a SIP call. It is placed in an INVITE request and is allowed in any 2xx response to an INVITE eg. 3600 seconds or 60 mins. \newline % Row Count 29 (+ 4) Content-Type describes the body content, which is app and the type which is sdp \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}{INVITE (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Content Length is the length of the SDP body in bytes% Row Count 2 (+ 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 HEADER - 200 Response}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1477440055_Picture1.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Via headers are inserted by servers into requests to detect loops and to allow responses to find their way back to the client VIA the server \newline \newline Call-info field provides additional info about the called party. \newline \newline Record-route details are inserted by the proxy to 'force' future requests in this dialog to be routed through the proxy. eg 217.10.79.23} \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 HEADER}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1477440887_Picture1.jpg}}} \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}{Supported and Require Headers}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1477441684_Picture4.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Supported allows a client to inform a server what features it supports. eg. timer, 100rel \newline \newline Require - what the server requires the client to support. eg. timer} \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}{Session timers}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Session timers allows the refreshing of a SIP session periodically using SIP re-INVITES or UPDATES messages.} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{'REFRESH' allows user agents and proxies to keep a session alive and also allows the status of the session to be determined and released if not active. This can be useful when a call has been ended but a BYE not been sent. eg. a lost connection} \tn % Row Count 8 (+ 5) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{SE - session expires} \tn % Row Count 9 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{RFC 4028 defines session timers} \tn % Row Count 10 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Session-Expires is the upper level of time for the session} \tn % Row Count 12 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Min-SE is the minimum a server will actually allow} \tn % Row Count 13 (+ 1) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{If a Refresh is not received before the timer expires, the session is ended.} \tn % Row Count 15 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{The refresher in charge of sending the updates can be the server or client and is shown in the 200OK that completes the session setup} \tn % Row Count 18 (+ 3) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Refreshes are sent halfway through the session interval} \tn % Row Count 20 (+ 2) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{The recommended Session-Expires value in RFC4028 is 1800 seconds or 30 minutes.} \tn % Row Count 22 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{100rel}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{When a SIP device responds to a request the response can be} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Final - 200 OK} \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Decline - 603 - a final result to a transaction which is acknowledged} \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Provisional - such as 180 Ringing - are not acknowledged by default but desirable especially when communicating with the PSTN} \tn % Row Count 8 (+ 3) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{SIP PRACK method provides reliability and to show support for this feature a SIP device will add the 100rel parameter to the supported header} \tn % Row Count 11 (+ 3) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{If the recipient does not support 100rel it must reject with a 420 resonse and state in the header that 100rel is unsupported} \tn % Row Count 14 (+ 3) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{PRACK can be used with all 1xx style responsed except 100 trying.} \tn % Row Count 16 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Responses are acknowledged to ensure better reliability for a transaction} \tn % Row Count 18 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Short form /compact headers}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1477869158_Screen Shot 10-30-16 at 07.11 PM.JPG}}} \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}{Mini Quiz}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{What does code 180 mean?} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}RINGING} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{A '200' code indicates a successful event} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}True} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{What SIP Method will the SIP soft phone need to send to the ITSP in order to be ready to make calls} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}REGISTER} \tn % Row Count 7 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{SDP}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{SDP stands for Session Description Protocol and is detailed in the RFC 4566} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{It is used to handle the session negotiation process with a SIP transaction} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{An SDP packet is often carried as the message body of a SIP request} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Part of a SIP INVITE request, an SDP offer is made detailing a number of characteristics that define the proposed media session such as codec type, contact information, and ports to be used.} \tn % Row Count 10 (+ 4) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{The response to this acknowledges acceptance, offers alternative session parameters, or declines the proposed session with no alternatives offered.} \tn % Row Count 13 (+ 3) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{MIME (multipurpose internet mail extensions) is used to define what is in the body of a SIP message} \tn % Row Count 15 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{The entry,{\bf{Content-Type: application/sdp}} defines that an agent would need to support the application layer protocol SDP in order to setup a session.} \tn % Row Count 19 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Call dialogs}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483167595_Screen Shot 12-31-16 at 02.55 AM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{E.g. IF Lynda answers her mobile and desk phone, you will have 1 conversion or call and 2 call legs. \newline \newline A call leg in RFC 2543 refers to the signaling relationship between two user agents (UAs) but this is now referred to as a 'dialog' in the replacement of RFC 3261. \newline \newline In a SIP INVITE, a dialog is identified by a call identifier, local tag, and remote tag. \newline \newline In an initial call setup, the From field has a tag at the end of the field. The To field only contains the SIP URI, no tag as yet.} \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}{Trace example}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483171045_Screen Shot 12-31-16 at 03.53 AM 001.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{The 200 OK contains, the unique caller id, CSeq value, and tag on called to and the unique tag on calling number.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.89586 cm} x{4.08114 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{SIP mobility}} \tn % Row 0 \SetRowColor{LightBackground} branch ID & Introduced in RFC 3261 and are used by servers ans systems to help them differentiate all of the dialogs that they may be involved in. \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} & All branch IDs start with {\bf{z9hG4bk}} \tn % Row Count 7 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Mini Quizlet}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{The Contact field is found in the SDP body of a SIP message.} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}False} \tn % Row Count 3 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Call forward to voicemail}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483172548_Screen Shot 12-31-16 at 04.16 AM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{The proxy knows about the call forward setting, sends a message to the calling device to notify it of the call forwarding setting. \newline \newline The proxy rewrites the INVITE and sends it to the voicemail server. This server then responds and a media path is established so the caller can leave a message. \newline \newline When the called hangs up the VM sends a NOTIFY sip message that will make the MWI indication on the phone light up.} \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 Call forward - No answer}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483172884_Screen Shot 12-31-16 at 04.25 AM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Proxy sends an INVITE to a device which rings and responds back to the proxy. After a configurable timer has expired on the proxy, the proxy sends a cancel to the device that responds and then the proxy sends an INVITE to the call forward number the proxy has for the user.} \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}{Replaces header}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483274336_Screen Shot 12-31-16 at 04.50 AM.JPG}}} \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}{Replaces header}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Replaces is used for attended call transfer, call park. RFC3891.} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{1. Operator calls the call center} \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{2. Get a 182 response. Operator transfer customer to the call center using REFER method.} \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{3. Customer issue an INVITE with the replaces header to take the operators place in the queue. From entry changes to the customer with his own unique tag. The Replaces header shows the replaced call ID and the tags used in the transaction between the operator and the call center.} \tn % Row Count 11 (+ 6) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{4. The call center then sends the 182 message to the customer.} \tn % Row Count 13 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Diversion headers}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483313498_Screen Shot 01-01-17 at 07.29 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{In this scenario, call is forwarded on no answer and the new Diversion header will contain the detail of where the call has been diverted from along with a reason.} \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}{Stateless proxy}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483313740_Screen Shot 01-01-17 at 07.35 PM.JPG}}} \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}{Extending SDP}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1482956674_Screen Shot 12-28-16 at 04.22 PM.JPG}}} \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}{Stateful proxy}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483314180_Screen Shot 01-01-17 at 07.36 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{The proxy can receive all respond from possible destinations and send back only the appropriate 200 response without maintaining state an agent would have sent 3 invites and maybe received the errors before the live agent could respond, resulting in call setup failure.} \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}{Proxy}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483315123_Screen Shot 01-01-17 at 07.57 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Transactional \newline Super Stateful} \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}{VIA and Record-route}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483315457_Screen Shot 01-01-17 at 08.01 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Via and Record-route entries can help prevent 'loops' and can govern the path a SIP message takes.} \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}{VIA Details}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483315704_Screen Shot 01-01-17 at 08.05 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{VIA records are added to a SIP message as follows} \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}{VIA Details}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483316030_Screen Shot 01-01-17 at 08.10 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{VIA headers are used by proxies to see if any looping of the message has occurred. If they receive a message that includes their own IP address in a VIA record a {\bf{482}} (Loop detected) response is returned to the sender} \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 call forking - parallel}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1482963942_Screen Shot 12-28-16 at 06.25 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{With call forking in 'parallel mode', the SIP proxy receiving the INVITE will discover via the location server that you have two current locations. It will send an INVITE to both locations at the same time \newline \newline Both locations will ring and the proxy will notify the caller of this. In this example, the desk phone answers and sends a 200 OK message to the proxy. The proxy forwards the 200 OK to the caller and send a cancel message to the softphone to stop ringing.} \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 call forking - sequential}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483166916_Screen Shot 12-31-16 at 02.44 AM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Sequential call forking is when the Proxy tries to contact the SIP devices registered for a user in order, one at a time. eg. the 1st device returns a {\bf{302 moved}} response that will then allow the proxy to move on and try the next device on it's list. In reality, the Proxy will probably be communicating with a destination proxy that will respond saying that the device user has moved not the end device.} \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}{SDP component in a SIP message}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1482529283_Screen Shot 12-23-16 at 05.24 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{SIP header generally describes who is making the call and where the destination agent is. \newline \newline The SDP section lists all the detail required in order to setup a successful media connection such as a voice or video media stream. \newline \newline The Called agent can decide to accept or reject the session. To reject the session, the called agent responds with a port setting of 0, to accept it responds with it's own SDP details in a {\bf{SIP 200 Response}}. After this media can be exchanged.} \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}{SDP Detail}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1482953825_Screen Shot 12-28-16 at 03.24 PM.JPG}}} \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}{SDP Detail}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Sip INVITE version number of {\bf{0}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{o}} or origin entry, displays the username of 'root' and session identifiers along with the IP v4 IP address} \tn % Row Count 4 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{s}} or session name field allows for a call description} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{c}} is connection information for calling party to return all messages to.} \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{t}} Timer values (start and stop) are usually set at 0 and 0 allowing the calls to have no timer boundaries.} \tn % Row Count 11 (+ 3) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{m}} for media shows the media type, eg AUDIO.} \tn % Row Count 12 (+ 1) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Port 60106 - the port the UA can receive audio on} \tn % Row Count 13 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{RTP/AVP - the Real-time protocol / Audio Video profile codecs that this UA is offering the destination device to choose to use.} \tn % Row Count 16 (+ 3) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{One of these is Codecs, 18, is G729 **a=rtpmap:18 g729/8000} \tn % Row Count 18 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{SDP Detail - reply}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1482955876_Screen Shot 12-28-16 at 04.10 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.89586 cm} x{4.08114 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{SDP Detail - reply}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{v=0}} & reply shows the same version of 0 \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} "o" owner & An owner 'username' of root, the sessions IDs along with the source IP address \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} {\bf{s=}} & description of 'SIP Call' \tn % Row Count 6 (+ 1) % Row 3 \SetRowColor{white} {\bf{e=}} & optional piece of info of the contact email addres of agent \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} {\bf{a=}} & E.164 number of this agent, the contact details, time values and the media type that this device has chosen from the list offered by the caller, eg 18 -{}- G729 \tn % Row Count 13 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Multiple 'm' lines}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1482958193_Screen Shot 12-28-16 at 04.48 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{multiple 'm' lines - The SDP INVITE element shows the m=auio element for the voice including port info and the m=video element details the port and other requirements for the video. When the calling received the 200 OK to both elements the voice and video channels are set up.} \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}{Changing session parameters}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{A session can be modified after it is started by changing the session parameters through SDP with methods such as {\bf{re-INVITE or UPDATE}}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Adding a new stream such as video to a voice conversation} \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Removing a stream} \tn % Row Count 6 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Changing codecs from uncompressed G.711 to compressed G.729} \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Changing address info} \tn % Row Count 9 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Putting a call on hold} \tn % Row Count 10 (+ 1) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Set up a call conference} \tn % Row Count 11 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{SDP Example - Put a call on Hold}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1482959164_Screen Shot 12-28-16 at 05.04 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{The re-invite message includes the hold command} \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}{SDP - Call hold trace}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1482959832_Screen Shot 12-28-16 at 05.10 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{To put a call on hold, the holding device sends connection details of an IP address of 0.0.0. and an audio setting of {\bf{sendonly}} which the receiving device responds back with {\bf{recvonly}}. Press hold to re-establish the media stream resends the appropriate connection IP address along with the {\bf{sendrecv}} attribute. The receiving device responds with {\bf{sendrecv}} and two way audion is reestablished.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.59264 cm} x{3.38436 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Call hold - old and new methods}} \tn % Row 0 \SetRowColor{LightBackground} RFC 2543 & placing a user on hold is accomplished by setting the connection address to c=0.0.0.0 \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} RFC 3264 & discourages the use of c=0.0.0.0. Extends options available with the following attibutes. \tn % Row Count 8 (+ 4) % Row 2 \SetRowColor{LightBackground} RFC 3264 attributes & {\bf{{\emph{}}}}* \tn % Row Count 10 (+ 2) % Row 3 \SetRowColor{white} sendrecv & used to establish a 2-way media stream \tn % Row Count 12 (+ 2) % Row 4 \SetRowColor{LightBackground} recvonly & the SIP endpoint would only receive (listen mode) and not send media \tn % Row Count 15 (+ 3) % Row 5 \SetRowColor{white} sendonly & The SIP endpoint would only send and not receive media \tn % Row Count 17 (+ 2) % Row 6 \SetRowColor{LightBackground} inactive & The SIP endpoint would neither send nor receive media. \tn % Row Count 19 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{INVITE and reINVITE}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1482962091_Screen Shot 12-28-16 at 05.53 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.04057 cm} x{2.93643 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{INVITE and reINVITE}} \tn % Row 0 \SetRowColor{LightBackground} Resent /Retransmitted INVITE & contains the same Call-ID and CSeq value as a previous INVITE and is normally sent to the proxy if a '100 trying' has not been received \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} reINVITE & A re-INVITE is used to change the session parameters of an existing or pending call. It uses the same Call=ID, but the CSeq value is incremented because it is new request \tn % Row Count 14 (+ 8) \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 mobility}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1482962963_Screen Shot 12-28-16 at 06.07 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{SIP mobility allows freedom to have calls redirected to the location you are currently at and to the device you want to receive calls on.} \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}{Module Quiz}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{It is the SIP user agent server (UAS) that initiates a SIP call} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}False} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{SIP} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Session Initiation Protocol} \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{At what TCP/IP layer would you find the SIP protocol} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}application} \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{SIP proxy sever will always relay media as well as SIP messages on behalf of a SIP UAC} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}False} \tn % Row Count 11 (+ 3) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Valid URI addresses} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Can contain +,-,name,starts wit sip:} \tn % Row Count 13 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{After a successful REGISTRATION} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}A 200 code is sent} \tn % Row Count 15 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Main characteristics of a SIP location server} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}1. The LOCATION service usually coexists on the same server as the REGISTRAR service2. It can utilize external databases such as DNS} \tn % Row Count 19 (+ 4) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{SIP Request methods} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}REGISTER, UPDATE, CANCEL, INVITE} \tn % Row Count 21 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{SIP Response code types} \tn % Row Count 22 (+ 1) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Response code - moved temporarily} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}302} \tn % Row Count 24 (+ 2) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{VIA element of a SIP message can be found in the SDP body} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}False} \tn % Row Count 27 (+ 3) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{SIP response, elements from the initial SIP message ar copied exactly} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Via, From, To, Call-ID, and CSeq are copied exactly from Request. To and From are NOT swapped} \tn % Row Count 31 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Module Quiz (cont)}} \tn % Row 12 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{A SIP device needs to send SDP element in order to negotiate the codec to use with the 'called' SIP device} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}True} \tn % Row Count 4 (+ 4) % Row 13 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Sequential SIP 'Call Forking' implies a proxy will 'call' you SIP registered devices one after the other until one is answered} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}True} \tn % Row Count 8 (+ 4) % Row 14 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{A SIP UAS will try to use the location details in a certain preferred order to get a Request to a SIP UA as part of a dialog} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Route, Contact, From} \tn % Row Count 12 (+ 4) % Row 15 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Call Flow} \tn % Row Count 13 (+ 1) % Row 16 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{B2BUA} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Back to Back User Agent} \tn % Row Count 15 (+ 2) % Row 17 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{If you move your SIP device and it does not reregister with the REGISTRAR server it will be able to locate the SIP device using DNS} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}False} \tn % Row Count 19 (+ 4) \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 Call process}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483335638_Screen Shot 01-02-17 at 01.40 AM.JPG}}} \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}{B2BUA benefits and features}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Centrialized management of all calls} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{PBX call managment features such as call transfer, forwarding and automatic call disconnection to warn a user that credit is low.} \tn % Row Count 4 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Billing functionality} \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Call conferencing facilities} \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{The ability to 'hide' the network such as private IP address schemes and the underlying network topo from scanning attempts} \tn % Row Count 9 (+ 3) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{The ability to connect two different types of signalling networks such as SIP and H323 for coexistence during a migration to a fully SIP based network} \tn % Row Count 12 (+ 3) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Implement and enforce policies such as class of service and restriction} \tn % Row Count 14 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{B2BUA}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483334710_Screen Shot 01-02-17 at 01.18 AM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Back-2-Back user agent is a 4th type of server. Others are proxy, registrar, and redirect. Can act as standalone proxy \newline \newline The B@BUA maintains the complete call state and continues to send requests and responses for sessions in which it is involved.} \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 code and PSTN mapping}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483334460_Screen Shot 01-02-17 at 01.14 AM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.89586 cm} x{4.08114 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{SIP to PSTN call flow}} \tn % Row 0 \SetRowColor{LightBackground} PSTN & public switched telephone network \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} ISUP & Integrated services digital network user part \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} IAM & Initial address message \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} NPI & numbering plan indicator \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} PRACK 183 & provisional acknowledgement \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} 180 & ringing \tn % Row Count 9 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{The gateway convert the RTP media to TDM media for the PSTN.} \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 to PSTN call flow}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483333767_Screen Shot 01-02-17 at 01.08 AM.JPG}}} \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}{Multiple MIME parts}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483333125_Screen Shot 01-02-17 at 12.54 AM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{A SIP message can actually contain multiple MIME parts, but there needed to be a set boundary defined to separate each of these parts. Boundary 1 separates the usual info in the SDP body and then following the next boundary marker is a gif image.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.14011 cm} x{2.83689 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{MIME}} \tn % Row 0 \SetRowColor{LightBackground} MIME & multipurpose Internet Mail extensions \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} MIME & was defined to provide a way of attaching different document/ file types to email messages. SIP takes advantage of this existing standart by using it to inform a UR what content is present in a SIP message \tn % Row Count 12 (+ 10) % Row 2 \SetRowColor{LightBackground} Content-type: application/ SDP & tells us that the MIME content of the SIP message is the application layer protocl SDP. The UA, if support SDP, can interpret the SDP info in the message to find out details such as codecs supported in the inviting agent and prot numbers for responses. \tn % Row Count 24 (+ 12) % Row 3 \SetRowColor{white} Content is described as & Content-type: \textless{}type\textgreater{}/\textless{}subtype\textgreater{} \tn % Row Count 26 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Routing}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{ACK message needed to end up at the SIP gateway. The Request-URI is the sip URI of the called number + the IP address of the gateway of the SIP provider} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{The messag is sent to the top of the Route list, the IP address of the SIP server} \tn % Row Count 6 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{When the SIP server checks to see if the Request URI is something it is resonsible for or owns compares its IP address with the first route record, rewrites the ACK message which is then sent to the Billing server} \tn % Row Count 11 (+ 5) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Billing server does its own checks and removes the route record and tthen forwards the ACK based on the info in the request URI, the gateway} \tn % Row Count 14 (+ 3) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Loose routing - The way SIP servers leave the Request URI alone and use the route records to route, RFC 2543} \tn % Row Count 17 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Routing}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483329485_Screen Shot 01-01-17 at 11.57 PM.JPG}}} \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}{Routing example}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483328554_Screen Shot 01-01-17 at 11.36 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{200 OK response have VIA records that were included in the INVITE removed. Only the VIA record for the UA A phone is included. \newline \newline There are also 2 record-route records that were added to the INVITE message by the SIP and Billing servers on the ways out. Record - Route records are never deleted. \newline \newline Contact element changed to represent the SIP provider gateway and will be used in the ACK to be sent} \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}{Routing}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{1. 192.168.100.31 calls 08457445445 which generates a SIP INVITE} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{2. The domain name of UA A service provider is appended to create the Request URI} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{3. VIA Header is added to by UA A along with its local LAN contact details} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{4. Contact field is populated with the Live contact deails, eg UA A phone number + the IP address/port combo of the outside edge of my network.} \tn % Row Count 9 (+ 3) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{4. To, who UA A is calling} \tn % Row Count 10 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{5. From, UA A phone details} \tn % Row Count 11 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Routing}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483323987_Screen Shot 01-01-17 at 10.22 PM.JPG}}} \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}{Record-route defined}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Route and Record-Route header fields have a slightly different purpose \textgreater{}-{}- they are used to route \_requests\_} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{User agent A with IP address 1.2.3.4 sends an INVITE request to the proxy which forwards the request to user agent B. UA A adds the Contact header field in the request. The Contact header field tells UA B that it can reach UA A on IP 1.2.3.4. UA B adds a Contact header field to 200 OK reply, telling UA A that it can reach B on IP address 5.6.7.8. This way both user agents exchange their IP addresses and they do not need the proxy anymore. They can easily send all further SIP messages directly to each other, because they remember the IP address of the remote party from Contact header field. This way all further requests would bypass the proxy server.} \tn % Row Count 17 (+ 14) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{There are many cases where the proxy server needs to see \_all\_ future SIP messages exchanged between the user agent, such as for accounting. In this case the proxy server needs tell the user agents that they should not exchange future SIP messages directly,but they should relay them through the proxy again.} \tn % Row Count 24 (+ 7) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{The proxy server can do this by inserting Record-Route header field in the INVITE message. The Record-Route header field contains the IP address of the proxy and once the INVITE message reaches UA B, it extracts the IP address of the proxy server from Record-Route header field and store it in memory along with the IP address of the remote party (UA A). So UA B knows the IP address of UA A and it also knows that it should send all future requests to UA A through the proxy server.} \tn % Row Count 34 (+ 10) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Record-route defined (cont)}} \tn % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{UA A should also send all future SIP requests to UA B through the proxy server, but it does not know it yet, because the proxy server added Record-Route header field to the INVITE message which will only reach UA B. UA B has to tell UA A that all future SIP requests should be sent through the proxy, and it does so by copying all Record-Route header fields from the INVITE message to 200 OK which is sent from UA B to UA A. UA A will then extract Record-Route header fields along with Contact from 200 OK and store it in memory. At this point both user agents know the IP address of the remote party and that they should relay all SIP messages through the proxy.} \tn % Row Count 14 (+ 14) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{When UA A wants to send an ACK to UA B. It will lookup the IP address of the remote party (Contact from 200 OK) from memory and put it in the Request-URI of ACK. The reason why ACK does not have the same Request-URI as the original INVITE is that the ACK should be sent to the user agent instance that generated 200 OK -{}- the Request-URI from the INVITE would fork if user B had several user agents and this is not desirable for ACKs.} \tn % Row Count 23 (+ 9) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{The URI based on Contact header field never forks, it is delivered only to the UA instance that generated 200 OK. UA A will also find the URI from the Record-Route header field in memory (stored along with the contact of the remote party). It will create a Route header field, put the URI in it and append it to the ACK.} \tn % Row Count 30 (+ 7) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Record-route / VIA defined}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Endpoint A sends a request say INVITE to proxy1, proxy1 forwards it to proxy2 and proxy2 gives that INVITE to endpoint B. Each proxy adds its Record-route at the start of the record-route header, when called party gets request, last proxies record-route token is the at the start of record route header. Unlike Via, the record route is not deleted by respective proxies in return path. At calling party, whole record route is received.} \tn % Row Count 9 (+ 9) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{When the request is arrived at UAS, the route set is prepared from record-route header taken in order. If record-route is absent, route set is set to NULL.} \tn % Row Count 13 (+ 4) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{When the response received at UAS, route set is prepared at UAS by taking RR in reverse order.} \tn % Row Count 15 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{In next transactions because of Route set request URI may be affected. If route set is empty, the UAC must place remote target URI into the Request-URI.} \tn % Row Count 19 (+ 4) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{If first route URI in route set contains lr parameter (loose routing), then request-URI is not affected.. However if first route URI does not contain lr parameter, then UA should put the first route to request-URI, then put the route set in order, and finally adds remote target to Route header at the end.} \tn % Row Count 26 (+ 7) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{VIA}} is used by UAS to to determine target to send immediate response. All proxies in path adds corresponding Via at the start of Via header. Say there are N proxies. So Via at called party looks at \seqsplit{proxy(n).via;proxy(n-1).via....} Calling-phone-via} \tn % Row Count 32 (+ 6) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Record-route / VIA defined (cont)}} \tn % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{So when UAS responds back, it sends all Via without any modification. Now each proxy deletes its corresponding via, finally when response is received at endpoint , endpoint sees its own via only.} \tn % Row Count 4 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Record-route defined}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/seashore_1483316558_Screen Shot 01-01-17 at 08.20 PM.JPG}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{When sending a {\bf{Request}} message, which is used? \newline Route \newline Contact (if there is no route) \newline From (if there is no contact)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}