|
|
Click here for more information about working with wave files.
Development
Environment Technical Information
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Requirements |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Using This Sample Program |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The sample program should automatically answer incoming calls after the selected number of rings and place the selected wave file. If the wave file does not play and displays an error in the log window, try checking the "use codecs" checkbox and press the "play again" button. Try different wave files. You will be able to see how to code your own application in the source, see how codecs work, and learn about wave file formats. Be sure to read the white paper about working with wave files. You may use the hang up button to hangup your call, display the TeleScope utility to have more control and logging information, or press the "line config" button to see how your TSP is configured.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Download this Sample Program |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
For Use TeleTools v3.7
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
How this Sample Program Works |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The etAutoAnswerPlayWave sample program enables the two TeleTools components used on this form, etLine and etPlay with the lines etLine.Enabled = True. We then give you a list of all the TAPI telephony devices installed on your machine with the etLine.DeviceList property or the etLine.DeviceID property and put them into a combobox. We then activate the device with the etLine.DeviceActive property and link the etPlay component to the etLine component with the line etPlay.DeviceID = etLine.WavePlayID. This saves you from having to worry about wave devices. We automatically link the proper wave device to the telephony device you have selected. In our etLine OnCallBegin event, we reset the number or rings detected to 0 and then start counting rings in the etLine OnRing event. When the number of rings detects is equal to or greater to the number of rings the user wished to answer on, we answer the call with the etLine.CallAnswer method. This immediately fires the etLine OnConnected state and we can use this event handler to place code that will play a wave file. We select the wave file with the property etPlay.SourceFilename = "MyWaveFile.wav" and play the wave file simply by setting the property etPlay.DeviceActive = true. If the user checked the "use codecs" checkbox, we set the property etPlay.DeviceCODECSEnabled = true to enable to Windows to use codecs that are installed on the machine to try and convert the wave format if it is not supported by the device. We also use etPlay.Volume properties to set the volume if necessary. This covers all of the important methods, events and properties used to create this very small program. Please see the source code of this and any of our other samples to see how easy it is to implement our tools into your project.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Release Notes |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
September 30, 2003first release |
|
|
||||
|
||||