4.3 CTI HOOK

CTI Hook is registration for subscription for events on call changes. From the moment we register HOOK we will be receiving from PBX events on changes. HOOK, however, only sends changes, and if we want to find out the current status of calls prior to the registration of HOOK it is necessary to request it using the CTI_GET_STATE_REQ message. So, the correct procedure is such that if you are interested in the status of a certain object, you first request its current status using the CTI_GET_STATE_REQ message and then we register HOOK. CTI HOOK can be registered for the following objects: station, port, call_id, all, global.