The Replaces header only has parameters, no headers. Parameters of from ...;name=value;name2=value2. Specific parameters: tag. The Replaces header only has parameters, no headers. Parameters of from ...;name=value;name2=value2. Specific parameters: callid,to-tag,from-tag,early-flag. A Replaces header field MUST contain exactly one to-tag and exactly one from-tag, as they are required for unique dialog matching. For compatibility with dialogs initiated by RFC 2543 [9] compliant UAs, a tag of zero matches both tags of zero and null. A Replaces header field MAY contain the early-flag.
Example #1
0
        public static SIPReplacesHeader ParseReplacesHeader(string replacesHeaderStr)
        {
            try
            {
                SIPReplacesHeader replacesHeader = new SIPReplacesHeader();

                replacesHeader.CallId = replacesHeaderStr.Substring(0, replacesHeaderStr.IndexOf(PARAM_SEPARATOR));

                replacesHeader.m_parameters = new SIPParameters(replacesHeaderStr.Substring(replacesHeaderStr.IndexOf(PARAM_SEPARATOR) + 1), PARAM_SEPARATOR);

                return replacesHeader;
            }
            catch (ArgumentException argExcp)
            {
                throw new SIPValidationException(SIPValidationFieldsEnum.ReplacesHeader, argExcp.Message);
            }
            catch
            {
                throw new SIPValidationException(SIPValidationFieldsEnum.ReplacesHeader, "The SIP Replaces header was invalid.");
            }
        }