Exemplo n.º 1
0
        private void ForwardRequest(IProxie proxie, RequestProxy requestProxy, SipMessageReader reader)
        {
            #region vars...
            var serverConnectionAddresses = requestProxy.ConnectionAddresses;
            var clientConnectionAddresses = proxie.ToConnectionAddresses;
            int serverTransactionId       = requestProxy.ServerTransactionId;
            int clientTransactionId       = proxie.TransactionId;
            var method  = reader.Method;
            var content = requestProxy.Content;
            #endregion

            clientTransactionIds.Add(clientTransactionId, serverTransactionId);

            if (method == Methods.Ackm)
            {
                proxie.IsFinalReceived = true;
            }

            requestProxy.AddProxie(proxie);

            var writer = GetWriter();
            proxie.GenerateForwardedRequest(writer, reader, content, serverConnectionAddresses, serverTransactionId);
            requestProducer.SendRequest(clientConnectionAddresses, writer, clientTransactionId, serverTransactionId);

            proxie.TimerC = (method == Methods.Invitem) ?
                            timerC.Add(new ServerClientId(serverTransactionId, clientTransactionId)) : timerC.InvalidTimerIndex;
        }
Exemplo n.º 2
0
        public Dialog Create(SipMessageReader message, int localTag, ConnectionAddresses connectionAddresses)
        {
            var dialog = new Dialog(message, localTag, connectionAddresses);

            dictionary.Add(dialog.Id, dialog);

            return(dialog);
        }