Request-URI

From Pbxnsip Wiki

Jump to: navigation, search

SIP packets usually look like this:

INVITE sip:123@domain.com SIP/2.0
From: A <sip:345@domain.com>;tag=123
To: B <sip:422@domain.com>
Call-ID: 32dumt430pt035p
CSeq: 234 INVITE
Content-Length: 123
Content-Type: application/SDP

[SDP not shown here]

The first line contains the "method" (INVITE) that should be performed. The resource that is being addressed is behind the method (in this case "sip:123@domain.com"). This resource is called the "Request-URI". URI stands for "Unique Resource Identifier" which is quite similar to URL which we know from http. Instead of http the word "sip" indicates that a SIP resource should be used.

The Request-URI has the following format (well, in simplified form):

scheme : user @ domain : port ; parameter = value ...

The "scheme" identifies what resource should be used and is usually "sip". If the scheme is "sips" the PBX will try to make this call secure on both sides of the call.

The "user" identifies the desired account or telephone number. It can be a numeric or alphanumeric, and it can even contain all kinds of special characters.

The domain name can be a IP address in the a.b.c.d. form or a domain name. It identifies the domain that should process the request. For SIP proxies, this domain name is used for rouing purposes. In the PBX it is only used for locating the right domain.

The port number identifies the port. This part of the URI is not necessary. If it is present, it overrides the DNS resolution (DNS NAPTR, SRV) and tells the routing subsystem only to do a DNS A lookup.

The URI may contain any number of parameters, known or unknown. There are a couple of known parameters:

  • The "maddr" paramter explicitly tells the routing subsystem which IP address to use. It must have the a.b.c.d IP address form. This parameter is useful if the subsystem should not do a dNS lookup, but the destination should still be able to determine which domain is being called.
  • The "line" parameter is not a predefined parameter, but many implementations (including the pbxnsip) use this parameter to identify where the call goes to.
  • If the "user" parameter is "phone", that means that the user part is a telephone number and the domain should not be displayed on the display.
Personal tools
Getting Help