Exemplo n.º 1
0
        public void Initialize(ICommunication comm, IDictionary config)
        {
            _configuration = new CapiDeviceConfiguration(config);

            try
            {
                _capiApplication = new CapiApplication();
                _capiApplication.IncomingPhysicalConnection += new EventHandler<IncomingPhysicalConnectionEventArgs>(_capiApplication_IncomingPhysicalConnection);

                foreach (Controller ctrl in _capiApplication.Controllers)
                {
                    try
                    {
                        ctrl.Listen(CIPMask.Telephony | CIPMask.Telephony7KHZ | CIPMask.Audio7KHZ | CIPMask.Audio31KHZ);
                        LogInfoEntry("Listening on '{0}'", ctrl);
                    }
                    catch (Exception ex)
                    {
                        LogErrorEntry("Error listening on '{0}': {1}", ctrl, ex);
                    }
                }
            }
            catch (Exception ex)
            {
                _capiApplication = null;
                LogErrorEntry("Error on initializing: {0}", ex);
            }

            
        }
Exemplo n.º 2
0
        internal override void Notify(CapiApplication application, MessageAsyncResult result)
        {
            Controller controller = application.GetControllerByID(Identifier.ControllerID);
            Connection connection = controller.GetConnectionByPLCI(Identifier.PLCI);

            connection.DataB3Confirmation(this, result);
        }
Exemplo n.º 3
0
        internal override void Notify(CapiApplication application)
        {
            Controller ccontroller = application.GetControllerByID(Identifier.ControllerID);
            Connection connection  = ccontroller.GetConnectionByPLCI(Identifier.PLCI);

            connection.ConnectB3Indication(this);
        }
Exemplo n.º 4
0
        internal override void Notify(CapiApplication application)
        {
            PLCIParameter p          = new PLCIParameter(Identifier.Value);
            Controller    controller = application.GetControllerByID(p.ControllerID);
            Connection    connection = controller.GetConnectionByPLCI(p.PLCI);

            connection.FacilityIndication(this);
        }
Exemplo n.º 5
0
        internal override void Notify(CapiApplication application, MessageAsyncResult result)
        {
            Connection connection = result.Caller as Connection;

            if (connection != null)
            {
                connection.FacilityConfirmation(this, result);
            }
        }
        internal override void Notify(CapiApplication application)
        {
            MessageAsyncResult result = application.GetMessageAsyncResult(Number);

            if (result != null)
            {
                Notify(application, result);
                application.RemoveMessageAsyncResult(Number);
            }
        }
Exemplo n.º 7
0
        internal Connection(CapiApplication application, Controller controller,
            uint plci, string calledPartyNumber, string callingPartyNumber) {

            _dtfmDuration = 40;
            _dtfmPause = 40;
            _application = application;
            _controller = controller;
            _plci = plci;
            _calledPartyNumber = calledPartyNumber;
            _callingPartyNumber = callingPartyNumber;
            _status = ConnectionStatus.Disconnected;
        }
Exemplo n.º 8
0
 internal Connection(CapiApplication application, Controller controller,
                     uint plci, string calledPartyNumber, string callingPartyNumber)
 {
     _dtfmDuration       = 40;
     _dtfmPause          = 40;
     _application        = application;
     _controller         = controller;
     _plci               = plci;
     _calledPartyNumber  = calledPartyNumber;
     _callingPartyNumber = callingPartyNumber;
     _status             = ConnectionStatus.Disconnected;
 }
        internal override void Notify(CapiApplication application)
        {
            Controller controller = application.Controllers.GetControllerByID(Identifier.ControllerID);

            if (controller != null)
            {
                Connection connection = controller.Connections.GetConnectionByPLCI(Identifier.PLCI);
                if (connection != null)
                {
                    connection.DisconnectB3Indication(this);
                }
            }
        }
Exemplo n.º 10
0
 internal virtual void Notify(CapiApplication application) {
 }
Exemplo n.º 11
0
 internal abstract void Notify(CapiApplication application, MessageAsyncResult result);
Exemplo n.º 12
0
 public CapiSerializer(CapiApplication application) {
     _application = application;
 }
Exemplo n.º 13
0
 public CapiSerializer(CapiApplication application)
 {
     _application = application;
 }
Exemplo n.º 14
0
 internal Controller(CapiApplication application, uint id)
 {
     _application = application;
     _id          = id;
     _status      = ControllerStatus.Idle;
 }
 internal override void Notify(CapiApplication application) {
     Controller controller = application.Controllers.GetControllerByID(Identifier.ControllerID);
     Connection connection = controller.Connections.GetConnectionByPLCI(Identifier.PLCI);
     connection.ConnectB3ActiveIndication(this);
 }
Exemplo n.º 16
0
        internal override void Notify(CapiApplication application, MessageAsyncResult result)
        {
            Controller c = (Controller)result.Caller;

            c.AlertConfirmation(this, result);
        }
Exemplo n.º 17
0
        internal override void Notify(CapiApplication application)
        {
            InfoResponse response = new InfoResponse(this);

            application.SendMessage(response);
        }
Exemplo n.º 18
0
        internal override void Notify(CapiApplication application)
        {
            Controller c = application.Controllers.GetControllerByID(Identifier.ControllerID);

            c.ConnectIndication(this);
        }
Exemplo n.º 19
0
 internal Controller(CapiApplication application, uint id) {
     _application = application;
     _id = id;
     _status = ControllerStatus.Idle;
 }
Exemplo n.º 20
0
        internal override void Notify(CapiApplication application, MessageAsyncResult result)
        {
            Connection connection = (Connection)result.Caller;

            connection.DisconnectConfirmation(this, result);
        }
Exemplo n.º 21
0
 internal virtual void Notify(CapiApplication application)
 {
 }