/// <summary> /// Converts this to valid "contact-param" value. /// </summary> /// <returns>Returns "contact-param" value.</returns> public override string ToStringValue() { /* * Contact = ("Contact" / "m" ) HCOLON * ( STAR / (contact-param *(COMMA contact-param))) * contact-param = (name-addr / addr-spec) *(SEMI contact-params) * name-addr = [ display-name ] LAQUOT addr-spec RAQUOT * addr-spec = SIP-URI / SIPS-URI / absoluteURI * display-name = *(token LWS)/ quoted-string * * contact-params = c-p-q / c-p-expires / contact-extension * c-p-q = "q" EQUAL qvalue * c-p-expires = "expires" EQUAL delta-seconds * contact-extension = generic-param * delta-seconds = 1*DIGIT */ StringBuilder retVal = new StringBuilder(); // Add address retVal.Append(m_pAddress.ToStringValue()); // Add parameters retVal.Append(ParametersToString()); return(retVal.ToString()); }
/// <summary> /// Converts this to valid "To" value. /// </summary> /// <returns>Returns "To" value.</returns> public override string ToStringValue() { StringBuilder retVal = new StringBuilder(); retVal.Append(m_pAddress.ToStringValue()); retVal.Append(ParametersToString()); return(retVal.ToString()); }
/// <summary> /// Converts this to valid "Referred-By" value. /// </summary> /// <returns>Returns "Referred-By" value.</returns> public override string ToStringValue() { /* * Referred-By = referrer-uri *( SEMI (referredby-id-param / generic-param) ) * referrer-uri = ( name-addr / addr-spec ) * referredby-id-param = "cid" EQUAL sip-clean-msg-id * sip-clean-msg-id = LDQUOT dot-atom "@" (dot-atom / host) RDQUOT */ StringBuilder retVal = new StringBuilder(); // referrer-uri retVal.Append(m_pAddress.ToStringValue()); // Add parameters retVal.Append(ParametersToString()); return(retVal.ToString()); }
/// <summary> /// Converts this to valid "hi-entry" value. /// </summary> /// <returns>Returns "hi-entry" value.</returns> public override string ToStringValue() { /* * hi-entry = hi-targeted-to-uri *( SEMI hi-param ) * hi-targeted-to-uri= name-addr * hi-param = hi-index / hi-extension * hi-index = "index" EQUAL 1*DIGIT *(DOT 1*DIGIT) * hi-extension = generic-param */ StringBuilder retVal = new StringBuilder(); // name-addr retVal.Append(m_pAddress.ToStringValue()); // Add parameters retVal.Append(ParametersToString()); return(retVal.ToString()); }
/// <summary> /// Converts this to valid value string. /// </summary> /// <returns></returns> public override string ToStringValue() { StringBuilder retVal = new StringBuilder(); // Add address retVal.Append(m_pAddress.ToStringValue()); // Add parameters foreach (SIP_Parameter parameter in this.Parameters) { if (parameter.Value != null) { retVal.Append(";" + parameter.Name + "=" + parameter.Value); } else { retVal.Append(";" + parameter.Name); } } return(retVal.ToString()); }