URI, R-URI, and Branches

The URI, Uniform Resource Identifier, is used to identify a user uniquely. The URI is used as an address when INVITEing a party to a call. A typical SIP URI is in the form sip:username@domain.com. The original URI found in the first line of a SIP message is called the request-URI (R-URI). This uri can be referred to in ser.cfg using uri (ex. if(uri=~sip:username@.*) )

The uri can be manipulated throughout ser.cfg using many different functions from different modules. For example, lookup(location) will take the uri as changed through uri manipulations, look it up in the location database and rewrite the uri to the correct contact information (including @ipaddress:port). When t_relay() is called, the URI in it final form after transformations will be used as the target URI.

Some functions, like lookup(location) can append branches to the target set of URIs. This means that when t_relay() is called, the INVITE message will be duplicated to all the URIs in the target set. Note that the uri command will still refer to the request-URI in its (potentially) transformed form. The core command revert_uri() will replace the current target URI back to the original request-URI.

NOTE: A backported version of xlog (to 0.9.x) has new parameters that can be used to print the full target set. The backported version can be found on http://www.onsip.org/