Main Code Resource Messages
A telephone tool's main code resource must be able to handle a large number of messages. For all messages passed to your tool, thehTELparameter is a handle to a telephone record for the user's telephone terminal, andpTELTermis a pointer to a telephone terminal record for that terminal. In addition,hDNis a handle to a directory number structure, andhCAis a handle to a call appearance structure. Themsgparameter is one of the following constants. The meanings of the other parameters (namely,p1,p2, andp3) differ according to the type of message passed.
- Note
- This section describes the messages sent from the Telephone Manager to your telephone tool. For a description of the messages that your tool can send to the Telephone Manager (and hence to an application), see the chapter "Telephone Manager Messages."
![]()
enum { telNewMsg = 0, telDisposeMsg = 1, telSuspendMsg = 2, telResumeMsg = 3, telMenuMsg = 4, telEventMsg = 5, telActivateMsg = 6, telDeactivateMsg = 7, telIdleMsg = 50, telOpenTermMsg = 51, telResetTermMsg = 52, telCloseTermMsg = 53, telTermMsgHandMsg = 54, telClrTermMsgHandMsg = 55, telTermEventsSuppMsg = 56, telGetInfoMsg = 57, telCountDNsMsg = 60, telDNLookupByIndexMsg = 61, telDNLookupByNameMsg = 62, telCallbackClearMsg = 63, telOtherFeatListMsg = 64, telOtherFeatImplMsg = 65, telToolFunctionsMsg = 66, telOtherFunctionMsg = 67, telGetHookswMsg = 70, telSetHookswMsg = 71, telGetVolumeMsg = 72, telSetVolumeMsg = 73, telAlertMsg = 74, telGetDisplayMsg = 75, telSetDisplayMsg = 76, telDNSelectMsg = 100, telDNDisposeMsg = 101, telGetDNInfoMsg = 102, telGetDNFlagsMsg = 103, telDNMsgHandMsg = 104, telClrDNMsgHandMsg = 105, telDNEventsSuppMsg = 106, telCountCAsMsg = 110, telCALookupMsg = 111, telCAMsgHandMsg = 112, telClrCAMsgHandMsg = 113, telCAEventsSuppMsg = 114, telSetupCallMsg = 115, telForwardSetMsg = 120, telForwardClearMsg = 121, telDNDSetMsg = 122, telDNDClearMsg = 123, telCADisposeMsg = 200, telGetCAStateMsg = 201, telGetCAFlagsMsg = 202, telGetCAInfoMsg = 203, telConnectMsg = 204, telDialDigitsMsg = 205, telAcceptCallMsg = 206, telRejectCallMsg = 207, telDeflectCallMsg = 208, telAnswerCallMsg = 209, telDropMsg = 210, telHoldMsg = 211, telRetrieveMsg = 212, telConfSplitMsg = 213, telTransfBlindMsg = 214, telCallbackSetMsg = 215, telCallbackNowMsg = 216, telCallPickupMsg = 217, telParkCallMsg = 218, telRetrieveParkedCallMsg = 219, telVoiceMailAccessMsg = 220, telPagingMsg = 221, telIntercomMsg = 222, telConfPrepMsg = 230, telConfEstMsg = 231, telTransfPrepMsg = 232, telTransfEstMsg = 233, telGetDNSoundInputMsg = 240, telDisposeDNSoundInputMsg = 241, telGetDNSoundOutputMsg = 242, telDisposeDNSoundOutputMsg = 243, telGetHSSoundInputMsg = 244, telDisposeHSSoundInputMsg = 245, telGetHSSoundOutputMsg = 246, telDisposeHSSoundOutputMsg = 247, telDNSetDTMFMsg = 248, telDNGetDTMFMsg = 249, telHSSetDTMFMsg = 250, telHSGetDTMFMsg = 251, telGetDNStatusMsg = 252, telGetDNProgressDetMsg = 253, telSetDNProgressDetMsg = 254, telDNSetAutoAnswerMsg = 260, telDNTollSaverControlMsg = 261, telSetIndHSConnectMsg = 262, telGetIndHSConnectMsg = 263, telCAVoiceDetectMsg = 270, telCASilenceDetectMsg = 271 };Constant descriptions
- telNewMsg
- Your tool receives this message when an application requests that the Telephone Manager create a new telephone record associated with your tool. The parameter
p1is the tool ID. Your tool should use this ID when sending messages to the Telephone Manager. ParametershDN,hCA,p2, andp3are unused.- In response to this message, your tool should fill in any fields that it can in the structures specified by
hTELandpTELTerm. Your tool may need to open the terminal driver now, before receiving the messagetelOpenTermMsg, to get the configuration information needed to fill in the telephone record. When done, your tool should return 0 if the request was handled.- It's possible to receive
telNewMsgmore than once (for instance, if more than one application is using the Telephone Manager). As a convenience, in alltelNewMsgmessages except the first, the Telephone Manager places a pointer to your tool's private storage in thetelPrivatefield of telephone recordhTEL. But in the firsttelNewMsgmessage,telPrivateis set to 0. Thus, instead of initializing private storage for eachtelNewMsgmessage, your tool can check thetelPrivatefield and initialize the private storage only iftelPrivateis zero.telDisposeMsg- Your tool receives this message when an application requests that the Telephone Manager dispose of a handle to a telephone record associated with your tool. In response to this message, your tool should perform any necessary cleanup. When done, your tool should return 0 if the request was handled. You cannot prevent the Telephone Manager from disposing of the handle once your message handler returns. Note that your tool should not drop any existing call appearances unless it receives a
telDropMsgortelDNSelectMsgmessage. ParametershDN,hCA,p1,p2, andp3are unused.telSuspendMsg- Your tool receives this message when an application calls
TELResumeto have your tool perform some action in response to a suspend event. For instance, your tool might need to remove a tool-specific menu from the menu bar. ParametershDN,hCA,p1,p2, andp3are unused.telResumeMsg- Your tool receives this message when an application calls
TELResumeto have your tool perform some action in response to a resume event. For instance, your tool might need to install a tool-specific menu in the menu bar. ParametershDN,hCA,p1,p2, andp3are unused.telMenuMsg- Your tool receives this message when an application calls
TELMenuto have your tool process an event generated when a user chooses an item from a menu installed by a telephone tool. On entry, parameterp1contains the menu ID associated with the menu, and parameterp2contains the number of the selected menu item. ParametershDN,hCA, andp3are unused. On exit, your tool should return 1 if it handled the menu event and 0 otherwise.telEventMsg- Your tool receives this message when an application calls
TELEventto have your tool process an event in a window associated with your tool. On entry, parameterp1contains a pointer to an event record (of typeEventRecord) that describes the event. In addition, therefconfield of the window record contains a handle to the telephone record for your tool. ParametershDN,hCA,p2, andp3are unused.telActivateMsg- Your tool receives this message when an application calls
TELActivateto have your tool perform some action in response to an activate event. For instance, your tool might need to install a tool-specific menu in the menu bar. ParametershDN,hCA,p1,p2, andp3are unused.telDeactivateMsg- Your tool receives this message when an application calls
TELActivateto have your tool perform some action in response to a deactivate event. For instance, your tool might need to remove a tool-specific menu from the menu bar. ParametershDN,hCA,p1,p2, andp3are unused.telIdleMsg- Your tool receives this message when an application calls
TELIdleto give your tool time to do idle processing. For instance, your tool might need to check on the progress of existing calls or check for any new incoming calls. If any such activities occur, your tool should send an appropriate message to the Telephone Manager. ParametershDN,hCA,p1,p2, andp3are unused. Your tool should return 0 if it completes successfully, ortelTermErrorMsgif it encounters some problem during execution.telOpenTermMsg- Your tool receives this message when an application calls
TELOpenTermto open a telephone terminal. Your tool should open any associated terminal drivers and make the terminal ready for use. If necessary, your tool can update the information in thepTELTermparameter. ParametershDN,hCA,p1,p2, andp3are unused. Your tool should return 0 if it completes successfully. In addition, your tool should send atelTermOpenMsgand atelTermEnableMsgmessage to the Telephone Manager and increment any use-count variables the tool maintains internally. If your tool encounters any problems while opening a terminal, it should sendtelTermErrorMsg.telResetTermMsg- Your tool receives this message when an application calls
TELResetTermto reset a telephone terminal. Your tool should close and then reopen any associated terminal drivers and make the terminal ready for use by clearing the state of the terminal, its directory numbers, and their call appearances. Your tool can also reboot any underlying hardware. If necessary, your tool should update the information in thehTELparameter. ParametershDN,hCA,p1,p2, andp3are unused. Your tool should return 0 if it completes successfully. In addition, your tool should send atelTermResetMsgto the Telephone Manager. If your tool encounters any problems while resetting a terminal, it should sendtelTermErrorMsg.telCloseTermMsg- Your tool receives this message when an application calls
TELCloseTermto close a telephone terminal. Your tool should close any associated terminal drivers if the use count falls to 0. If necessary, your tool should update the information in thehTELparameter, but it should not disconnect any existing calls. ParametershDN,hCA,p1,p2, andp3are unused. Your tool should return 0 if it completes successfully. In addition, your tool should send atelTermCloseMsgto the Telephone Manager. If your tool encounters any problems while resetting a terminal, it should sendtelTermErrorMsg.telTermMsgHandMsg- Your tool receives this message when an application calls
TELTermMsgHandto register a telephone terminal message handler. On entry, parameterp1is a mask of events about which the application wants to be notified. See "Terminal Messages" on page 5-9 for complete information about message masks. Parameterp2is a pointer to the Telephone Manager's master terminal message handler, and parameterp3is a pointer to the global data for that master message handler. ParametershDNandhCAare unused. Your tool should return 0 if it completes successfully.telClrTermMsgHandMsg- Your tool receives this message when an application calls
TELClrTermMsgHandto clear the telephone terminal message handler installed by that application. On entry, parameterp1is a new mask of events about which other applications want to be notified; if no other applications have installed a terminal message handler for your tool,p1is 0. See "Terminal Messages" on page 5-9 for complete information about message masks. Parameterp2is a pointer to the Telephone Manager's master terminal message handler. Ifp1is 0,p2is also 0. ParametershDN,hCA, andp3are unused. Your tool should return 0 if it completes successfully.telTermEventsSuppMsg- Your tool receives this message when an application calls
TELTermEventsSuppto determine which terminal messages your telephone tool supports. On entry, parameterp1is a pointer to a 4-byte area of memory; your tool should fill in that memory with an event mask indicating which terminal messages it supports. See "Terminal Messages" on page 5-9 for complete information about message masks. ParametershDN,hCA,p2, andp3are unused. Your tool should return 0 if it completes successfully.telGetInfoMsg- Your tool receives this message when an application calls
TELGetInfoto get information about a telephone terminal. In response to this message, your tool should update thetelPrivatefield of the telephone record specified by thehTELparameter and all the fields of the telephone terminal record specified by thepTELTermparameter. Your tool should keep the information for each telephone record in its private storage and update the record only when requested to do so. ParametershDN,hCA,p1,p2, andp3are unused. Your tool should return 0 if it completes successfully. If thehTELparameter is invalid, your tool should set thetReffield ofpTELTermto -1 and returntelBadTermErr.telCountDNsMsg- Your tool receives this message when an application calls
TELCountDNsto count the directory numbers associated with a telephone terminal. On entry, parameterp1specifies the types of directory numbers to count. See "Directory Number Types" on page 3-6 for a description of the available directory number types. Parameterp2specifies whether to count all directory numbers (true) or only those to which commands can be sent (false). ParametershDN,hCA, andp3are unused. Your tool should return 0 if it completes successfully. If your tool does not support directory numbers of the specified type, your tool should returntelBadDNType.telDNLookupByIndexMsg- Your tool receives this message when an application calls
TELDNLookupByIndexto find a directory number by index in a terminal's list of directory numbers. On entry, parameterp1specifies the types of directory numbers to search. See "Directory Number Types" on page 3-6 for a description of the available directory number types. Parameterp2specifies whether to search all directory numbers (true) or only those to which commands can be sent (false). Parameterp3is the index. ParameterhCAis unused. If the specified index is valid, your tool should fill in these fields of the directory number structure specified by thehDNparameter:dn,dnRef,dnPartyName,dnSubaddress,maxAllocCA,curAllocCA,dnType,featureFlags,forwardFlags,numPageIDs,numIntercomIDs,numPickupIDs, andtelDNPrivate. Your tools should not update the fields relating to forwarding numbers, subaddresses, or party names. (These fields are updated each time the Telephone Manager receives the messagetelDNForwardMsgfrom your tool.) Your tool should return 0 if it completes successfully. If the specified index is invalid, your tools should returntelBadIndexErr. If your tool does not support directory numbers of the specified type, your tool should returntelDNTypeNotSupp. When any error occurs, your tool should set thednReffield ofhDNto -1. The Telephone Manager will then dispose ofhDN.telDNLookupByNameMsg- Your tool receives this message when an application calls
TELDNLookupByNameto find a directory number by name. On entry, parameterp1points to a Pascal-style string that contains the name of a directory number. ParametershCA,p2, andp3are unused. If the specified name is valid, your tool should fill in these fields of the directory number structure specified by thehDNparameter:dn,dnRef,dnPartyName,dnSubaddress,maxAllocCA,curAllocCA,dnType,featureFlags,forwardFlags,numPageIDs,numIntercomIDs,numPickupIDs, andtelDNPrivate. Your tools should not update the fields relating to forwarding numbers, subaddresses, or party names. (These fields are updated each time the Telephone Manager receives the messagetelDNForwardMsgfrom your tool.) Your tool should return 0 if it completes successfully. If the specified name is invalid, your tool should set thednReffield ofhDNto -1 and returntelBadDNErr. The Telephone Manager will then dispose ofhDN.telCallbackClearMsg- Your tool receives this message when an application calls
TELCallbackClearto clear a callback request. On entry, parameterp1is a value that identifies the callback request to be cleared. ParametershCA,p2, andp3are unused. If the specified callback request is valid, your tool should clear the request. Your tool should return 0 if it completes successfully. If the specified callback request is invalid, your tool should returntelNoCAllbackRef. If no callback is set, your tool should returntelCBErr.telOtherFeatListMsg- Your tool receives this message when an application calls
TELOtherFeatureListto get a list of network-switch features that can be accessed without passing any tool-specific parameters. On exit, parameterp1is a pointer to a linked list ofFeatureListstructures that describe those features. These features should be simple ones that require only feature descriptor and a handle to a telephone record, directory number structure, or call appearance structure. ParametershDN,hCA,p2, andp3are unused. Your tool should return 0 if it completes successfully and a Telephone Manager result code otherwise.telOtherFeatImplMsg- Your tool receives this message when an application calls
TELOtherFeatureImplementto invoke a network-switch feature returned by theTELOtherFeatureListfunction. On entry, parameterp1is a handle to a structure needed to pass information needed by your tool and parameterp2is the feature ID of the requested feature. The calling application can determine which type of structure to use by inspecting thehandleTypefield of a feature list structure. ParametershDN,hCA, andp3are unused. Your tool should return 0 if it completes successfully and a Telephone Manager result code otherwise.telToolFunctionsMsg- Your tool receives this message when an application calls
TELToolFunctionsto determine whether your telephone tool supports a specified Telephone Manager function. On entry, parameterp1is a message code associated with a particular Telephone Manager function, andp2points to a Boolean value. Your tool should set that Boolean value totrueif it supports the specified function and tofalseotherwise. ParametershDN,hCA, andp3are unused. Your tool should return 0 if it completes successfully.telOtherFunctionMsg- Your tool receives this message when an application calls
TELOtherFunctionto invoke a tool-specific feature. On entry, parameterp1is a pointer to a parameter block and parameterp2is the size, in bytes, of that parameter block. You are responsible for documenting the structure and size of that parameter block. ParametershDN,hCA, andp3are unused. Your tool should return 0 if it completes successfully.telGetHookswMsg- Your tool receives this message when an application calls
TELGetHookswto get the state of a terminal's hookswitch. On entry, parameterp1is the hookswitch type; see "Hookswitch Types and States" on page 2-11 for the available hookswitch types. Parameterp2points to a Boolean value. Your tool should set that Boolean value totelDeviceOnHookif the device is on hook and totelDeviceOffHookotherwise. ParametershDN,hCA, andp3are unused. Your tool should return 0 if it completes successfully.telSetHookswMsg- Your tool receives this message when an application calls
TELSetHookswto set the state of a terminal's hookswitch. On entry, parameterp1is the hookswitch type; see "Hookswitch Types and States" on page 2-11 for the available hookswitch types. Parameterp2istelDeviceOnHookif the device is to be on hook andtelDeviceOffHookotherwise. ParametershDN,hCA, andp3are unused. Your tool should return 0 if it completes successfully. In addition, if the hookswitch state has changed, your tool should send the messagetelTermHookswMsg. If your tool does not support the value passed inp1, it should returntelHTypeNotSupp. Note that your tool should support thetelSetHookswMsgmessage only if it can change the physical state of the specified device (for example, if it can turn on a speakerphone).telGetVolumeMsg- Your tool receives this message when an application calls
TELGetVolumeto get the volume and state of a terminal device. On entry, parameterp1is the terminal device type. Parameterp2is a pointer to a 2-byte area of memory into which your tool should copy the current volume level of the specified terminal device. Parameterp3is a pointer to a 2-byte area of memory into which your tool should copy the current volume state of the specified terminal device. See "Volume Controls" on page 2-12 for the available device types and volume states. ParametershDNandhCAare unused. Your tool should return 0 if it completes successfully. If your tool does not support the device type passed inp1, it should returntelVolTypeNotSupp.telSetVolumeMsg- Your tool receives this message when an application calls
TELSetVolumeto set the volume and state of a terminal device. On entry, parameterp1is the terminal device type. Parameterp2is a pointer to a 2-byte area of memory that contains the desired volume level of the specified terminal device. If this level is greater than the maximum volume level your tool supports, you should set the volume to the maximum level and return that level in the memory pointed to byp2. Parameterp3is a pointer to a 2-byte area of memory that contains the desired volume state of the specified terminal device. See "Volume Controls" on page 2-12 for the available device types and volume states. ParametershDNandhCAare unused. Your tool should return 0 if it completes successfully. If your tool does not support the device type passed inp1, it should returntelVolTypeNotSupp. Note that your tool should support thetelSetVolumeMsgmessage only if it can change the volume of the specified device.telAlertMsg- Your tool receives this message when an application calls
TELAlertto ring a terminal device. On entry, parameterp1is a pointer to a 2-byte area of memory that contains the desired volume level of the ringer. If this level is 0, your tool should leave the volume level unchanged. If this level is greater than the maximum volume level your tool supports, you should set the volume to the maximum level and return that level in the memory pointed to byp1. Parameterp2is an alerting pattern. See "Alerting Patterns" on page 2-15 for the available alerting patterns. If your tool does not support the requested alerting pattern, it should returntelAPattNotSupp. ParametershDN,hCA, andp3are unused. Your tool should return 0 if it completes successfully.telGetDisplayMsg- Your tool receives this message when an application calls
TELGetDisplayto get the text displayed on a terminal and the display mode of the terminal. On entry, parameterp1is the index of the item of the displayed text to get; see "Display Items" on page 2-10 for a description of the available display items. On exit, parameterp2is a pointer to a Pascal-style string that contains the text of the specified item on the display of the specified terminal. Your tool is responsible for allocating this string, but the calling application is responsible for disposing of it. On exit, parameterp3is a pointer to a 2-byte value that is the current display mode of the specified terminal. If your tool does not support the specified display item, it should returntelIndexNotSupp. ParametershDNandhCAare unused. Your tool should return 0 if it completes successfully.telSetDisplayMsg- Your tool receives this message when an application calls
TELSetDisplayto set the text displayed on a terminal and the display mode of the terminal. On entry, parameterp1is the index of the item of the displayed text to set; see "Display Items" on page 2-10 for a description of the available display items. Parameterp2is a pointer to a Pascal-style string that contains the desired text of the specified item on the display of the specified terminal. Parameterp3is a pointer to a 2-byte value that is the desired display mode of the specified terminal. If your tool does not support the specified display item, it should returntelIndexNotSupp. If your tool does not support the specified display mode, it should returntelDisplayModeNotSupp. ParametershDNandhCAare unused. Your tool should return 0 if it completes successfully and, if the display has changed, send thetelTermDisplayMsgmessage to the Telephone Manager.telDNSelectMsg- Your tool receives this message when an application calls
TELDNSelectto select or deselect a directory number. On entry, parameterp1is a Boolean value that indicates whether to select (true) or deselect (false) the specified directory number. ParametershDN,hCA,p2, andp3are unused. Your tool should return 0 if it completes successfully.telDNDisposeMsg- Your tool receives this message when an application requests that the Telephone Manager dispose of a handle to a directory number structure associated with your tool. In response to this message, your tool should perform any necessary cleanup. Your tool should dispose of the string pointers
dn,dnSubaddress, anddnPartyName, but no others. When done, your tool should return 0 if the request was handled. You cannot prevent the Telephone Manager from disposing of the handle once your message handler returns. Note that your tool should not drop any existing call appearances unless it receives atelDropMsgortelDNSelectMsgmessage. ParametershCA,p1,p2, andp3are unused.telGetDNInfoMsg- Your tool receives this message when an application calls
TELGetDNInfoto update the information in a directory number structure. In response to this message, your tool should fill in the following fields of the directory number structure specified by thehDNparameter:dn,dnRef,dnPartyName,dnSubaddress,maxAllocCA,curAllocCA,dnType,featureFlags,forwardFlags,numPageIDs,numIntercomIDs,numPickupIDs, andtelDNPrivate. Your tool should keep the information for each directory number structure in its private storage and update the structure only when requested to do so. ParametershCA,p1,p2, andp3are unused. Your tool should return 0 if it completes successfully. If thehDNparameter is invalid, your tool should set thednReffield to -1 and returntelBadDNErr.telGetDNFlagsMsg- Your tool receives this message when an application calls
TELGetDNFlagsto update the current flags information for a directory number. In response to this message, your tool should fill in thefeatureFlagsandforwardFlagsfields of the directory number structure specified by thehDNparameter. On entry,p1points to 4-byte field into which you should copy the current feature flags of the specified directory number, andp2points to 4-byte field into which you should copy the current forwarding flags of that directory number. ParametershCAandp3are unused. Your tool should return 0 if it completes successfully. If thehDNparameter is invalid, your tool should returntelBadDNErr.telDNMsgHandMsg- Your tool receives this message when an application calls
TELDNMsgHandto register a directory number message handler. On entry, parameterp1is a mask of events about which any application using your tool wants to be notified. See "Directory Number Messages" on page 5-12 for complete information about message masks. Parameterp2is a pointer to the Telephone Manager's master directory number message handler, and parameterp3is a pointer to the global data for that master message handler. ParameterhCAis unused. Your tool should return 0 if it completes successfully.telClrDNMsgHandMsg- Your tool receives this message when an application calls
TELClrDNMsgHandto clear the directory number message handler installed by that application. On entry, parameterp1is a new mask of events about which other applications want to be notified; if no other applications have installed a directory number message handler for your tool,p1is 0. See "Directory Number Messages" on page 5-12 for complete information about message masks. Parameterp2is a pointer to the Telephone Manager's master directory number message handler. Ifp1is 0,p2is also 0. ParametershCAandp3are unused. Your tool should return 0 if it completes successfully.telDNEventsSuppMsg- Your tool receives this message when an application calls
TELDNEventsSuppto determine which directory number messages your telephone tool supports. On entry, parameterp1is a pointer to a 4-byte area of memory; your tool should fill in that memory with an event mask indicating which directory number messages it supports. See "Directory Number Messages" on page 5-12 for complete information about message masks. ParametershCA,p2, andp3are unused. Your tool should return 0 if it completes successfully.telCountCAsMsg- Your tool receives this message when an application calls
TELCountCAsto count the non-idle call appearances currently associated with a directory number. On entry, parameterp1specifies the types of call appearances to count. See "Call Origination Types" on page 4-13 for a description of the available call appearances types. ParametershCA,p2, andp3are unused. Your tool should return 0 if it completes successfully. If your tool does not support call appearances of the specified type, your tool should returntelIntExtNotSupp.telCALookupMsg- Your tool receives this message when an application calls
TELCALookupto obtain a handle to a call appearance of a specified type and index associated with a directory number. On entry, parameterp1is the type of call appearance to consider; see "Call Origination Types" on page 4-13 for a description of the available call appearance types. Parameterp2is the 1-based index in the list of call appearances of that type associated with the directory number specified by thehDNparameter. Parameterp3is unused. If the specified index is valid, your tool should fill in these fields of the call appearance structure specified by thehCAparameter:caState,intExt,callType,dialType,bearerType,rate,conferenceLimit,featureFlags,otherFeatures, andtelCAPrivate. Your tool should not update any of the fields of typeStringPtr. (These fields are updated each time the Telephone Manager receives the messagetelCAProgressMsgwithvalueset totelCAPUpdateortelCARoutedfrom your tool.) In addition, your tool should not change thecaReffield, except as warranted by error conditions. Your tool should return 0 if it completes successfully. If the specified index is invalid, your tool should returntelBadIndexErr. If your tool does not support call appearances of the specified type, your tool should returntelIntExtNotSupportelBadCAType. When any error occurs, your tool should set thecaReffield ofhCAto -1.telCAMsgHandMsg- Your tool receives this message when an application calls
TELCAMsgHandto register a call appearance message handler. On entry, parameterp1is a mask of events about which any application using your tool wants to be notified. See "Call Appearance Messages" on page 5-14 for complete information about message masks. Parameterp2is a pointer to the Telephone Manager's master call appearance message handler, and parameterp3is a pointer to the global data for that master message handler. ParameterhCAis unused. Your tool should return 0 if it completes successfully.telClrCAMsgHandMsg- Your tool receives this message when an application calls
TELClrCAMsgHandto clear the call appearance message handler installed by that application. On entry, parameterp1is a new mask of events about which other applications want to be notified; if no other applications have installed a call appearance message handler for your tool,p1is 0. See "Call Appearance Messages" on page 5-14 for complete information about message masks. Parameterp2is a pointer to the Telephone Manager's master call appearance message handler. Ifp1is 0,p2is also 0. ParametershCAandp3are unused. Your tool should return 0 if it completes successfully.telCAEventsSuppMsg- Your tool receives this message when an application calls
TELCAEventsSuppto determine which call appearance messages your telephone tool supports. On entry, parameterp1is a pointer to a 4-byte area of memory; your tool should fill in that memory with an event mask indicating which call appearance messages it supports. See "Call Appearance Messages" on page 5-14 for complete information about message masks. ParametershCA,p2, andp3are unused. Your tool should return 0 if it completes successfully.telSetupCallMsg- Your tool receives this message when an application calls
TELSetupCallto create a call appearance structure for an outgoing call. On entry, parameterhCAis a handle to a call appearance record in which the Telephone Manager has already filled in thermtDN,rmtPartyName, andrmtSubaddressfields. Your tool should fill in these fields:caState,intExt,callType,dialType,bearerType,rate,conferenceLimit,featureFlags,otherFeatures, andtelCAPrivate. Parameterp1is a pointer to a Pascal-style string containing user-to-user information, as defined by certain telephone networks. If your tool doesn't support user-to-user information, it should ignore this parameter. Parametersp2andp3specify the bearer type and rate; currently, however, these parameters should always be 0. Your tool should return 0 if it completes successfully. If any error occurs, your tool should set thecaReffield ofhCAto -1.telForwardSetMsg- Your tool receives this message when an application calls
TELForwardSetto cause incoming calls for one directory number to be forwarded to another. On entry, parameterp1is a pointer to a call forwarding message parameter block (page 6-60) describing the destination directory number and type of call forwarding. ParametershCA,p2, andp3are unused. Your tool should return 0 if it completes successfully ortelFwdTypeNotSuppif it doesn't support the specified type of call forwarding. Your tool should not update the fields inhDNthat relate to call forwarding (they are updated each time the Telephone Manager receives the messagetelDNForwardMsgfrom your tool).telForwardClearMsg- Your tool receives this message when an application calls
TELForwardClearto stop call forwarding on a directory number. On entry, parameterp2is a the type of call forwarding to stop; see "Call Forwarding Types" on page 3-11 for a description of the available forwarding types. ParametershCA,p1, andp3are unused. Your tool should return 0 if it completes successfully ortelFwdTypeNotSuppif it doesn't support the specified type of call forwarding. Your tool should not clear any strings inhDNthat relate to call forwarding (the Telephone Manager clears them).telDNDSetMsg- Your tool receives this message when an application calls
TELDNDSetto activate a Do Not Disturb feature for a directory number. On entry, parameterp1specifies the type of Do Not Disturb feature to activate; see "Do Not Disturb Types" on page 3-11 for a description of the available types. ParametershCA,p2, andp3are unused. Your tool should return 0 if it completes successfully ortelDNDTypeNotSuppif it doesn't support the specified type of Do Not Disturb feature.telDNDClearMsg- Your tool receives this message when an application calls
TELDNDClearto clear a Do Not Disturb feature for a directory number. On entry, parameterp1specifies the type of Do Not Disturb feature to clear; see "Do Not Disturb Types" on page 3-11 for a description of the available types. ParametershCA,p2, andp3are unused. Your tool should return 0 if it completes successfully ortelDNDTypeNotSuppif it doesn't support the specified type of Do Not Disturb feature.telCADisposeMsg- Your tool receives this message when an application requests that the Telephone Manager dispose of a handle to a call appearance structure associated with your tool. In response to this message, your tool should perform any necessary cleanup. Your tool should not dispose of the call appearance structure specified by the
hCAparameter, nor should your tool dispose of any string pointers in that structure. When done, your tool should return 0 if the request was handled. You cannot prevent the Telephone Manager from disposing of the handle once your message handler returns. Note that your tool should not drop any existing call appearances unless it receives atelDropMsgortelDNSelectMsgmessage. Parametersp1,p2, andp3are unused.telGetCAStateMsg- Your tool receives this message when an application calls
TELGetCAStateto retrieve the current state of a call appearance. On entry, parameterp1is a pointer to a 2-byte value into which your tool should copy the current state of the call appearance specified by thehCAparameter. Your tool should also update thecaStatefield of thehCAstructure. See "Call Appearance States" on page 4-10 for a description of the available call appearance states. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully. If thehCAparameter references an idle call appearance, your tool should set thecaReffield to -1 and returntelBadCAErr.telGetCAFlagsMsg- Your tool receives this message when an application calls
TELGetCAFlagsto retrieve the current feature settings of a call appearance. On entry, parameterp1is a pointer to a 4-byte value into which your tool should copy the current feature settings of the call appearance specified by thehCAparameter. Parameterp2is a pointer to a 4-byte value into which your tool should copy the current other feature settings of that call appearance. Your tool should also update thefeatureFlagsandotherFeaturesfields of thehCAstructure. See "Call Appearance Feature Flags" on page 4-14 and "Other Call Appearance Feature Flags" on page 4-16 for a description of the available call appearance features. Parameterp3is unused. Your tool should return 0 if it completes successfully. If thehCAparameter is invalid, your tool should returntelBadCAErr.telGetCAInfoMsg- Your tool receives this message when an application calls
TELGetCAInfoto update the fields of a call appearance structure. Your tool should update these fields of thehCAstructure, based on information about the call appearance that it maintains privately:caState,intExt,callType,dialType,bearerType,rate,conferenceLimit,featureFlags,otherFeatures, andtelCAPrivate. Parametersp1,p2, andp3are unused. Your tool should return 0 if it completes successfully. If thehCAparameter references an idle call appearance, your tool should set thecaReffield to -1 and returntelBadCAErr.telConnectMsg- Your tool receives this message when an application calls
TELConnectto place an outgoing call using the information in the call appearance structure to whichhCAis a handle. Parametersp1,p2, andp3are unused. Your tool should return 0 if it completes successfully. If thehCAparameter is invalid, your tool should set thecaReffield to -1 and returntelBadCAErr.telDialDigitsMsg- Your tool receives this message when an application calls
TELDialDigitsto dial a sequence of digits using dual-tone multifrequency (DTMF) tones. On entry, parameterp1is a pointer to a Pascal-style string that contains a sequence of ASCII digits. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telAcceptCallMsg- Your tool receives this message when an application calls
TELAcceptCallto accept an incoming call. The call must be in thetelCAOfferStatestate. Parametersp1,p2, andp3are unused. Your tool should return 0 if it completes successfully.telRejectCallMsg- Your tool receives this message when an application calls
TELRejectCallto reject an incoming call. The state of the incoming call must betelCAAlertingStateortelCAOfferState. Parametersp1,p2, andp3are unused. Your tool should return 0 if it completes successfully. If the call appearance is not in an alerting state, your tool should not reject the call; instead, it should returntelCANotRejectable.telDeflectCallMsg- Your tool receives this message when an application calls
TELDeflectCallto deflect an incoming call to another directory number. The call must be in thetelCAAlertingStateortelCAOfferStatestate. On entry, parameterp1is a pointer to a Pascal-style string containing the directory number to which the call is to be deflected. Parameterp2is a pointer to a Pascal-style string containing the subaddress, as defined by the ISDN S-Bus specification, of the directory number to which the call is to be deflected; if your tool does not support subaddressing, it can ignorep2. Parameterp3is a pointer to a Pascal-style string containing the name of the party associated with the directory number to which the call is to be deflected. Your tool should save the vales passed in thep1,p2, andp3parameters and pass them back in thetelCADeflectMsgmessage. Your tool should return 0 if it completes successfully. If your telephone network switch doesn't support call deflection, your tool can mimic this feature by performing a blind transfer by first answering the call and then immediately transferring it to the destination directory number.telAnswerCallMsg- Your tool receives this message when an application calls
TELAnswerCallto answer an incoming call. The state of the incoming call must betelCAAlertingStateortelCAOfferState. If the state istelCAOfferState, your tool should both accept the incoming call and answer it. Parametersp1,p2, andp3are unused. Your tool should return 0 if it completes successfully.telDropMsg- Your tool receives this message when an application calls
TELDropto drop a call. On entry, parameterp1is a pointer to a Pascal-style string containing user-to-user information, as defined by certain telephone networks. If your tool doesn't support user-to-user information, it should ignore this parameter. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telHoldMsg- Your tool receives this message when an application calls
TELHoldto put a call on hold. Parametersp1,p2, andp3are unused. Your tool should return 0 if it completes successfully.telRetrieveMsg- Your tool receives this message when an application calls
TELRetrieveto retrieve a call that is on hold. Parametersp1,p2, andp3are unused. Your tool should return 0 if it completes successfully.telConfSplitMsg- Your tool receives this message when an application calls
TELConferenceSplitto split a call from a conference. Your tool should remove the call from the conference but it should not drop the call. Parametersp1,p2, andp3are unused. Your tool should return 0 if it completes successfully.telTransfBlindMsg- Your tool receives this message when an application calls
TELTransferBlindto transfer a call immediately without first connecting the user to the destination party. On entry, parameterp1is a pointer to a Pascal-style string containing the directory number to which the call is to be transferred. Parameterp2is a pointer to a Pascal-style string containing the subaddress, as defined by the ISDN S-Bus specification, of the directory number to which the call is to be transferred; if your tool does not support subaddressing, it can ignorep2. Parameterp3is a pointer to a Pascal-style string containing the name of the party associated with the directory number to which the call is to be transferred. Your tool should save the vales passed in thep1,p2, andp3parameters and pass them back in thetelCATransferMsgmessage. Your tool should return 0 if it completes successfully.telCallbackSetMsg- Your tool receives this message when an application calls
TELCallbackSetto make a callback request. On entry, parameterp1is a value that identifies the callback request to be made. If the telephone network switch returns a callback reference, your tool should return it in thep1parameter. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telCallbackNowMsg- Your tool receives this message when an application calls
TELCallbackNowto place a call in response to a local or remote callback request. On entry, parameterp1is a value that identifies the callback request to be placed. If there is more than one callback request for your tool,p1specifies the destination to be called back. (Your tool specified this value previously, when processing the correspondingtelCallbackSetMsgmessage.) Parametersp2andp3are unused. Your tool should return 0 if it completes successfully. If the specified callback request is invalid, your tool should returntelNoCAllbackRef. If no callback is set, your tool should returntelCBErr.telCallPickupMsg- Your tool receives this message when an application calls TELCallPickup to answer a call that is alerting either in a predefined pickup group or at a specified directory number. On entry, parameter
p1is a pointer to a Pascal-style string containing a remote directory number. Parameterp2is a pointer to a Pascal-style string containing a pickup group identifier. Your tool should use eitherp1orp2, depending on the kind of network switch your tool supports. ParametershCAandp3are unused. Your tool should return 0 if it completes successfully.telParkCallMsg- Your tool receives this message when an application calls
TELParkCallto park a call, making it available for retrieval at another directory number. On entry, parameterp1is a pointer to a Pascal-style string; your tool should put an identifier for the parked call. Parameterp2is a pointer to a Pascal-style string containing a the directory number at which the call will be parked. Parameterp3is unused. Your tool should return 0 if it completes successfully.telRetrieveParkedCallMsg- Your tool receives this message when an application calls
TELRetrieveParkedCallto retrieve a parked call. The Telephone Manager sends your tool atelSetupCallMsgmessage before sending it thetelRetrieveParkedCallMsgmessage. On entry, parameterp1is a pointer to a Pascal-style string containing an identifier for the parked call. ParametershCA,p2, andp3are unused. Your tool should return 0 if it completes successfully.telVoiceMailAccessMsg- Your tool receives this message when an application calls
TELVoiceMailAccessto access the voice-mail system of a private branch exchange (PBX). Parametersp1,p2, andp3are unused. Your tool should return 0 if it completes successfully.telPagingMsg- Your tool receives this message when an application calls
TELPagingto access a paging feature defined by the telephone system. On entry, parameterp1contains an identifier for a specific paging feature. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully. Ifp1specifies an invalid page ID, your tool should returntelBadPageID.telIntercomMsg- Your tool receives this message when an application calls
TELIntercomto access an intercom feature defined by the telephone system. On entry, parameterp1contains an identifier for a specific intercom feature. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully. Ifp1specifies an invalid intercom ID, your tool should returntelBadIntercomID.telConfPrepMsg- Your tool receives this message when an application calls
TELConferencePrepto place a call in preparation for adding a party to a conference. On entry, parameterhCAcontains a handle to a call appearance structure for the conference initiator. Parameterp1contains a handle to a call appearance structure for the call being added to the conference. Parametersp2specifies the total number of parties, including the conference initiator, that will be part of the conference call after all parties are added. Parameterp3is unused. Your tool should return 0 if it completes successfully. Ifp1specifies a call appearance that is not active, your tool should proceed (as withtelConnectMsg) to put the call appearance into an active state.telConfEstMsg- Your tool receives this message when an application calls
TELConferenceEstablishto add a new party to a conference. On entry, parameterhCAcontains a handle to a call appearance structure for the conference initiator. Parameterp1contains a handle to a call appearance structure for the call being added to the conference. Parametersp2andp3are unused. Your tool should ensure that thistelConfEstMsgmessage was preceded by atelConfPrepMsgmessage for the call appearanceshCAandp1. If it was, your tool can unite the two call appearances in a conference; if not, your tool can return the error messagetelConfRej. Your tool should return 0 if it completes successfully.telTransfPrepMsg- Your tool receives this message when an application calls
TELTransferPrepto place a call in preparation for a supervised transfer. On entry, parameterhCAcontains a handle to a call appearance structure for the call to be transferred. Parameterp1contains a handle to a call appearance structure for the new destination number. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully. Ifp1specifies a call appearance that is not active, your tool should proceed (as withtelConnectMsg) to put the call appearance into an active state.telTransfEstMsg- Your tool receives this message when an application calls
TELTransferEstablishto complete a supervised transfer by connecting the party to be transferred with the new destination party. On entry, parameterhCAcontains a handle to a call appearance structure for the call to be transferred. Parameterp1contains a handle to a call appearance structure for the new destination number. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telGetDNSoundInputMsg- Your tool receives this message when an application calls
TELGetDNSoundInputto get the name of the current sound input driver for the directory number specified by thehDNparameter. On entry, parameterp1is a pointer to a Pascal-style string. Your tool should copy the name of the current sound input driver into that string. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telDisposeDNSoundInputMsg- Your tool receives this message when an application calls TELDisposeDNSoundInput to dispose of the sound input driver associated with a directory number. On entry, parameter
p1is a pointer to a Pascal-style string that contains the name of the current sound input driver into that string. Your tool should dispose of that driver. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telGetDNSoundOutputMsg- Your tool receives this message when an application calls
TELGetDNSoundOutputto get a component reference to the sound output stream associated with a directory number. On entry, parameterp1is a pointer to 4-byte area of memory. Your tool should copy a component reference to the sound output stream into that memory. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telDisposeDNSoundOutputMsg- Your tool receives this message when an application calls
TELDisposeDNSoundOutputto dispose of a sound output component associated with a directory number. On entry, parameterp1is a reference to the sound output component. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telGetHSSoundInputMsg- Your tool receives this message when an application calls
TELGetHSSoundInputto get the name of the current sound input driver for the telephone handset specified by thehTELparameter. On entry, parameterp1is a pointer to a Pascal-style string. Your tool should copy the name of the current sound input driver into that string. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telDisposeHSSoundInputMsg- Your tool receives this message when an application calls
TELDisposeHSSoundInputto dispose of the sound input driver associated with a telephone handset. On entry, parameterp1is a pointer to a Pascal-style string that contains the name of the current sound input driver into that string. Your tool should dispose of that driver. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telGetHSSoundOutputMsg- Your tool receives this message when an application calls
TELGetHSSoundOutputto get a component reference to the sound output stream associated with a telephone handset. On entry, parameterp1is a pointer to 4-byte area of memory. Your tool should copy a component reference to the sound output stream into that memory. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telDisposeHSSoundOutputMsg- Your tool receives this message when an application calls
TELDisposeHSSoundOutputto dispose of a sound output component associated with a telephone handset. On entry, parameterp1is a reference to the sound output component. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telDNSetDTMFMsg- Your tool receives this message when an application calls
TELDNSetDTMFto set the current state of DTMF detection for a directory number. On entry, parameterp1is a pointer to a Boolean value that indicates the desired DTMF detection state, enabled (true) or disabled (false). Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telDNGetDTMFMsg- Your tool receives this message when an application calls
TELDNGetDTMFto get the current state of DTMF detection for a directory number. On entry, parameterp1is a pointer to a Boolean value; your tool should set that value to indicate the current DTMF detection state, enabled (true) or disabled (false). Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telHSSetDTMFMsg- Your tool receives this message when an application calls
TELHSSetDTMFto set the current state of DTMF detection for a telephone handset. On entry, parameterp1is a pointer to a Boolean value that indicates the desired DTMF detection state, enabled (true) or disabled (false). Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telHSGetDTMFMsg- Your tool receives this message when an application calls
TELHSGetDTMFto get the current state of DTMF detection for a telephone handset. On entry, parameterp1is a pointer to a Boolean value; your tool should set that value to indicate the current DTMF detection state, enabled (true) or disabled (false). Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telGetDNStatusMsg- Your tool receives this message when an application calls
TELGetDNStatusto get the current status of a directory number. On entry, parameterp1is a pointer to a 4-byte value; your tool should set that value to indicate the current directory number status. See "Directory Number States" on page 3-6 for a description of the available states. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telGetDNProgressDetMsg- Your tool receives this message when an application calls
TELGetDNProgressDetto get the state of the call progress indicator for a directory number. On entry, parameterp1is a pointer to a Boolean value; your tool should set that value to indicate whether the call progress indicator is on (true) or off (false) for the specified directory number. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telSetDNProgressDetMsg- Your tool receives this message when an application calls
TELSetDNProgressDetto set the state of the call progress indicator for a directory number. On entry, parameterp1is a pointer to a Boolean value that indicates whether the call progress indicator is to be on (true) or off (false) for the specified directory number. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telDNSetAutoAnswerMsg- Your tool receives this message when an application calls
TELDNSetAutoAnswerto enable or disable routing of auto-answered incoming calls to that application. On entry, parameterp1is a pointer to a Boolean value that indicates whether to enable (true) or disable (false) routing of auto-answered incoming calls for the specified directory number. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telDNTollSaverControlMsg- Your tool receives this message when an application calls
TELDNSetAutoAnswerto enable or disable the Call Saver feature for a directory number. On entry, parameterp1is a pointer to a Boolean value that indicates whether to enable (true) or disable (false) the Call Saver feature for the specified directory number. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telSetIndHSConnectMsg- Your tool receives this message when an application calls
TELSetIndHSConnectto set the connection state of a telephone handset. On entry, parameterp1is a pointer to a Boolean value that indicates whether the specified telephone handset is to be connected (telIndHSConnected) or disconnected (telIndHSDisconnected). Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telGetIndHSConnectMsg- Your tool receives this message when an application calls
TELGetIndHSConnectto get the connection state of a telephone handset. On entry, parameterp1is a pointer to a Boolean value; your tool should copy a value that indicates whether the specified telephone handset is connected (telIndHSConnected) or disconnected (telIndHSDisconnected). Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telCAVoiceDetectMsg- Your tool receives this message when an application calls
TELCAVoiceDetectto activate or deactivate voice detection on a call appearance. On entry, parameterp1is a pointer to a Boolean value that indicates whether to activate (true) or deactivate (false) voice detection for the specified call appearance. Parametersp2andp3are unused. Your tool should return 0 if it completes successfully.telCASilenceDetectMsg- Your tool receives this message when an application calls
TELCASilenceDetectto activate or deactivate silence detection on a call appearance. On entry, parameterp1is a pointer to a Boolean value that indicates whether to activate (true) or deactivate (false) silence detection for the specified call appearance. Parameter p2 is a pointer to a 4-byte value that indicates the duration of silence on the telephone line, in seconds, that qualifies as silence detection. Parameterp3is unused. Your tool should return 0 if it completes successfully.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help