Burapha University ก Department of Computer Science 7 SIP (II) Call flow for basic call scenario In the case of registration and finding the SIP user Collecting the bill Multiparty conferencing with SIP Ver. 0.1 ก :, prajaks@buu.ac.th
Basic call scenario SIP Call Flow Call Termination Busy Call Call-Handling Services with SIP Registration and Location The proxy function Multiparty Conferencing Conclusion ก 310482: Internet Telephony, 7: SIP (II) 2 ก 37
Basic call scenario ก 310482: Internet Telephony, 7: SIP (II) 3 ก 37
Basic call scenario Mark wants to call John sip:john@192.190.132.31 Johns IP address is known SIP communicates using transactions Call steps A SIP client calls another SIP endpoint by sending an INVITE request message. The INVITE message usually contains enough information to allow the called terminal to immediately establish the requested media connection to the calling endpoint. The called endpoint needs to indicate that it is accepting the request. This is the purpose of the 200 OK response message. Since the request was an invitation, the 200 OK response usually also contains the media capabilities of the called endpoint, and where it is expecting to receive the media data. ก 310482: Internet Telephony, 7: SIP (II) 4 ก 37
Basic call scenario SIP - Call Flow ก 310482: Internet Telephony, 7: SIP (II) 5 ก 37
Basic call scenario Example INVITE and its ACK ก 310482: Internet Telephony, 7: SIP (II) 6 ก 37
Basic call scenario Forking an INVITE request ก 310482: Internet Telephony, 7: SIP (II) 7 ก 37
Basic call scenario Provisional Responses ก 310482: Internet Telephony, 7: SIP (II) 8 ก 37
Basic call scenario Call Termination Send the BYE message Confirm with the ACK message Mark John ก 310482: Internet Telephony, 7: SIP (II) 9 ก 37
Basic call scenario Busy Call 486 BUSY HERE 600 BUSY EVERYWHERE ก 310482: Internet Telephony, 7: SIP (II) 10 ก 37
Basic call scenario Complete call ก 310482: Internet Telephony, 7: SIP (II) 11 ก 37
Basic call scenario Complete call ก 310482: Internet Telephony, 7: SIP (II) 12 ก 37
ก 310482: Internet Telephony, 7: SIP (II) 13 ก 37
A server could do as follow Register SIP user agents in a certain area (registrar behavior). Reply to other SIP server location requests (location server behavior). Handle outgoing calls of locally registered SIP devices (stateful proxy). Propagate simple instant-messaging messages without modification (stateless proxy). Implement certain complex applications such as contact center call distribution for calls to certain numbers, using back-to-back user agent behavior. ก 310482: Internet Telephony, 7: SIP (II) 14 ก 37
The registrar function A registrar is a server that accepts REGISTER requests. The same server may also implement other SIP functions (e.g., serve as a proxy). Registrars are needed to keep track of the current location of a user agent. The IP address of a user agent may change under a number of situations: connection via an ISP providing dynamic addresses, connection on a LAN that provides addresses via DHCP, or a roaming user. In order to be able to reach this user from its SIP address, an entity in the SIP network needs to maintain the mapping between SIP addresses and IP addresses: this is the purpose of the registrar. ก 310482: Internet Telephony, 7: SIP (II) 15 ก 37
The registrar function ก 310482: Internet Telephony, 7: SIP (II) 16 ก 37
The registrar function Updating registrar information ก 310482: Internet Telephony, 7: SIP (II) 17 ก 37
Locating users from SIP addresses SIP addresses are called URIs (Uniform Resource Identi.ers). URIs are really names (except those SIP addresses that use an IP host address, such as the address used in our simple call example), they do not refer directly to the transport address to be called but to an abstract entity that can reach the user directly or indirectly. SIP URIs have two major forms, an email-like form, and a telephone number form ก 310482: Internet Telephony, 7: SIP (II) 18 ก 37
Locating users from SIP addresses SIP URIs have two major forms email-like form The general format of email-form SIP URIs is user@host, where host is usually a fully qualified domain name that can be resolved to an IP address using the DNS system. In many cases the SIP address of a user will be the same as his email address. telephone number form The general format of a telephone number-form SIP is phone-number@host;user=phone Because SIP is still mainly used for telephone calls, this is one of the most widely used formats in SIP networks. The host part is optional and may indicate a server that can reach this phone number Most telephony systems, however, can decide where to route the phone call based on the phone number only so, the domain name part is not present in most telephony applications. ก 310482: Internet Telephony, 7: SIP (II) 19 ก 37
Common SIP URL formats ก 310482: Internet Telephony, 7: SIP (II) 20 ก 37
Redirect server A redirect server responds to an INVITE request with a 3xx reply (or rejects the call with a client error or server error) A redirect server can be used in conjunction with a registrar to redirect calls to the current location(s) of the caller. Redirect servers can be useful tools to improve the scalability of complex call management systems. Using maddr parameter of the Contact field: <sip:originaladdress@callcenter.com:9999; maddr = sophisticatedacd3.callcenter.com> ก 310482: Internet Telephony, 7: SIP (II) 21 ก 37
Redirect server ก 310482: Internet Telephony, 7: SIP (II) 22 ก 37
The proxy function Definition A proxy server acts as a server on one side (receiving requests) and as a client on the other side (possibly sending requests). Strictly speaking, a proxy should be mostly transparent to user agent messages, simply passing messages and changing them in very limited ways. A proxy can forward a request without any change to its final destination, it can decide to validate requests, authenticate users, fork requests, resolve addresses, and cancel pending calls, etc. Depending on the level of control the proxy has over the SIP messages it processes it can be a stateless proxy, a stateful proxy, or even a back-to-back user agent ก 310482: Internet Telephony, 7: SIP (II) 23 ก 37
The proxy function A stateless proxy simply chooses the next hop destination for an incoming SIP message using To header information keeps no state for the call or even the transaction (it will not handle retransmissions, but simply pass them on transparently). For instance, a stateless proxy will not carry out any local processing for a CANCEL request other than forward it, and will not even acknowledge locally any response, but simply pass it transparently to the original sender of the request. ก 310482: Internet Telephony, 7: SIP (II) 24 ก 37
The proxy function A stateful proxy more useful, as they can keep any state relative to the call and all transactions involved in the call. Stateful proxies also manage locally some aspects of the transactions (e.g., they will handle retransmissions locally and acknowledge the final responses, except 200 OK and CANCEL requests). Stateful proxies can serve most call control purposes required in a SIP network Since a stateful proxy memorizes when a call has begun, it can generate call detail records about the duration of the call when the call ends. ก 310482: Internet Telephony, 7: SIP (II) 25 ก 37
The proxy function A stateful proxy a simple call ก 310482: Internet Telephony, 7: SIP (II) 26 ก 37
The proxy function A stateful proxy 200 OK response ก 310482: Internet Telephony, 7: SIP (II) 27 ก 37
The proxy function Billing for a SIP call The user calls through the proxy In order to force the user to go through the proxy to make calls, one option is to control a firewall in the network from the proxy This prevents the user from trying to bypass the call-accounting feature of the proxy. In reality, all VoIP devices in the network are configured to accept calls only if the INVITE comes from the service provider proxy this can be done by simple access control lists (ACLs) restricting SIP signaling traffic on the routers connected to these resources. ก 310482: Internet Telephony, 7: SIP (II) 28 ก 37
The proxy function Billing for a SIP call ก 310482: Internet Telephony, 7: SIP (II) 29 ก 37
Multiparty Conferencing Multicast Conferencing A multicast conference is a conference in which media streams are sent using multicast When multicast signaling is used to establish multiparty conferences, SIP requests are carried using UDP, since this is the only transport protocol that can be multicast over IP. Multicast requests are expected to be used mostly to set up conference calls, and therefore the destination URL will generally be a conference name rather than an individual. ก 310482: Internet Telephony, 7: SIP (II) 30 ก 37
Multiparty Conferencing Multicast Conferencing ก 310482: Internet Telephony, 7: SIP (II) 31 ก 37
Multiparty Conferencing Multi-unicast conferencing In the case of multi-unicast signaling, there is no significant difference from the point-to-point case, except that the SDP session descriptions indicate multicast addresses and the offer/answer model is also a bit modified compared with the unicast media case The support of SIP for multi-unicast media conferences is limited. A central entity can be set up to act as an MCU to either mix or switch incoming media streams. The central bridge could implement very simple foor control by using RE- INVITES with the inactive, recvonly, or sendrecv SDP attributes. ก 310482: Internet Telephony, 7: SIP (II) 32 ก 37
Multiparty Conferencing Multi-unicast conferencing ก 310482: Internet Telephony, 7: SIP (II) 33 ก 37
Multiparty Conferencing Ad hoc conferencing SIP provides a simple and elegant way to switch from an existing point-topoint unicast call (AB) to a multiparty multicast conference (ABC...). The person (e.g., A) who wants to invite a new participant to the conference sends an INVITE message to the other party (B) and the new participant (C) with the parameters for the new session (i.e., a multicast address and eventually new coders instead of a unicast address) but keeps the old Call-ID. Keeping the same Call-ID tells B that this is not a new call, but new parameters for the existing call. This method can also be used to change session parameters in an existing call. ก 310482: Internet Telephony, 7: SIP (II) 34 ก 37
Multiparty Conferencing Ad hoc conferencing Ad hoc conferencing using unicast streams is also possible; in this case the new INVITE message redirects all streams to a media-mixing function. Many SIP phones implement such a mixing function locally for up to three media streams (three-way conferencing), in which case it is not necessary to redirect the media streams, the phone simply activates the mixing function for all the streams it receives. ก 310482: Internet Telephony, 7: SIP (II) 35 ก 37
Conclusion ก 310482: Internet Telephony, 7: SIP (II) 36 ก 37
Conclusion Conclusion SIP quickly absorbs new applications and extensions (IETF drafts are a good wayof documenting most of these extensions before they actually get to the standardif indeed they do). There is no stability to the protocol: little or no attention is paid to actual deployment and migration issues. Priority is given to the addition of features, as opposed to securing a robust design first and then add features. The ITU approach is almost the exact opposite: ITU authored many fundamental tools for telecom products designs, like the ASN.1 syntax or the SDL state machine description language, and only then designed protocols to build on this robust set of foundation tools. SIP has a very broad scope, but is still very fragile as a protocol. Many buzzword applications (e.g., presence) are getting much of the attention and standardization effort, while more fundamental revenue-generating features, but more boring, still have issues. This is the 99% complete syndrome. SIP still has many open issues for its application to basic telephony. ก 310482: Internet Telephony, 7: SIP (II) 37 ก 37