Beispiel #1
0
 /// <summary>
 /// Constuctor.
 /// </summary>
 /// <param name="status">The <see cref="SipStatus" />.</param>
 /// <param name="response">The received <see cref="SipResponse" /> (or <c>null</c>).</param>
 /// <param name="transaction">The <see cref="SipClientTransaction" />.</param>
 /// <param name="dialog">The associated <see cref="SipDialog" /> (or <c>null</c>).</param>
 /// <param name="agent">The <see cref="SipClientAgent" /> that processed the response.</param>
 /// <param name="core">The <see cref="SipCore" /> that raised the event.</param>
 internal SipResponseEventArgs(SipStatus status, SipResponse response, SipClientTransaction transaction,
                               SipDialog dialog, SipClientAgent agent, SipCore core)
 {
     this.Status      = status;
     this.Response    = response;
     this.Transaction = transaction;
     this.Dialog      = dialog;
     this.Agent       = agent;
     this.Core        = core;
 }
Beispiel #2
0
        private SipServerAgent serverAgent;        // Used for receiving requests

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="settings">The <see cref="SipCoreSettings" />.</param>
        public SipBasicCore(SipCoreSettings settings)
            : base(settings)
        {
            this.clientAgent = new SipClientAgent(this, this);
            this.serverAgent = new SipServerAgent(this, this);

            base.SetRouter(this);
            base.Agents.Add(clientAgent);
            base.Agents.Add(serverAgent);
        }
Beispiel #3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="agent">The <see cref="ISipAgent" /> that owns this transaction.</param>
        /// <param name="request">The <see cref="SipRequest" /> initiating the transaction.</param>
        /// <param name="id">The globally unique transaction ID.</param>
        /// <param name="transport">The <see cref="ISipTransport" /> to be used for this tranaaction.</param>
        /// <param name="remoteEP">The server side's <see cref="NetworkBinding" />.</param>
        public SipClientTransaction(SipClientAgent agent, SipRequest request, string id, ISipTransport transport, NetworkBinding remoteEP)
            : base(agent, id, transport)
        {
            if (request.Method == SipMethod.Ack)
            {
                throw new SipException("Client transactions cannot be initiated with an ACK request.");
            }

            this.agent      = (SipClientAgent)agent;
            this.transport  = transport;
            this.isUdp      = !transport.IsStreaming;
            this.request    = request;
            this.ackRequest = null;
            this.remoteEP   = remoteEP;
        }