For most cisco UC guys, the concept of sip we are used to is a little restricted to the functionality that cisco cucm, cube etc use.
In most scenarios, these devices acts as B2BUA and as such we do not see the sip proxy functionality of the sip architecture.
Well all that has changed with the introduction of Expressway servers for MRA. Expressway- E and C fully utilize the sip proxy functionality even in ways the traditional VCS-E and C do not
As such I felt its a good idea to understand the sip messaging that enable proxies like the expressways function.
In this short write up we will be looking at sip traces from jabber and the expressway servers to fully understand how sip messaging flows from one end to the other.
Before we go ahead, there are three important sip headers that I need to explain. I previously wrote a documentation on understanding sip traces.
Please refer to this here (https://supportforums.cisco.com/document/113271/understanding-sip-traces)to get a solid understanding of sip messaging.
Moving on, we need to understand three key headers that are used by sip proxies for sip messages.
The destination of a sip request is normally taken from its request-URI (RURI), but to force traffic to use a certain path, a client/server can insert a route header. UAs may include a Route header field in an initial request to force that request to visit and potentially be serviced by one or more proxies
once a route header is present, the RURI should be disregarded and the request should be sent directly to the URI contained in the route header.
The record route header records the path for later use with the route header. A proxy forwarding a request uses this header to demand to stay in the signaling path of the dialog. It contains the URI where the proxy wishes the requests be addressed.
The UAS must if it receives a dialog creating request (e.g. INVITE) copy any available Record-Route headers into all the responses it creates to ensure that the UAC also becomes informed of the so called “Route set”. The term Route set refers to the entire list of proxies that have added themselves ti the record route header.
Now let’s look at a jabber sample trace for MRA call..
In this trace, here is our request-URI. Note that request URI is extracted from a request as follow:
METHOD URI sip/2.0s
So from our trace, the request is as follows:
INVITE sip:5001@uclabcucm-pub;user=phone SIP/2.0
Method=INVITE and URI= sip:5001@uclabcucm-pub
In a traditional cisco deployment, the request would have been sent to the uclabcucm-pub, however because there is a ROUTE header present,
this RURI is ignored and the request is sent instead to:
As we can see this is sent directly to the expressway-e server or we can say that the call is proxied through the expressway-e server.
It is important to note that when a proxy generates a request, it must strip its own Route header from the outgoing request. As you can imagine this could lead to call loop and failures if this is not done. So here is the outbound INVITE sent by expressway-e after receiving the INVITE from jabber.
Note that it has stripped of its route header and replaced it with a new route header:
Now let’s move on to what happens on expressway-C.
Here expressway-C receives the INVITE from expressway-E
NB: Observe that the route header and record route headers are both the same as seen in the INVITE sent by expressway-E
Now that a search rule has been matched and observer that this search rule is the auto generated rule after expressway completes the UC servers discovery.
Now things get a little more interesting. Expressway-C sends several INVITEs out based on its route headers.
Here is the first INVITE sent.
From this trace Expway-C has added four additional route headers to its outbound requests.
The first is sent to its internal port 5071, this is the port used for B2BUA calls.
The second route header is used to send the call to sip port 5061 on itself.
The next route header routes the call out via the CEtcpuclabcucm zone
The next one is used to route the call to CUCM using tcp on port 5060
It is important to note that as the request is sent to each destination in the route header, the route header is removed. This is very important. So here is the INVITE as expressway-C sends them out.
INVITE sent to port 5061 on itself. Observe that the route header has reduced to four and more importantly the first route header which was already processes has been removed.
The next header I want us to look at is the VIA header.
VIA header: (also called the "sent-by" field)
Responses always follow the VIA header, except for non-INVITE methods such as (ACK and BYE) where the responses are sent to the contact header.
UA/proxy uses the VIA header to indicate where they want to receive the response to their requests. There are a few rules that is important to know with VIA header especially with proxies.
1. Each UA/proxy adds the via header to indicate where it wants to receive a response
2.All responses are routed backwards, along the VIA header path, stripping as it goes through.
3. Receiving proxy checks that the top VIA header is its own, otherwise it drops the response
Lets look at the following examples...
Here is an INVITE from jabber to expressway-e. We can see that the VIA header shows the ip address of jabber client..This is where the response to this request should be sent to.
Next we see expressway-sends this request to expressway-C. Observer that the VIA header has increased and the top most via header is now the one of the expressway-e.
( You will see the VIA header from jabber because when a UA/proxy receives a request it copies the mandatory headers and then use them as part of its own new request)
When the response is created by the destination (UA/proxy), it starts with a copy of all the mandatory headers which includes the via header and then sends the response to the top-most value.
This next trace shows the expressway-C sending this request to itself and to cucm. Observer that the top-most value now has changed to the ip of expressway-c
I hope this helps you understand the sip messaging for the proxy functionality of the expressway servers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.