McDewey

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

Page 484

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

long theCount; if ((m_bUsesPhones) && (m_line2phone.Lookup(hLine,hPhone))) { CtPhone* pPhone = CtPhone::FromHandle((HPHONE)hPhone); if (pPhone! = NULL) { if (m_phoneUseCount.Lookup(hPhone,theCount)) if (theCount>1) { // decrease the number of lines using this phone m_phoneUseCount.SetAt(hPhone,theCount-1); } else { //nobody else is using this phone, so let's remove it. m_deviceID2phone.RemoveKey((long)pPhone->GetDeviceID()); m_phone2line.RemoveKey(hPhone); m_phoneUseCount.RemoveKey(hPhone); //now let's close the phone pPhone->Close(); } } //either way, remove the map entry from line to phone. m_line2phone.RemoveKey(hLine); } return S_OK; } else return S_FALSE; } Cisco Unified TAPI Developers Guide for Cisco Unified Communications Manager, Release 15 and SUs 452 Cisco Unified TAPI Examples CloseLine

Page 484 content