コード例 #1
0
            internal override StateResult HandleSendingResponse(SipInviteServerTransaction tx, SipResponse response)
            {
                var stateResult = new StateResult();

                var statusCode = response.StatusLine.StatusCode;

                if (statusCode >= 100 && statusCode < 200)
                {
                    tx.SendResponseInternal(response);
                }
                else if (statusCode >= 200 && statusCode < 300)
                {
                    tx.SendResponseInternal(response);
                    stateResult.Dispose = true;
                }
                else if (statusCode >= 300 && statusCode < 700)
                {
                    tx.SendResponseInternal(response);
                    tx.ChangeState(SipInviteServerTransaction.CompletedState);
                }

                return stateResult;
            }
コード例 #2
0
ファイル: ProceedingStxState.cs プロジェクト: goupviet/Hallo
            internal override StateResult HandleSendingResponse(SipInviteServerTransaction tx, SipResponse response)
            {
                var stateResult = new StateResult();

                var statusCode = response.StatusLine.StatusCode;

                if (statusCode >= 100 && statusCode < 200)
                {
                    tx.SendResponseInternal(response);
                }
                else if (statusCode >= 200 && statusCode < 300)
                {
                    tx.SendResponseInternal(response);
                    stateResult.Dispose = true;
                }
                else if (statusCode >= 300 && statusCode < 700)
                {
                    tx.SendResponseInternal(response);
                    tx.ChangeState(SipInviteServerTransaction.CompletedState);
                }

                return(stateResult);
            }
コード例 #3
0
            internal override StateResult ProcessRequest(SipInviteServerTransaction tx, SipRequestEvent requestEvent)
            {
                /* 17.2.1 If an ACK is received while the server transaction is in the
                   "Completed" state, the server transaction MUST transition to the
                   "Confirmed" state. */
                if (requestEvent.Request.RequestLine.Method == SipMethods.Ack)
                {
                    tx.ChangeState(SipInviteServerTransaction.ConfirmedState);
                }
                else
                {
                    tx.SendResponseInternal();
                }

                return new StateResult();
            }
コード例 #4
0
ファイル: CompletedStxState.cs プロジェクト: goupviet/Hallo
            internal override StateResult ProcessRequest(SipInviteServerTransaction tx, SipRequestEvent requestEvent)
            {
                /* 17.2.1 If an ACK is received while the server transaction is in the
                 * "Completed" state, the server transaction MUST transition to the
                 * "Confirmed" state. */
                if (requestEvent.Request.RequestLine.Method == SipMethods.Ack)
                {
                    tx.ChangeState(SipInviteServerTransaction.ConfirmedState);
                }
                else
                {
                    tx.SendResponseInternal();
                }

                return(new StateResult());
            }
コード例 #5
0
 public void RetransmitNonx200FinalResponse(SipInviteServerTransaction tx)
 {
     tx.ReTransmitNonx200FinalResponseTimer.Interval =
         Math.Min(2*tx.ReTransmitNonx200FinalResponseTimer.Interval, SipConstants.T2);
     tx.SendResponseInternal();
 }
コード例 #6
0
ファイル: CompletedStxState.cs プロジェクト: goupviet/Hallo
 public void RetransmitNonx200FinalResponse(SipInviteServerTransaction tx)
 {
     tx.ReTransmitNonx200FinalResponseTimer.Interval =
         Math.Min(2 * tx.ReTransmitNonx200FinalResponseTimer.Interval, SipConstants.T2);
     tx.SendResponseInternal();
 }
コード例 #7
0
 internal override StateResult ProcessRequest(SipInviteServerTransaction tx, SipRequestEvent requestEvent)
 {
     tx.SendResponseInternal();
     requestEvent.IsSent = true;
     return new StateResult();
 }
コード例 #8
0
ファイル: ProceedingStxState.cs プロジェクト: goupviet/Hallo
 internal override StateResult ProcessRequest(SipInviteServerTransaction tx, SipRequestEvent requestEvent)
 {
     tx.SendResponseInternal();
     requestEvent.IsSent = true;
     return(new StateResult());
 }