Wednesday, January 21, 2009

SIP domain and DNS domain

If you deal with SIP products (such as CUPS/CUPC), you'll have to deal with SIP domain sooner or later.

Here are some of the most asked questions:
1) What is a SIP domain?
2) Does the SIP domain has to match the DNS domain?
3) What if I'm not using DNS with the application?

SIP domain is more like on application layer versus DNS domain on network layer.

Let's take a look at a real life example. Let say, you have a SIP application that can send instant message and make phone calls (such as CUPC and MOC).

When the application initiate a call, the SIP message would look like this "INVITE 6002@acme.com". This message means - "I want to call extension number 6002 in ACME company".

Usually, the first stop of this SIP message would be your local proxy server (SIP proxy). The local proxy server will determine how to route this message to its destination.

Whenever a SIP proxy server receive a SIP message, it will always look at the domain part of the SIP request. Based on the domain, SIP proxy will determine how to route the message.

Here's the detailed workflow:

1) If the SIP message's domain matches with the SIP domain configured on SIP proxy, SIP proxy will handle that within the same domain. Otherwise, SIP proxy will forward it to a different domain (or just ignore/discard it depends on the design).

This is very important. Let say, CUPC sent a message "INVITE johndoe@acme.com" to SIP proxy. However, the SIP domain configured on SIP proxy was "abc.com". The SIP proxy will treat it as "foreign message" and try to forward it to its destination domain or discard/ignore it.

2) SIP proxy will look at the SIP static routes to determine the messages' destination.

SIP static routes are configured on the SIP proxy server on application layer. Don't confuse it with TCP/IP static routes.

On CUPS 6.x, you may configure static routes on CUPS Admin > Cisco Unified Presence > Proxy Server > Static Routes. On OCS 2007, you may configure static routes by right-click on the "Front End" folder > properties > routing.

You may configure IP address or FQHN for static routes.

For example:

Static route: acme.com ---> apple.acme.com
This means for all SIP messages with SIP domain acme.com will be routed to a host with FQHN apple.acme.com.

Static route: acme.com ---> 192.168.1.100
This means for all SIP messages with SIP domain acme.com will be routed to a host with IP address 192.168.1.100.

Keep in mind, the above is on application layer.

3) If there's no static route configured, SIP Proxy would try to determine the next hop by name resolution.

If SRV records were configured, SIP proxy would try to resolve the domain by SRV records.

Then SIP proxy would try to resolve by A records.

Now lets answer the questions.

Q1: What is a SIP domain?
Answer: A SIP domain is an application layer configuration that define the management domain of a SIP proxy.

2) Does the SIP domain has to match the DNS domain?
Answer: Yes, it has to match the DNS domain in most of the scenarios. And it's strongly recommended to match the SIP domain with DNS domain.

3) What if I'm not using DNS with the application?
Answer: You may or may not be able to use application features if you don't have appropriate name resolution configured. For example, in CUPC 1.2.x, you may use presence feature without name resolution to the presence FQHN. On CUPC 7.0.x, it doesn't work (because they changed the design on 7.0.x). If you don't have a DNS, you may use local host files to do name resolution.

To be continued...

2 comments:

  1. Hello,

    I bought your book on January 6th, however I haven't received anything yet please advise
    this is the order number
    #2845275

    ReplyDelete