IP-Telephony SIP & MEGACO Bernard Hammer Siemens AG, Munich Siemens AG 2001 1
Presentation Outline Session Initiation Protocol Introduction Examples Media Gateway Decomposition Protocol 2
IETF Standard SIP Session Initiation Protocol Proposed IETF Standard 1999-03 (RFC 2543) Specifies call signaling/ call control, but no telephony system The session description is carried by SIP as a MIME type using SDP Patterned after HTTP Peer-to-peer protocol Network entities are: User Agents ( clients to initiate calls & servers to accept/ reject calls) Servers (Proxy ~, Redirect ~, Registrar) Text based encoding Supports: telephony features: Call Waiting, Forward, Hold, Transfer, etc user & terminal mobility seamless web & email integration programable services 3
SIP Extensions & Supplementary Protocols SIP is extendable by named extensions using New headers New parameters New methods SIP-T SIP-CP Extensions in progress SIP-T (describes Inter-MGC communication using SIP incl. encapsulation of SCN signaling) SIP Caller Preferences (preferences carried in setup message) SIP Call Control (specifies add. CC primitives) SIP-CC SIP TRIP CPL ENUM SIP INFO method (carries session related ctrl info) Supplementary protocols TRIP (Interdomain Protocol for Gateway Route Exchange) CPL (scripting language to decribe call services) ENUM (supports DNS based mapping of E.164 phone numbers to SIP-URLs) 4
Introduction to SIP - Servers Proxy server forwards request to the next server (after routing decision) Stateful proxy holds information about the call during the entire time the call is up Stateless proxy sequentially processes each new request and then forgets everything about the call until the next message arrives Redirect server sends a redirect response back to the client containing the address of the next server to contact with (I.e. does not forward requests to the next server) Registrar servers are used to record the SIP address (called SIP URL) and the associated IP address 5
SIP Architecture Request Response SIP Redirect Server Location Service 2 3 5 1 12 4 11 SIP Proxy 6 10 7 SIP Proxy 8 SIP Client SIP Client (User Agent Server) 9 6
Why SIP for Services? Synergy with major Internet Protocols use of URLs use of MIME types application/sdp, text/xml, MP3s, Java Applets etc DNS Extensibility New methods optional extensions new headers parameters in existing headers negotiation of common capability sets 7
SIP Basics Users are known by SIP URLs like mailto URLs e.g. sip:ndeason@ubiquity.net SIP syntax is patterned on HTTP request-response protocol reuse of common headers SIP is an IETF text based protocol (ISO 10646 in UTF-8 encoding) Suitable for high level languages (e.g. Java, Python, Perl) Easier debugging Above all flexible and extensible 8
SIP Request Methods SIP Method INVITE ACK BYE CANCEL OPTIONS REGISTER INFO Description Invites a user to a call Used to facilitate reliable message exchange for INVITEs Terminates a connection between users or decline a call Terminates a request, or search for a user Solicits information about a Server s capabilities Registers a users current location Used for mid-session signaling 9
SIP Responses Follow HTTP Response Codes (e.g. 404 Not Found ) 1xx Informational ( e.g. 100 Trying, 180 Ringing ) 2xx Successful ( e.g 200 OK, 202 Accepted ) 3xx Redirection ( e.g. 302 Moved Temporarily ) 4xx Request Failure ( e.g 404 Not Found, 482 Loop Detected ) 5xx Server Failure ( e.g 501 Not Implemented ) 6xx Global Failure ( 603 Decline ) 10
Introduction to SIP - Connection procedures 1 INVITE sip:aj@delta.swh.sk SIP/2.0 2 SIP/2.0 200 OK 3 ACK sip: aj@delta.swh.sk SIP/2.0 siemens.at delta.swh.sk Direct invitation 11
Introduction to SIP - Connection procedures swh.sk location server siemens.at 1 INVITE sip: anton.janetka@swh.sk SIP/2.0 7 SIP/2.0 200 OK 8 ACK sip: anton.janetka@swh.sk SIP/2.0 2 anton.janetka SIP proxy server 3 aj@delta 4 INVITE sip:aj@delta SIP/2.0 6 SIP/2.0 200 OK 5 ring delta 9 ACK sip:aj@delta SIP/2.0 12
Introduction to SIP - Connection procedures siemens.at 1 INVITE sip: anton.janetka@swh.sk SIP/2.0 4 SIP/2.0 302 Moved temporarily 5 ACK sip: anton.janetka@swh.sk SIP/2.0 6 INVITE sip: aj@delta.swh.sk SIP/2.0 8 SIP/2.0 200 OK 9 ACK sip: aj@delta.swh.sk SIP/2.0 swh.sk 2 anton.janetka 3 aj@delta 7 ring location server delta SIP redirect server 13
Overview of a SIP Request INVITE sip:jo@ubiquity.net SIP/2.0 To: Jo <sip:jo@ubiquity.net> From: Neil <sip:neil@ubiquity.net> Call-ID: fd835c@193.195.52.229 Via: SIP/2.0/UDP 193.195.52.229:5060 CSeq: 1 INVITE Content-Type: application/sdp Content-Length: 125 CRLF v=0 o=193.195.52.229 4858 0 IN IP4 193.195.52.229 s= Working late again? c=in IP4 193.195.52.229 m=audio 5004 RTP/AVP 0 Start Line Headers Blank Line Body 14
A SIP Request in Detail INVITE sip:jo@ubiquity.net SIP/2.0 To: Jo <sip:jo@ubiquity.net> From: Neil <sip:neil@ubiquity.net> Call-ID: fd835c@193.195.52.229 Via: SIP/2.0/UDP 193.195.52.229:5060 CSeq: 1 INVITE Content-Type: application/sdp Content-Length: 125 v=0 o=193.195.52.229 4858 0 IN IP4 193.195.52.229 s= Working late again? c=in IP4 193.195.52.229 m=audio 5004 RTP/AVP 0 Method Type Request URI SIP Version User being invited to the call User originating the call Globally unique ID for this call IP Address and Port of previous hop Command Sequence number and type Body type - an SDP payload Length of the body of the message SDP Version Owner/creator and session Identifier Subject of session Connection information Media and Transport information 15
Presentation Outline Session Initiation Protocol Introduction Examples Media Gateway Decomposition Protocol 16
MEGACOP/ H.248 (MEdia GAteway COntrol Protocol) Next-generation gateway control protocol jointly proposed by IETF and ITU-T Follow-on development to MGCP Will not inter-operate with MGCP Interface definition for use between gateway components May be use as stimulus protocol for simple VoIP terminals H.323, SIP Media GW Controller Signaling Gateway SCN Signaling H.248/ MEGACOP MGCP RTP/ UDP/ IP Media Gateway Gateway SCN Trunk Media Gateway Controller (MGC): monitors and controls media end points, resources and connections. Media Gateway (MGW): controls GW resources and interfaces with SG for call processing. Signaling Gateway (SG): signaling termination and transport of signaling information to MGC. 17
Media gateway control vs. call signalling SG MGC SIP-T, ISUP in H.323, Q.BICC MGC SG SIP SIP User Agent PSTN Gateway control protocol H.323 call signalling Gateway control protocol PSTN MG H.323 Endpoint MG Call signalling Media gateway control signalling Media flows 18
Basic concepts Connection model: terminations, streams, and the context Termination properties: descriptors Context properties Message structure: transactions, actions, and commands Event and signal processing Packages 19
Media flow connections Connections achieved by placing two or more terminations into a common context. Context viewed as mixing bridge Termination = source or sink of media flows provisioned vs. ephemeral terminations provisioned terminations reside in NULL context when not active Flows specified by stream common streamid implies connected flows default streamid = 1 to simplify audio-only operation Transport, medium, encoding/decoding specified per stream at each termination 20
Descriptors Properties of terminations are organized syntactically into descriptors basic ones are Termination State, Media, Events, and Signals descriptors Media descriptor actually composed of other descriptors: Stream descriptors, which in turn contain LocalControl, Local, and Remote descriptors Default property values can be configured in the MG 21
Context properties currently three properties can be specified for a context more could be added in the future topology descriptor allows detailed specification of connectivity between individual pairs of terminations useful for legal interception priority flag can guide MG's allocation of scarce resources emergency flag can indicate contexts which must be maintained and restored in the event of failures 22
Null context and ROOT termination Null context introduced as a convention where persistent terminations are held when they are not in a real context When terminations are returned to the null context, they take on their configured default property values. ROOT termination represents the MG itself useful for specifying properties of the MG as a device, and to refer to the MG in commands like AuditCapability and ServiceChange 23
Message structure Megaco/H.248 message Header Transaction Transaction... Transaction Req or Reply Req or Reply Req or Reply Trans Hdr Action... Action Ctx Hdr Ctx Properties Command... Command Cmd Hdr Descriptor... Descriptor 24
Commands Megaco/H.248 provides the following commands For termination manipulation: Add, Subtract, Move, Modify For event reporting: Notify For management: AuditCapability, AuditValue, ServiceChange 25
Events Events are detected at the MG and reported to the MGC example: in-band signalling MGC controls what events it wants to learn about at any given time sets the termination Events descriptor Events can have side effects stop playout of signals start new signals automatically update the set of events of interest 26
Signals Signals cause things to happen on terminations play a tone, display text,... Specified in the Signals descriptor for a termination MGC can specify duration of signal ahead of time or signal can play until explicitly stopped Signals stop playing when any event is detected unless MGC says otherwise. 27
Packages Add detailed content to the protocol all events, signals, and statistics are specified in packages can also specify additional properties Package definition a continuing process being created by multiple standards bodies private packages also allowed Packages can inherit from and extend other packages. 28
Status MEGACOP/ H.248 ITU-T H.248 approval in June, 2000, IETF publishes new standards track RFC by July 2000 specifies text and binary (ASN.1) encoding, but implementations must support only one method H.248 packages for user interface elements and action packages have been defined H.248 Annex G for stimulus feature control for full stimulus H.248/MEGACOP VoIP phones TIA TR41 will contribute this new package to IETF for inclusion in MEGACO approval of H.248 packages November 2000 29