Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: Haldane on October 06, 2006, 11:41:38 AM
-
Does anyone know how to get the description of the event type in vb from the eventinfo. I have the following
Dim MyEventType as String
With Eventifo
MyEventType = .EventType
end with
But MyEventType keeps coming back with the numeric id. eg 53 adn I want the des of "EventRegistered".
Is there a way to enumerate out the description? ??? ???
-
Not sure about VB...
But in the t-lib SDK there is a function called TGetMessageTypeName defined as:
const char *TGetMessageTypeName(enum TMessageType msg_type);
usage:
(char *) TGetMessageTypeName(event->Event)
where
TEvent *event is the event structure passed in from the dispatch function.
I know this isn't VB, but maybe it helps...
-
Genecist,
Cheers looks good to me. I'll test it later and let you know.
:)
-
Genecist,
My application is based on the DesktopToolkit. I guess this fuction is not part of the toolkit as I cannot see it in the object browser. Looking like I have to wrtie my own function to return the value.
-
There is no such funcionality in Activex, in TLib there exists the function that returns the match of the numeric value. Why you need the events name?
-
[quote author=Haldane link=topic=1859.msg6083#msg6083 date=1160477692]
Genecist,
My application is based on the DesktopToolkit. I guess this fuction is not part of the toolkit as I cannot see it in the object browser. Looking like I have to wrtie my own function to return the value.
[/quote]
If you're using VB6, you can still map to the TGetMessageTypeName function in tlib_MD.dll.
It's been a while since I've done VB6 integration with a 'C' library, but it would be along the lines of
Declare Function TGetMessageTypeName Lib "tlib_MD.dll" (ByVal lEvent As Integer) As String
You'll have to play with it, but it should work.
-
If you're going to 'roll' your own, the events and their corresponding identifiers are as follows (taken from tlibrary.h):
enum TMessageType {
RequestRegisterClient, /* 0 */
RequestQueryServer,
RequestQueryAddress,
RequestRegisterAddress,
RequestUnregisterAddress,
RequestRegisterAll,
RequestUnregisterAll,
RequestSetInputMask,
RequestAgentLogin,
RequestAgentLogout,
RequestAgentReady, /* 10 */
RequestAgentNotReady,
RequestSetDNDOn,
RequestSetDNDOff,
RequestMakeCall,
RequestMakePredictiveCall,
RequestAnswerCall,
RequestReleaseCall,
RequestHoldCall,
RequestRetrieveCall,
RequestInitiateConference, /* 20 */
RequestCompleteConference,
RequestDeleteFromConference,
RequestInitiateTransfer,
RequestMuteTransfer,
RequestSingleStepTransfer,
RequestCompleteTransfer,
RequestMergeCalls,
RequestAlternateCall,
RequestReconnectCall,
RequestAttachUserData, /* 30 */
RequestUpdateUserData,
RequestDeleteUserData,
RequestDeletePair,
RequestCallForwardSet,
RequestCallForwardCancel,
RequestRouteCall,
RequestGiveMusicTreatment,
RequestGiveSilenceTreatment,
RequestGiveRingBackTreatment,
RequestLoginMailBox, /* 40 */
RequestLogoutMailBox,
RequestOpenVoiceFile,
RequestCloseVoiceFile,
RequestPlayVoiceFile,
RequestCollectDigits,
RequestSetMessageWaitingOn,
RequestSetMessageWaitingOff,
RequestDistributeUserEvent,
RequestDistributeEvent,
EventServerConnected, /* 50 */
EventServerDisconnected,
EventError,
EventRegistered,
EventUnregistered,
EventRegisteredAll,
EventUnregisteredAll,
EventQueued,
EventDiverted,
EventAbandoned,
EventRinging, /* 60 */
EventDialing,
EventNetworkReached,
EventDestinationBusy,
EventEstablished,
EventReleased,
EventHeld,
EventRetrieved,
EventPartyChanged,
EventPartyAdded,
EventPartyDeleted, /* 70 */
EventRouteRequest,
EventRouteUsed,
EventAgentLogin,
EventAgentLogout,
EventAgentReady,
EventAgentNotReady,
EventDNDOn,
EventDNDOff,
EventMailBoxLogin,
EventMailBoxLogout, /* 80 */
EventVoiceFileOpened,
EventVoiceFileClosed,
EventVoiceFileEndPlay,
EventDigitsCollected,
EventAttachedDataChanged,
EventOffHook,
EventOnHook,
EventForwardSet,
EventForwardCancel,
EventMessageWaitingOn, /* 90 */
EventMessageWaitingOff,
EventAddressInfo,
EventServerInfo,
EventLinkDisconnected,
EventLinkConnected,
EventUserEvent,
RequestSendDTMF, /* 97 */
EventDTMFSent,
EventResourceAllocated, /* 99 */
EventResourceFreed,
EventRemoteConnectionSuccess, /* 101 */
EventRemoteConnectionFailed,
RequestRedirectCall, /* 103 */
RequestListenDisconnect,
RequestListenReconnect,
EventListenDisconnected,
EventListenReconnected,
RequestQueryCall,
EventPartyInfo,
RequestClearCall,
RequestSetCallInfo, /* 111 */
EventCallInfoChanged,
RequestApplyTreatment, /* 113 */
EventTreatmentApplied,
EventTreatmentNotApplied,
EventTreatmentEnd,
EventHardwareError, /* 117 */
EventAgentAfterCallWork,
EventTreatmentRequired,
RequestSingleStepConference, /* 120 */
RequestQuerySwitch,
EventSwitchInfo,
RequestGetAccessNumber, /* 123 */
RequestCancelReqGetAccessNumber,
EventAnswerAccessNumber,
EventReqGetAccessNumberCanceled,
RequestReserveAgent, /* 127 */
EventAgentReserved,
RequestReserveAgentAndGetAccessNumber,
RequestAgentSetIdleReason, /* 130 */
EventAgentIdleReasonSet,
EventRestoreConnection, /* 132 */
EventPrimaryChanged,
RequestLostBackupConnection,
RequestSetDNInfo,
RequestQueryLocation, /* 136 */
EventLocationInfo,
EventACK, /* 138 */
RequestMonitorNextCall, /* 139 */
RequestCancelMonitoring,
EventMonitoringNextCall,
EventMonitoringCancelled,
RequestSetMuteOn, /* 143 */
RequestSetMuteOff,
EventMuteOn,
EventMuteOff,
EventDNOutOfService, /* 147 */
EventDNBackInService,
RequestPrivateService, /* 149 */
EventPrivateInfo,
EventBridged, /* added by Epi 7/10/01, ER#23208 */
EventQueueLogout, /* ER#53943 */
EventReserved_1, /* 153 */
EventReserved_2,
EventReserved_3,
EventReserved_4,
EventReserved_5,
EventReserved_6,
EventReserved_7,
/*
* Call Monitoring events:
*/
EventCallCreated, /* 160 */
EventCallDataChanged,
EventCallDeleted,
EventCallPartyAdded,
EventCallPartyState,
EventCallPartyMoved,
EventCallPartyDeleted,
/*
* Call Monitoring requests:
*/
RequestStartCallMonitoring, /* 167 */
RequestStopCallMonitoring,
MessageIDMAX
};
-
Thanks for your help Genecist... I just wrote my own function for the moment. When I redo the project in VS2005 I'lll try and intergrate the C lib's or I may look at the Genesys .NET server. I just need something quick for the moment.
Thanks Again
-
In .Net if you have any enum you can always use the following, where MessageType is an enum:
MessageType.ToString()
hth