|
VoiceResourcePlayTouchTones Method |
Plays
DTMF or touch tones corresponding to the string specified.
Namespace:
VoiceElements.Client
Assembly:
VoiceElementsClient (in VoiceElementsClient.dll) Version: 8.6.1.1
Syntax public TerminationCode PlayTouchTones(
string touchTones
)
Public Function PlayTouchTones (
touchTones As String
) As TerminationCode
public:
TerminationCode PlayTouchTones(
String^ touchTones
)
member PlayTouchTones :
touchTones : string -> TerminationCode
Parameters
- touchTones
- Type: SystemString
The string of numbers you wish to be played as DTMF or Touch Tones.
Return Value
Type:
TerminationCode
A
Termination Code indicating how the play ended. Typically, you will use this to determine what to do next.
Remarks Typical Use: Dialing Into An External IVR or Call Center
Typically, your application will be gathering
DTMF digits using the
Get Response Method,
However, you may want to have your application
Dial into another IVR system, call center or
PBX.
If this target system requires user input to get to a specific extension or function, you will use this method to simulate the digit presses to automatically navigate the target system.
Examples
The following sample code sets up a
Channel Resource,
Dials a Call, retrieves a
Voice Resource,
and then waits a few seconds and dials '5309', an imaginary extension in a remote
PBX.
public void DialOutAndDialRemoteExtension()
{
TelephonyServer m_TelephonyServer = new TelephonyServer();
ChannelResource m_ChannelResource = m_TelephonyServer.GetChannel();
string phoneNumber = "2135551212";
m_ChannelResource.Dial(phoneNumber);
VoiceResource m_VoiceResource = m_ChannelResource.VoiceResource;
Thread.Sleep(1000);
m_VoiceResource.PlayTouchTones("5309");
Thread.Sleep(5000);
m_VoiceResource.Codec = Codec.MULAW_8Khz_8Bit;
m_VoiceResource.Play(@"C:\Audio\HelloDeskPhone.wav");
}
Public Sub DialOutAndDialRemoteExtension()
Dim m_TelephonyServer As New TelephonyServer()
Dim m_ChannelResource As ChannelResource = m_TelephonyServer.GetChannel()
Dim phoneNumber As String = "2135551212"
m_ChannelResource.Dial(phoneNumber)
Dim m_VoiceResource As VoiceResource = m_ChannelResource.VoiceResource
Thread.Sleep(1000)
m_VoiceResource.PlayTouchTones("5309")
Thread.Sleep(5000)
m_VoiceResource.Codec = Codec.MULAW_8Khz_8Bit
m_VoiceResource.Play("C:\Audio\HelloDeskPhone.wav")
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also