Пример #1
0
        public IServerTransaction CreateServerTransaction(IRequest request)
        {
            IServerTransaction transaction;
            if (request.Method == SipMethod.INVITE)
                transaction = new ServerInviteTransaction(_transport, request);
            else
                transaction = new ServerNonInviteTransaction(_transport, request);

            _serverTransactions.Add(transaction.Id, transaction);
            transaction.Terminated += OnTerminated;
            return transaction;
        }
Пример #2
0
        public IServerTransaction CreateServerTransaction(IRequest request)
        {
            IServerTransaction transaction;

            if (request.Method == SipMethod.INVITE)
            {
                transaction = new ServerInviteTransaction(_transport, request);
            }
            else
            {
                transaction = new ServerNonInviteTransaction(_transport, request);
            }

            _serverTransactions.Add(transaction.Id, transaction);
            transaction.Terminated += OnTerminated;
            return(transaction);
        }