Exemplo n.º 1
0
 /// <summary>
 /// Indicates an incoming physical connection.
 /// </summary>
 /// <param name="header"></param>
 /// <param name="indication"></param>
 internal abstract void ConnectIndication(ConnectIndication indication);
Exemplo n.º 2
0
 internal void ConnectIndication(ConnectIndication indication) {
     _connectIndication = indication;
 }
Exemplo n.º 3
0
        internal void ConnectIndication(ConnectIndication indication) {
            Connection connection = Connections.GetConnectionByPLCI(indication.Identifier.PLCI);
            if (connection == null) {
                connection = new Connection(_application,
                    this,
                    indication.Identifier.PLCI,
                    indication.CalledPartyNumber,
                    indication.CallingPartyNumber);
                Connections.InternalAdd(connection);
            }

            AlertRequest request = new AlertRequest();
            request.Identifier.Value = indication.Identifier.Value;
            _application.SendMessage(request);

            // Notify user application....
            connection.Status = ConnectionStatus.D_ConnectPending;
            connection.ConnectIndication(indication);
            IncomingPhysicalConnectionEventArgs args = new IncomingPhysicalConnectionEventArgs(connection);
            _application.OnIncomingPhysicalConnection(args);
        }
Exemplo n.º 4
0
 public void Answer(Reject reject, B1Protocol b1, B2Protocol b2, B3Protocol b3) {
     Debug.Assert(_status == ConnectionStatus.D_ConnectPending);
     if (_connectIndication == null || _status != ConnectionStatus.D_ConnectPending) {
         throw new NotSupportedException("Connection is not in the right state.");
     }
     ConnectResponse response = new ConnectResponse(_connectIndication);
     _connectIndication = null;
     response.Reject = reject;
     response.BPtotocol.B1 = b1;
     response.BPtotocol.B2 = b2;
     response.BPtotocol.B3 = b3;
     _application.SendMessage(response);
 }