McDewey

Multi-vendor documentation library · semantic search · MCP endpoint at /mcp

Page 483

↗ View in doc context
page
483
source
cucm/v15/tapi-dev-guide/tapi-dev-guide.md
chunk_id
cucm::v15::tapi-dev-guide::tapi-dev-guide::497

::phoneSetStatusMessages(pPhone->GetHandle(), PHONESTATE_DISPLAY | PHONESTATE_LAMP | PHONESTATE_HANDSETHOOKSWITCH | PHONESTATE_HEADSETHOOKSWITCH | PHONESTATE_REINIT | PHONESTATE_CAPSCHANGE | PHONESTATE_REMOVED, PHONEBUTTONMODE_KEYPAD | PHONEBUTTONMODE_FEATURE | PHONEBUTTONMODE_CALL | PHONEBUTTONMODE_LOCAL | PHONEBUTTONMODE_DISPLAY, PHONEBUTTONSTATE_UP | PHONEBUTTONSTATE_DOWN); m_phone2line.SetAt((long)pPhone->GetHandle(), (long)pLine->GetHandle()); m_line2phone.SetAt((long)pLine->GetHandle(),(long)pPhone->GetHandle()); m_deviceID2phone.SetAt((long)nPhoneID,(long)pPhone->GetHandle()); m_phoneUseCount.SetAt((long)pPhone->GetHandle(), 1); } else { tracer->tracef(SDI_LEVEL_ERROR, "TAC: error -phoneOpen failed with code %d\n", tr_phone); } } else { pPhone = CtPhone::FromHandle((HPHONE)hPhone); long theCount; if (m_phoneUseCount.Lookup((long)pPhone->GetHandle(),theCount)) m_phoneUseCount.SetAt((long)pPhone->GetHandle(), theCount+1); else { //GCGC this would be an error condition! tracer->tracef(SDI_LEVEL_ERROR, "TAC: error -m_phoneUseCount does not contain phone entry.\n"); } } } else { tracer->tracef(SDI_LEVEL_ERROR, "TAC: error -could not retrieve PhoneID for line.\n"); } tracer->tracef(SDI_LEVEL_DETAILED, "TAC: <--OpenLine()\n"); return S_OK; } else { tracer->tracef(SDI_LEVEL_ERROR, "TAC: error -lineOpen failed: %d\n", tr); tracer->tracef(SDI_LEVEL_DETAILED, "TAC: <--OpenLine()\n"); OpenLineFailed(tr,0); delete pLine; return S_FALSE; } } CloseLine STDMETHODIMP CTACtrl::CloseLine(long hLine) { AFX_MANAGE_STATE(AfxGetStaticModuleState()) tracer->tracef(SDI_LEVEL_ENTRY_EXIT, "CTACtrl::CloseLine %d\n", hLine); CtLine* pLine; pLine = CtLine::FromHandle((HLINE) hLine); if (pLine! = NULL) { // close the line pLine->Close(); // remove it from the list delete pLine; long hPhone; Cisco Unified TAPI Developers Guide for Cisco Unified Communications Manager, Release 15 and SUs 451 Cisco Unified TAPI Examples CloseLine