IP Telephony Cookbook by Saverio Niccolini, Jorg Ott, et al - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

UAC

Figure 2.11 UAC and UAS

Figure 2.11 shows three user agents and one stateful forking proxy. Each user agent contains UAC

and UAS.The part of the proxy that receives the INVITE from the calling party, in fact, acts as a UAS.When forwarding the request statefully, the proxy creates two UACs, each of them responsible for one branch.

In the example, called party B picked up and later, when he wants to tear down the call, he sends a BYE. At this time, the user agent that was previously UAS becomes a UAC and vice versa.

P.32

[IP Telephony Cookbook] / Technological Background

2.2.2.2.2 Proxy servers

SIP allows the creation of an infrastructure of network hosts called proxy servers. User agents can send messages to a proxy server. Proxy servers are very important entities in the SIP

infrastructure.They perform routing of a session invitations according to invitee's current location, authentication, accounting and many other important functions.

The most important task of a proxy server is to route session invitations ‘closer’ to a called party.

The session invitation will usually traverse a set of proxies until it finds one which knows the actual location of the called party. Such a proxy will forward the session invitation directly to the called party and the called party will then accept or decline the session invitation.

There are two basic types of SIP Proxy Servers, stateless and stateful.

2.2.2.2.2.1 Stateless servers

Stateless servers are simple message forwarders.They forward messages independently of eachother. Although messages are usually arranged into transactions (see Section 2.2.2.4).

Stateless proxies do not take care of transactions.

Stateless proxies are simple, but faster than stateful proxy servers.They can be used as simple load balancers, message translators and routers. One of drawbacks of stateless proxies is that they are unable to absorb re-transmissions of messages or perform more advanced routing, for instance, forking or recursive traversal.

2.2.2.2.2.2 Stateful servers

Stateful proxies are more complex. Upon reception of a request, stateful proxies create a state and keep the state until the transaction finishes. Some transactions, especially those created by INVITE, can last quite long (until the called party picks up or declines the call). Because stateful proxies must maintain the state for the duration of the transactions, their performance is limited.

The ability to associate SIP messages into transactions gives stateful proxies some interesting features. Stateful proxies can perform forking; that means that upon reception of a message, two or more messages will be sent out.

Stateful proxies can absorb re-transmissions because they know from the transaction state if they have already received the same message (stateless proxies cannot do the check because they keep no state).

Stateful proxies can perform more complicated methods of finding a user. It is, for instance, possible to try to reach user's office phone and when he does not pick up, redirect the call to his cell phone. Stateless proxies cannot do this because they have no way of knowing how the transaction targeted to the office phone finished.

Most SIP Proxies today are stateful because their configuration is usually very complex.They often perform accounting, forking and some sort of NAT traversal aid and all those features require a stateful proxy.

P.33

[IP Telephony Cookbook] / Technological Background

2.2.2.2.2.3 Proxy server usage

In a typical configuration, each centrally-administered entity (a company, for instance) has its own SIP Proxy Server, which is used by all user agents in the entity. Suppose that there are two companies, A and B, and each of them has its own proxy server. Figure 2.12 shows how a session invitation from employee Joe in company A will reach employee Bob in company B.

DNS Server

2. SIP SRV

for b.com

Company A

3. proxy.b.com

Company B

proxy.a.com

Joe

proxy.b.com

1. INVITE

4. INVITE

5. INVITE

5.6.7.8

Bob

6. BYE