Exemplo n.º 1
0
        private string uri;                     // The request URI

        /// <summary>
        /// Initializes a SIP message.
        /// </summary>
        /// <param name="methodText">The SIP method text.</param>
        /// <param name="uri">The SIP request URI.</param>
        /// <param name="sipVersion">The SIP version string (or <c>null</c>).</param>
        public SipRequest(string methodText, string uri, string sipVersion)
            : base(true, sipVersion)
        {
            this.methodText = methodText.ToUpper();
            this.method     = SipHelper.ParseMethod(methodText);
            this.uri        = uri;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a SIP message.
 /// </summary>
 /// <param name="method">The SIP method.</param>
 /// <param name="uri">The SIP request URI.</param>
 /// <param name="sipVersion">The SIP version string (or <c>null</c>).</param>
 public SipRequest(SipMethod method, string uri, string sipVersion)
     : base(true, sipVersion)
 {
     this.methodText = method.ToString().ToUpper();
     this.method     = method;
     this.uri        = uri;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Constructs a <b>CSeq</b> header from a method and sequence number.
        /// </summary>
        /// <param name="number">The sequence number.</param>
        /// <param name="method">The method.</param>
        public SipCSeqValue(int number, SipMethod method)
            : base()
        {
            this.number = number;
            this.method = method.ToString();

            SetText();
        }
Exemplo n.º 4
0
 public void SipMethodの解釈(string str, SipMethod sipMethod)
 {
     //setup
     var sut = new StartLine(Encoding.ASCII.GetBytes(str));
     var exception = sipMethod;
     //exercise
     var actual = sut.SipMethod;
     //verify
     Assert.That(actual, Is.EqualTo(exception));
 }
Exemplo n.º 5
0
        public void SipMethodの解釈(string name, SipMethod sipMethod)
        {
            //setup
            var sut       = CreateReception(name);
            var exception = sipMethod;
            //exercise
            var actual = sut.StartLine.SipMethod;

            //verify
            Assert.That(actual, Is.EqualTo(exception));
        }
Exemplo n.º 6
0
        public void SipMethodの解釈(string str, SipMethod sipMethod)
        {
            //setup
            var sut       = new StartLine(Encoding.ASCII.GetBytes(str));
            var exception = sipMethod;
            //exercise
            var actual = sut.SipMethod;

            //verify
            Assert.That(actual, Is.EqualTo(exception));
        }
Exemplo n.º 7
0
 public void SipMethodの解釈(string name, SipMethod sipMethod)
 {
     //setup
     var sut = CreateReception(name);
     var exception = sipMethod;
     //exercise
     var actual = sut.StartLine.SipMethod;
     //verify
     Assert.That(actual, Is.EqualTo(exception));
 }
Exemplo n.º 8
0
        private SipMethod sipMethod;       //TODO: Get SipMethod

        public CSeqHeader(SipMethod sipMethod)
        {
            HeaderPrefix   = "CSeq:";
            this.sipMethod = sipMethod;
        }
Exemplo n.º 9
0
 public RequestLine(LocalSipUserAgentServer localSipUas, SipProtocol sipProtocol, SipMethod sipMethod) : base(localSipUas, sipProtocol)
 {
     HeaderPrefix   = "Request-Line:";
     this.sipMethod = sipMethod;
 }
Exemplo n.º 10
0
 public SipMessage(SipUser sipUser, LocalSipUserAgentServer localSipUas, SipTransportManager sipTransportManager, SipMethod sipMethod)
 {
     this.messageType = MessageType.Request;
     this.requestLine = new RequestLine(localSipUas, sipTransportManager.SipProtocol, sipMethod);
     CreateCommonHeaders(sipUser, localSipUas, sipTransportManager);
 }