Пример #1
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);
        }
Пример #2
0
 internal void OnIncomingPhysicalConnection(IncomingPhysicalConnectionEventArgs e) {
     if (IncomingPhysicalConnection != null) {
         try {
             IncomingPhysicalConnection(this, e);
         } catch (Exception ex) {
             Trace.TraceError("CapiApplication#{0}::OnIncomingPhysicalConnection, Exception = {1}", ValidationHelper.HashString(this), ex);
         }
     }
 }
Пример #3
0
 internal void OnIncomingPhysicalConnection(IncomingPhysicalConnectionEventArgs e)
 {
     if (IncomingPhysicalConnection != null)
     {
         try {
             IncomingPhysicalConnection(this, e);
         } catch (Exception ex) {
             Trace.TraceError("CapiApplication#{0}::OnIncomingPhysicalConnection, Exception = {1}", ValidationHelper.HashString(this), ex);
         }
     }
 }
Пример #4
0
        private void _capiApplication_IncomingPhysicalConnection(object sender, IncomingPhysicalConnectionEventArgs e)
        {
            string callingNumber = e.Connection.CallingPartyNumber;
            if (callingNumber != null && callingNumber.Trim().Equals(string.Empty) == false)
            {
                if (!callingNumber.StartsWith("+") && !callingNumber.StartsWith(_configuration.PrependLocalNumber))
                    callingNumber = _configuration.PrependLocalNumber + callingNumber;

                RaiseIncomingCall(new TelecomIncomingInfo(callingNumber, false));
            }
            else
                RaiseIncomingCall(new TelecomIncomingInfo("", true));
                



        }
Пример #5
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);
        }