<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DEAAR3s4eip7ImA9WhRaE0Q.&quot;"><id>tag:blogger.com,1999:blog-2763868248129769156</id><updated>2012-02-16T04:52:26.532-08:00</updated><title>My Two Cents</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://sarvpriyak.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://sarvpriyak.blogspot.com/" /><author><name>Sarvpriya</name><uri>http://www.blogger.com/profile/08576732695692728259</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/gOZkC" /><feedburner:info uri="blogspot/gozkc" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0cBSX06eSp7ImA9Wx5TEU4.&quot;"><id>tag:blogger.com,1999:blog-2763868248129769156.post-372879089313359139</id><published>2010-07-26T00:57:00.000-07:00</published><updated>2010-07-26T00:57:38.311-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-26T00:57:38.311-07:00</app:edited><title>Locating SIP Servers</title><content type="html">&lt;span style="font-family: Verdana,sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-style-span"&gt;Recently I implemented &lt;a href="http://www.ietf.org/rfc/rfc3263.txt"&gt;RFC3263&lt;/a&gt; in one of my projects. In this post I will explain my findings.&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="font-family: Verdana,sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="font-family: Verdana,sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span"&gt;INTRODUCTION&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-size: x-small;"&gt;&lt;span class="Apple-style-span"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: black; font-size: x-small;"&gt;&lt;span class="Apple-style-span"&gt;If we look at a typical SIP configuration also known as &lt;a href="http://en.wikipedia.org/wiki/Session_Initiation_Protocol"&gt;SIP&lt;/a&gt; “trapezoid”, we will observe that as part of the call flow: -&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;style type="text/css"&gt;
 &lt;!--
  @page { margin: 0.79in }
  P { margin-bottom: 0.08in }
 --&gt;
 
&lt;/style&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_XK5DFCganp0/TER4lOMztSI/AAAAAAAACqQ/w52M9lctnig/s1600/SIPTrapezoid.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="176" src="http://2.bp.blogspot.com/_XK5DFCganp0/TER4lOMztSI/AAAAAAAACqQ/w52M9lctnig/s320/SIPTrapezoid.jpg" width="320" /&gt;&lt;/a&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;
 &lt;!--
  @page { margin: 0.79in }
  P { margin-bottom: 0.08in }
 --&gt;
 
&lt;/style&gt; &lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif; margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;
 &lt;!--
  @page { margin: 0.79in }
  P { margin-bottom: 0.08in }
  A:link { so-language: zxx }
 --&gt;
 
&lt;/style&gt; &lt;/div&gt;&lt;ul style="font-family: Verdana,sans-serif;"&gt;&lt;li&gt;&lt;span style="color: black; font-size: x-small;"&gt;proxy I  needs to determine a SIP server for Domain B. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black; font-size: x-small;"&gt;while sending responses back, in case proxy I fails after forwarding  the request, proxy II needs to send responses to any backup of proxy I.&lt;/span&gt;   &lt;/li&gt;
&lt;/ul&gt;&lt;div style="font-family: Verdana,sans-serif; margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;
 &lt;!--
  @page { margin: 0.79in }
  P { margin-bottom: 0.08in }
 --&gt;
 
&lt;/style&gt; &lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif; margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;PROBLEM DEFINITION&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="margin: 0in 0in 5.75pt; text-align: justify;"&gt;&lt;span style="color: black; font-family: Verdana; font-size: x-small;"&gt;Even if there is no proxy configured, if a UAC wants to send message to UAS, then it needs to determine the IPaddress, port and protocol&amp;nbsp;if not given in the Request-URI. Also DNS lookup processing can be required at every hop i.e. whenever a UAC wants to forward a request to the next hop.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 5.75pt; text-align: justify;"&gt;&lt;b&gt;&lt;span style="font-size: x-small;"&gt;&lt;i&gt;&lt;span style="color: black; font-family: Verdana;"&gt;SIP URI Samples&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: Verdana; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: black; font-family: Verdana; font-size: x-small;"&gt;Typically a SIP uri is in the below format(s):&amp;nbsp;-&lt;/span&gt;&lt;span style="color: black; font-family: Verdana; font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt; &lt;/span&gt;&lt;i&gt;&lt;span style="color: black; font-family: Verdana; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="font-size: x-small;"&gt;FORMAT1: sip:support@phonesystem.3cx.com&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 5.75pt; text-align: justify;"&gt;&lt;span style="font-size: x-small;"&gt;In this case ipaddress, port and protocol needs to be determined. &lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 5.75pt; text-align: justify;"&gt;&lt;style type="text/css"&gt;
 &lt;!--
  @page { margin: 0.79in }
  P { margin-bottom: 0.08in }
 --&gt;
&lt;/style&gt;&lt;span style="font-size: x-small;"&gt;&lt;i&gt;FORMAT2: sip:support@172.12.23.43:655321; transport=TCP&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 5.75pt; text-align: justify;"&gt;&lt;span style="font-size: x-small;"&gt;No DNS query is needed to send the request. But if sending of response fails to the Via address then DNS lookup is required.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 5.75pt; text-align: justify;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;Also choice of protocol is very important since &lt;a href="http://en.wikipedia.org/wiki/Session_Initiation_Protocol"&gt;SIP&lt;/a&gt; supports UDP, TCP, TLS over TCP and SCTP. Incase protocol is not mentioned, in live scenarios, there will be situation whereby UAC has its own list of supported protocols with respective priorities. UAC needs to find the list of supported protocols of the UAS with theirrespective priorities and then find an intersecting protocol b/w the two lists which UAS prefers the most.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;Coming to the second aspect, since SIP transactions require some kind of human intervention in order to send responses (for e.g. generating 2xx or 403 response), it is common for sip elements to fail in middle of a transaction. Thus if proxy2 now wants to send back response to proxy1 which failed, then proxy2 needs to discover the backup for proxy1.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;NOTE: Protocol cannot be changed in such scenarios. Only port and the ipaddress need to be &lt;br /&gt;
determined.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;Now let us see what all SIP UAC’s and UAS’s have to do for DNS processing.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span style="color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span style="color: black; font-family: Verdana;"&gt;&lt;span class="Apple-style-span"&gt;UAC USAGE&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;div style="text-align: justify;"&gt;&lt;pre&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: x-small; white-space: normal;"&gt;The UAC uses either the SIP URI in the Request-URI or the first URI in Route header to determine the next hop. However it is to be noted that after applying these procedures, UAC will not rewrite the URI. The information will be use by the transport layer only to send the packet.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: x-small; white-space: normal;"&gt;DNS query is done once per transaction i.e once the sip server has been contacted, all the retransmissions of the request, ACK for non 2xx responses and very importantly Cancel will be sent to the same address.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: x-small; white-space: normal;"&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span class="Apple-style-span"&gt;Ack to 2xx is a new transaction in itself and it also has considerations of Record route. If a UA didn’t record route, it will not receive the ACK&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: x-small; white-space: normal;"&gt;&lt;span style="color: black;"&gt;&lt;span class="Apple-style-span"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: x-small; white-space: normal;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;i&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: x-small; white-space: normal;"&gt;Rules for selecting the transport protocol:-&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span lang="EN-IN" style="font-family: Verdana; font-size: x-small; line-height: 115%;"&gt;&lt;span class="Apple-style-span"&gt;If the URI specifies the transport protocol, that transport is used. Otherwise&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span lang="EN-IN" style="font-family: Verdana; font-size: x-small; line-height: 115%;"&gt;&lt;span class="Apple-style-span"&gt;If target is numeric IP address, use UDP for a SIP URI and TCP for SIPS URI. Otherwise&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span lang="EN-IN" style="font-family: Verdana; font-size: x-small; line-height: 115%;"&gt;&lt;span class="Apple-style-span"&gt;If target is not numeric but port is specified, use UDP for SIP URI and TCP for SIPS URI. Otheriwse&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span lang="EN-IN" style="font-family: Verdana; font-size: x-small; line-height: 115%;"&gt;&lt;span class="Apple-style-span"&gt;If nothing is specified i.e no transport or port is specified and target is not numeric IP address, perform NAPTR query for the domain in the URI. The relevant records for transport selection are those with NAPTR service fields with values “ SIP+D2X” and “SIPS+D2X”, where X represents transport. Eg D2U for UDP, D2T for TCP, D2S for SCTP.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;&lt;span class="Apple-style-span"&gt; These NAPTR records map domain to SRV record for contacting a server with the specific transport protocol in the NAPTR services field. The resource record will contain an empty regular expression and replacement value, which is the SRV record for that particular transport protocol. There is separate entry for each transport protocol supported.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;&lt;span class="Apple-style-span"&gt;Consider if &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;a href="sip:user@example.com"&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span class="Apple-style-span"&gt;sip:user@example.com&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;&lt;span class="Apple-style-span"&gt; needs to be solved. NAPTR query for the domain returned the following NAPTR records:-&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;&lt;span class="Apple-style-span"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; order pref flags service&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; regexp&amp;nbsp; replacement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;&lt;span class="Apple-style-span"&gt;&amp;nbsp;IN NAPTR 50&amp;nbsp;&amp;nbsp; 50&amp;nbsp; "s"&amp;nbsp; "SIPS+D2T"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;""&amp;nbsp; _sips._tcp.example.com.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;&lt;span class="Apple-style-span"&gt;&amp;nbsp;IN NAPTR 90&amp;nbsp;&amp;nbsp; 50&amp;nbsp; "s"&amp;nbsp; "SIP+D2T"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ""&amp;nbsp; _sip._tcp.example.com&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;&lt;span class="Apple-style-span"&gt;&amp;nbsp;IN NAPTR 100&amp;nbsp; 50&amp;nbsp; "s"&amp;nbsp; "SIP+D2U"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ""&amp;nbsp; _sip._udp.example.com.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;&lt;span class="Apple-style-span"&gt;This indicates that the server supports TLS over TCP, TCP, and UDP in the given preference. Since the client supports TCP and UDP, TCP will be used, targeted to a host determined by an SRV lookup of _sip._tcp.example.com. That lookup would return&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;&lt;span class="Apple-style-span"&gt;&amp;nbsp;&amp;nbsp; ;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;st1:place w:st="on"&gt;&lt;st1:placename w:st="on"&gt;&lt;st1:placename w:st="on"&gt;&lt;span class="Apple-style-span"&gt;Priority&lt;/span&gt;&lt;/st1:placename&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;st1:placename w:st="on"&gt;&lt;st1:placetype w:st="on"&gt;&lt;span class="Apple-style-span"&gt;Weight&lt;/span&gt;&lt;/st1:placetype&gt;&lt;/st1:placename&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;st1:placetype w:st="on"&gt;&lt;span class="Apple-style-span"&gt;Port&lt;/span&gt;&lt;/st1:placetype&gt;&lt;/st1:placename&gt;&lt;/st1:place&gt;&lt;span class="Apple-style-span"&gt;&amp;nbsp;&amp;nbsp; Target&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;&lt;span class="Apple-style-span"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IN SRV&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5060&amp;nbsp;&amp;nbsp; server1.example.com&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;&lt;span class="Apple-style-span"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IN SRV&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5060&amp;nbsp;&amp;nbsp; server2.example.com&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-IN" style="font-family: Verdana; font-size: x-small; line-height: 115%;"&gt;&lt;span class="Apple-style-span"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: x-small; line-height: 115%;"&gt;&lt;span class="Apple-style-span"&gt;If&amp;nbsp; no NAPTR records are found, the client constructs SRV queries for transport protocols it supports, and if no NAPTR records are found, the client constructs SRV queries for transport protocols it supports. If no SRV records are found, the client should use TCP for a SIPS URI, and UDP for a SIP URI.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="ListParagraphCxSpMiddle"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;/span&gt;&lt;span lang="EN-IN" style="font-family: Verdana; font-size: x-small; line-height: 115%;"&gt;&lt;span class="Apple-style-span"&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span lang="EN-IN" style="font-family: Verdana; font-size: x-small; line-height: 115%;"&gt;&lt;span class="Apple-style-span"&gt;&lt;i&gt;Determining Port and IP Address&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="ListParagraphCxSpMiddle"&gt;&lt;ul&gt;&lt;li&gt;&lt;span lang="EN-IN" style="font-family: Verdana; font-size: x-small; line-height: 115%;"&gt;&lt;span class="Apple-style-span"&gt;If target is a numeric IP address, the client uses that address. If the URI also contains a port, it uses that port. If no port is specified, it uses the default port for the particular transport protocol. Otherwise&lt;/span&gt;&lt;/span&gt;. &lt;span lang="EN-IN" style="font-family: Verdana; font-size: x-small; line-height: 115%;"&gt;&lt;span class="Apple-style-span"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span lang="EN-IN" style="font-family: Verdana; font-size: x-small; line-height: 115%;"&gt;&lt;span class="Apple-style-span"&gt;If the Target was not a numeric IP address, but a port is present in the uri, the client performs an A or AAAA record lookup of the domain name giving the list of IP addresses which can be contacted at specified port and protocol already determined.&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-IN" style="font-family: Verdana; font-size: x-small;"&gt;&lt;span class="Apple-style-span"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Verdana;"&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Verdana;"&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;Server Usage&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Verdana;"&gt;A SIP UAS normally sends the response on the connection the request arrived (TCP) or to the UrI and port present in VIA field. DNS query is required to provide failover support.&lt;o:p&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Verdana;"&gt;Following rules are followed:-&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;span lang="EN-IN" style="font-family: Verdana; line-height: 115%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="font-size: x-small;"&gt;&lt;span lang="EN-IN" style="font-family: Verdana; line-height: 115%;"&gt;Examine the sent-by in the topmost VIA field. If it contains a numeric IP address, response will be sent to that address, take protocol from VIA field and port for sent-by. If port is not given, then use default port for the protocol. Otherwise&lt;o:p&gt;&lt;/o:p&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;span lang="EN-IN" style="font-family: Verdana; line-height: 115%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: x-small;"&gt;&lt;span lang="EN-IN" style="font-family: Verdana; line-height: 115%;"&gt;If sent-by field contains domain name and port, query for A or AAAA records with that name. This will give a list of entries which can be tried one by one. Otherwise&lt;o:p&gt;&lt;/o:p&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;span lang="EN-IN" style="font-family: Verdana; line-height: 115%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: x-small;"&gt;&lt;span lang="EN-IN" style="font-family: Verdana; line-height: 115%;"&gt;If domain name and no port is given in sent-by field, query SRV records for that domain name using “_sips” for TLS in VIA field, “_sip” for others. This will give list of addresses which can be tried one by one giving preference to the topmost.&lt;/span&gt;&lt;b&gt;&lt;span lang="EN-IN" style="color: black; font-family: Verdana; font-size: small;"&gt;&lt;span class="Apple-style-span"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;&lt;span lang="EN-IN" style="color: black; font-family: Verdana; font-size: small;"&gt;&lt;span class="Apple-style-span"&gt;For outbound call&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.25in;"&gt;&lt;div class="ListParagraphCxSpLast" style="margin-left: 0in;"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse;"&gt;&lt;tbody&gt;
&lt;tr&gt;   &lt;td style="background: none repeat scroll 0% 0% rgb(224, 224, 224); border: 1pt solid windowtext; padding: 0in 5.4pt; width: 1.2in;" valign="top" width="115"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Host name&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background: none repeat scroll 0% 0% rgb(224, 224, 224); border: 1pt solid windowtext; padding: 0in 5.4pt; width: 1.25in;" valign="top" width="120"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Protocol&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background: none repeat scroll 0% 0% rgb(224, 224, 224); border: 1pt solid windowtext; padding: 0in 5.4pt; width: 81pt;" valign="top" width="108"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Port number&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background: none repeat scroll 0% 0% rgb(224, 224, 224); border: 1pt solid windowtext; padding: 0in 5.4pt; width: 2.5in;" valign="top" width="240"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Action&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 1.2in;" valign="top" width="115"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;Numeric&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 1.25in;" valign="top" width="120"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;UDP&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 81pt;" valign="top" width="108"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;Not present&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.5in;" valign="top" width="240"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;Port no is 5060&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 1.2in;" valign="top" width="115"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;FQDN&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 1.25in;" valign="top" width="120"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;UDP&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 81pt;" valign="top" width="108"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;Present&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.5in;" valign="top" width="240"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;AAAA query for ip   address with the specified port.&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 1.2in;" valign="top" width="115"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;FQDN&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 1.25in;" valign="top" width="120"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;UDP&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 81pt;" valign="top" width="108"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;Not Present&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.5in;" valign="top" width="240"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;Do SRV query.&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;If records found   follow rfc 2782&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;If no records are   found, then do AAAA query and use the IP address and default port of 5060.&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 1.2in;" valign="top" width="115"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;Numeric&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 1.25in;" valign="top" width="120"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;UDP&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 81pt;" valign="top" width="108"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;Present&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.5in;" valign="top" width="240"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;No DNS&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 1.2in;" valign="top" width="115"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;FQDN&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 1.25in;" valign="top" width="120"&gt;&lt;div align="center" style="margin: 0in 0in 5.75pt; text-align: center;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;Not present&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 81pt;" valign="top" width="108"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;Not Present&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.5in;" valign="top" width="240"&gt;&lt;div style="margin: 0in 0in 5.75pt;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;NAPTR Query&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/gOZkC/~4/HHZuwt4cwr8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sarvpriyak.blogspot.com/feeds/372879089313359139/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sarvpriyak.blogspot.com/2010/07/locating-sip-servers.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2763868248129769156/posts/default/372879089313359139?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2763868248129769156/posts/default/372879089313359139?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/gOZkC/~3/HHZuwt4cwr8/locating-sip-servers.html" title="Locating SIP Servers" /><author><name>Sarvpriya</name><uri>http://www.blogger.com/profile/08576732695692728259</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_XK5DFCganp0/TER4lOMztSI/AAAAAAAACqQ/w52M9lctnig/s72-c/SIPTrapezoid.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://sarvpriyak.blogspot.com/2010/07/locating-sip-servers.html</feedburner:origLink></entry></feed>
