public void testCallMulticallLogicRetrieve2nd() { Assert.AreEqual(0, _manager.Count); CStateMachine smOut = makeOutgoingCall(); CStateMachine smInc = makeIncomingCall(2); // 1st call reserve sessionId 1 (nullproxy) // accept incoming _manager.onUserAnswer(smInc.Session); smOut.getState().onHoldConfirm(); Assert.AreEqual(EStateId.ACTIVE, smInc.getStateId()); Assert.AreEqual(EStateId.HOLDING, smOut.getStateId()); // Retrieve _manager.onUserHoldRetrieve(smOut.Session); smInc.getState().onHoldConfirm(); Assert.AreEqual(EStateId.HOLDING, smInc.getStateId()); Assert.AreEqual(EStateId.ACTIVE, smOut.getStateId()); smOut.getState().endCall(smOut.Session); Assert.AreEqual(EStateId.IDLE, smOut.getStateId()); smInc.getState().endCall(smInc.Session); Assert.AreEqual(EStateId.IDLE, smInc.getStateId()); Assert.AreEqual(0, CCallManager.getInstance().Count); }
private bool okHandler() { //CDialPage* page = (CDialPage*)_controller->getPage(P_DIALING); //page->makeCall(mEditField->getCaption()); CCallManager.getInstance().createSession(_editField.Caption); return(true); }
public override void onEntry() { base.onEntry(); // get current call instance //_currentCall = CCallManager.getInstance().getCurrentCall(); _currentCall = CCallManager.getInstance()[CurrentCallIdx]; if (_currentCall == null) { return; } // info... string sinfo = "" /*currentCall->GetCallInfo()*/; _info.Caption = sinfo; // digits... _digits.Caption = _currentCall.CallingNo; // get name from phonebook... //_id.Caption = currentCall.CallingNo; // call sessions... _sessions.Caption = CurrentCallIdx.ToString() + "/" + _callManager.Count.ToString(); }
public override void onEntry() { _checkCFU.Checked = CCallManager.getInstance().CFUFlag; //Properties.Settings.Default.cfgCFUFlag; //_checkCFNR.Checked = CCallManager.getInstance()//Properties.Settings.Default.cfgCFNRFlag; //_checkCFB.Checked = Properties.Settings.Default.cfgCFBFlag; _editCFUNumber.Caption = CCallManager.getInstance().CFUNumber; //Properties.Settings.Default.cfgCFUNumber; //_editCFNRNumber.Caption = //Properties.Settings.Default.cfgCFNRNumber; //_editCFBNumber.Caption = //Properties.Settings.Default.cfgCFBNumber; base.onEntry(); }
bool recordLink_Ok() { CLink item = (CLink)_list.Selected; if (item == null) { return(false); } CCallManager.getInstance().createSession(item.subItems[2]); return(true); }
bool CAccountsPage_Ok() { if (_list.Selected == null) { return(true); } int aindex = int.Parse(_list.Selected.subItems[0]); CAccounts.getInstance().DefAccountIndex = aindex; CAccounts.getInstance().save(); CCallManager.getInstance().initialize(); return(true); }
public void RefreshForm() { int currentSession = CCallManager.getInstance().getCurrentCallIndex(); // get current session if (currentSession < 0) { // todo::: showHomePage CComponentController.getInstance().showPage(CComponentController.getInstance().HomePageId); return; } Dictionary <int, CStateMachine> calls = CCallManager.getInstance().CallList; CStateMachine call = CCallManager.getInstance().getCurrentCall(); if (call != null) { int stateId = (int)call.getStateId(); if (stateId == (int)EStateId.IDLE) { if (CCallManager.getInstance().Count == 0) { CComponentController.getInstance().showPage(stateId); } else { calls.GetEnumerator().MoveNext(); currentSession = calls.GetEnumerator().Current.Key; CStateMachine nextcall = CCallManager.getInstance().getCall(currentSession); if (nextcall != null) { CComponentController.getInstance().showPage((int)nextcall.getStateId()); } } } else { CComponentController.getInstance().showPage(stateId); } } }
public override void onEntry() { base.onEntry(); // Create call menu pages... new CConnectingPage(); new CRingingPage(); new CReleasedPage(); new CActivePage(); new CDialPage(); new CIncomingPage(); new CPreDialPage(); new CHoldingPage(); new CXferDialingPage(); new CXferListPage(); new C3PtyListPage(); new CDeflectPage(); new CCallOptionsPage(); // initialize telephony... CCallManager.getInstance().initialize(); }
private void PhoneForm_FormClosing(object sender, FormClosingEventArgs e) { control.shutdown(); CCallManager.getInstance().shutdown(); }
bool accept_call_Softkey(int keyId) { CCallManager.getInstance().onUserAnswer(); return(true); }
bool CPreDialPage_Offhook() { CCallManager.getInstance().createSession(_editField.Caption); return(true); }
bool sessionHandler(int id) { CCallManager.getInstance().nextSession(); return(true); }
bool onhookHandler() { CCallManager.getInstance().onUserRelease(); return(true); }
public override void onEntry() { if (!CCallManager.getInstance().isInitialized) { // initialize telephony... CCallManager.getInstance().initialize(); } _displayName.Caption = CAccounts.getInstance().DefAccount.Id; // check forwardings bool isForwardActive = CCallManager.getInstance().CFUFlag; //Properties.Settings.Default.cfgCFUFlag; if (!isForwardActive) { isForwardActive = CCallManager.getInstance().DNDFlag; //Properties.Settings.Default.cfgDNDFlag; } //int isDirectCallActive = ; //int isAlarmActive = ; //int isKeyboardLocked = ; //int isCallMissed = CCallLog::Instance()->getCallsMissed(); int status = 0; if (isForwardActive) { status = status + (int)EStatusFlag.EIncomingCallDisabled; } /* if (isKeyboardLocked == 1) * { * status = status + EStatusFlag.ELocked; * } * if (isDirectCallActive == 1) * { * status = status + EStatusFlag.EDirectCall; * } * if (isCallMissed == 1) * { * status = status + EStatusFlag.ECallMissed; * } * if (isAlarmActive == 2) * { * status = status + EStatusFlag.EAlarmMissed; * } */ // get ringer mode switch (Properties.Settings.Default.cfgRingMode) { case (int)ERingModes.ESILENT: _linkRinger.Caption = "Silent"; // assign to status status = status + (int)EStatusFlag.ESilent; break; case (int)ERingModes.EMELODY: _linkRinger.Caption = "Melody"; break; case (int)ERingModes.EBEEP: _linkRinger.Caption = "Beep"; break; } // get registration status int regState = CAccounts.getInstance().DefAccount.RegState; switch (regState) { case 200: // assign to status status = status + (int)EStatusFlag.ERegStatus; break; default: break; } // update status bar!!! _statusBar.setStatus(status); // get default account _linkAccounts.Caption = CAccounts.getInstance().DefAccount.Name; base.onEntry(); }