internal override void Initialize(SipInviteClientTransaction ctx) { //dispose timer ctx.ReTransmitTimer.Dispose(); //dispose timer ctx.TimeOutTimer.Dispose(); //start the timer ctx.EndCompletedTimer.Start(); }
internal override void Initialize(SipInviteClientTransaction ctx) { //dispose timer ctx.ReTransmitTimer.Dispose(); //dispose timer ctx.TimeOutTimer.Dispose(); //start the timer ctx.EndCompletedTimer.Start(); }
internal override StateResult HandleResponse(SipInviteClientTransaction ctx, SipResponse response) { var statusCode = response.StatusLine.StatusCode; if (statusCode >= 300 && statusCode < 700) { ctx.SendAck(); } return new StateResult() {}; }
protected override void Given() { _contextSource = new FakeSipContextSource(); _sipStack = new SipStack(); _provider = new SipProvider(_sipStack, _contextSource); _inviteRequest = CreateInviteRequest(); BeforeCreateInviteTransaction(); _inviteTransaction = _provider.CreateClientTransaction(_inviteRequest).As <SipInviteClientTransaction>(); _dialog = _provider.CreateClientDialog(_inviteTransaction); _inviteTransaction.SendRequest(); GivenOverride(); }
internal override StateResult HandleResponse(SipInviteClientTransaction ctx, SipResponse response) { var statusCode = response.StatusLine.StatusCode; if (statusCode >= 300 && statusCode < 700) { ctx.SendAck(); } return(new StateResult() { }); }
public ISipClientTransaction CreateClientTransaction(SipRequest request) { Check.Require(request, "request"); Check.IsTrue(SipMethods.IsMethod(request.RequestLine.Method), "Request method is not supported"); ISipClientTransaction tx; if (request.RequestLine.Method == SipMethods.Ack) { throw new ArgumentException("Can not create a transaction for the 'ACK' request"); } ISipListener txListener = _sipListener; SipAbstractDialog dialog; if (_dialogTable.TryGetValue(GetDialogId(request, true), out dialog)) { txListener = dialog; } if (request.RequestLine.Method == SipMethods.Invite) { tx = new SipInviteClientTransaction( ClientTransactionTable, this, txListener, request, _stack.GetTimerFactory(), _stack.CreateHeaderFactory(), _stack.CreateMessageFactory()); } else { tx = new SipNonInviteClientTransaction( ClientTransactionTable, this, txListener, request, _stack.GetTimerFactory()); } return(tx); }
internal override void Retransmit(SipInviteClientTransaction transaction) { //a ringing response is received after, an ok. TODO: add logging }
internal override void Initialize(SipInviteClientTransaction transaction) { }
internal override StateResult HandleResponse(SipInviteClientTransaction ctx, SipResponse response) { //a ringing response is received after, an ok. TODO: add logging. return new StateResult(); }
internal override void Retransmit(SipInviteClientTransaction ctx) { //do nothing }
internal override StateResult HandleResponse(SipInviteClientTransaction ctx, SipResponse response) { //a ringing response is received after, an ok. TODO: add logging. return(new StateResult()); }
internal override void Retransmit(SipInviteClientTransaction transaction) { //a ringing response is received after, an ok. TODO: add logging }
internal override void Initialize(SipInviteClientTransaction transaction) { }
private void OnProcessResponse(SipResponseEvent sipResponseEvent) { _onProcessResponseCount++; _sipResponseEvent = sipResponseEvent; _transaction = sipResponseEvent.ClientTransaction.As <SipInviteClientTransaction>(); }
internal override void Retransmit(SipInviteClientTransaction ctx) { //do nothing }
protected override void Given() { Ctx = new SipInviteClientTransaction(TxTable, MessageSenderMock.Object, ListenerMock.Object, Request, TimerFactory, HeaderFactory, MessageFactory); GivenOverride(); }