public string CreateBranchId()
{
string routeStr = (Header.Routes != null) ? Header.Routes.ToString() : null;
string toTagStr = (Header.To != null) ? Header.To.ToTag : null;
string fromTagStr = (Header.From != null) ? Header.From.FromTag : null;
string topViaStr = (Header.Vias != null && Header.Vias.TopViaHeader != null) ? Header.Vias.TopViaHeader.ToString() : null;
return CallProperties.CreateBranchId(
SIPConstants.SIP_BRANCH_MAGICCOOKIE,
toTagStr,
fromTagStr,
Header.CallId,
URI.ToString(),
topViaStr,
Header.CSeq,
routeStr,
Header.ProxyRequire,
null);
}