Ejemplo n.º 1
0
        private void resources_CallManager_IncomingCallNotification(int callId, string number, string info)
        {
            _log.Info("Incoming call with id '{0}' from '{1}', info: {2}", callId, number, info);

            //HACK: how to discover accountid?
            IAccount        account        = _resources.Configurator.Accounts[0];
            IActionProvider actionProvider = null;

            if (account != null && typeof(IActionProvider).IsAssignableFrom(account.GetType()))
            {
                actionProvider = (IActionProvider)account;
            }


            SIPIncomingCall call = new SIPIncomingCall(this, _resources, callId, number, actionProvider);

            call.CallState = CallState.Ringing;

            lock (_calls)
            {
                _calls.Add(call);
            }
            if (OnIncomingCall != null)
            {
                OnIncomingCall(call);
            }
        }
Ejemplo n.º 2
0
		private void resources_CallManager_IncomingCallNotification(int callId, string number, string info)
		{
			_log.Info("Incoming call with id '{0}' from '{1}', info: {2}", callId, number, info);

			//HACK: how to discover accountid?
			IAccount account = _resources.Configurator.Accounts[0];
			IActionProvider actionProvider = null;
			if(account != null && typeof(IActionProvider).IsAssignableFrom(account.GetType()))
				actionProvider = (IActionProvider)account;
			
			
			SIPIncomingCall call = new SIPIncomingCall(this, _resources, callId, number, actionProvider);
			call.CallState = CallState.Ringing;
			
			lock(_calls)
			{
				_calls.Add(call);
			}
			if(OnIncomingCall != null)
				OnIncomingCall(call);
		}