示例#1
0
 public static bool IsResponseHeader(SipHeaderBase sipHeader)
 {
     return
         //sipHeader is SipErrorInfoHeader ||
         //sipHeader is SipProxyAuthenticateHeader ||
         //sipHeader is SipWWWAuthenticateHeader ||
         //sipHeader is SipRSeqHeader;
         false;
 }
示例#2
0
        public void SetHeader(SipHeaderBase header)
        {
            Check.Require(header, "header");

            switch (header.Name)
            {
                case SipHeaderNames.CSeq: _sceq = (SipCSeqHeader)header;
                    break;
                case SipHeaderNames.CallId: _callId = (SipCallIdHeader)header;
                    break;
                case SipHeaderNames.Contact: _contacts.Add((SipContactHeader)header);
                    break;
                case SipHeaderNames.ContentLength: _contentLenght = (SipContentLengthHeader)header;
                    break;
                case SipHeaderNames.ContentType: _contentType = (SipContentTypeHeader)header;
                    break;
                case SipHeaderNames.From: _from = (SipFromHeader)header;
                    break;
                case SipHeaderNames.MaxForwards: _maxForwards = (SipMaxForwardsHeader)header;
                    break;
                case SipHeaderNames.To: _to = (SipToHeader)header;
                    break;
                case SipHeaderNames.Via: _vias.Add((SipViaHeader) header);
                    break;
                case SipHeaderNames.Subject: _subject = (SipSubjectHeader)header;
                    break;
                case SipHeaderNames.Route: _routes.Add((SipRouteHeader)header);
                    break;
                case SipHeaderNames.Expires: _expires = (SipExpiresHeader)header;
                    break;
                case SipHeaderNames.RecordRoute: _recordRoutes.Add((SipRecordRouteHeader)header);
                    break;
                case SipHeaderNames.Allow: _allow = (SipAllowHeader)header;
                    break;
                case SipHeaderNames.UserAgent: _userAgent = (SipUserAgentHeader)header;
                    break;
                default:
                    throw new NotSupportedException(string.Format("The header with name {0} is not supported.", header.Name));
            }
        }
示例#3
0
 public static bool IsRequestHeader(SipHeaderBase sipHeader)
 {
     return
         //sipHeader is SipAuthorizationHeader ||
         sipHeader is SipMaxForwardsHeader ||
         //sipHeader is SipUserAgentHeader ||
         //sipHeader is SipProxyAuthorizationHeader ||
         //sipHeader is SipRouteListHeader ||
         false;
 }