WorkerThread Events

Disconnect

Sub WorkerThread1_Disconnect(ByVal sender As Object, ByVal e As AxVBVoiceLib._DDelayEvents_DisconnectEvent) Handles WorkerThread1.Disconnect

This event is fired when a caller hangs up and it can occur in any control that performs voice processing. This event allows clean-up on a per-control basis. After it occurs, a Disconnect event occurs in the LineGroup control that initiated this call. Read more about Disconnect Event.

EnterEvent

Sub WorkerThread1_EnterEvent(ByVal sender As System.Object, ByVal e As AxVBVoiceLib._WorkerThreadEvents_EnterEvent) Handles WorkerThread1.EnterEvent

The EnterEvent event is executed by the control upon call entry. If the GotoNode property is set or the TakeCall method is used, the call exits this control and is handled by the new control after the Exit Sub or End Sub statement. Developers should instantiate an object of their job in this event and assign it to e.jobObject argument. They can also provide their own implementation of JobData object to e.JobData argument as explained above. Read more about Enter, EnterB Events.

Exit

Sub WorkerThread1_Exit(ByVal sender As Object, ByVal e As AxVBVoiceLib._WorkerThreadEvents_ExitEvent) Handles WorkerThread1.Exit

This event fires when a call leaves the control, but before the Enter event occurs in the destination control. Read more about Exit Event. In WorkerThread, Exit event provides in its arguments a copy of the JobData object passed back from the completed job, this object contains information about job completion as well as the custom user data. Developers need to cast it to their own objects, if they have provided one in the EnterEvent event,

e.g.

MyJobDataClass myJobData = CType(e.jobData, MyJobDataClass)

PhraseError

Sub WorkerThread1_PhraseError(ByVal sender As Object, ByVal e As AxVBVoiceLib._DDelayEvents_PhraseErrorEvent) Handles WorkerThread1.PhraseError

This event is fired when VBVoice cannot open a specified file; when VBVoice cannot find a specified phrase within a file; when an invalid parameter is specified in a System Phrase. Read more about PhraseError Event.

PlayRequest

Sub WorkerThread1_PlayRequest(ByVal sender As Object, ByVal e As AxVBVoiceLib._DDelayEvents_PlayRequestEvent) Handles WorkerThread1.PlayRequest

This event is fired when a greeting contains a VB Phrase. Each VB Phrase is named so that it can easily be identified in a situation where a control has multiple VB phrases. VB Phrase could be used in IMusicGreeting to create escalated prompt played to the caller while waiting for a job to be finished. Read more about PlayRequest Event.

VoiceError

Sub WorkerThread1_VoiceError(ByVal sender As Object, ByVal e As AxVBVoiceLib._DDelayEvents_VoiceErrorEvent) Handles WorkerThread1.VoiceError

This event fires when a non-fatal error occurs in the control. When this error event occurs, the control generating the event is generally not able to continue normal processing. Read more about VoiceError Event.