The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Voicent - Interface for making telephone calls using Voicent Gateway

This is the perl interface module for Voicent Gateway, a VoiceXML gateway. You can use this interface module to make telephone calls from your perl program, provided that the Voicent Gateway is installed and can be accessed through HTTP. There is a FREE version of Voicent Gateway program downloadable from:

http://www.voicent.com/download

SYNOPSIS

  use Voicent;

  call_text   <phone number> <text message> <selfdelete>
  call_audio  <phone number> <audio file> <selfdelete>
  call_status <call reqId>
  call_remove <call reqId>
  call_till_confirm <vcast exe> <call list voc> <confirm code> <wavefile>

DESCRIPTION

This module contains a collection of functions to the Voicent Gateway. You can use it to make telephone calls from your perl program.

call_text

Synopsis

    call_text <phoneno> <text message> <selfdelete>

Description

Make a phone call and play the specified text message. The text message is convert to voice by Voicent Gateway's text-to-speech engine.

Options

    <phoneno>      The phone number to call

    <text message> The message for the phone call 

    <selfdelete>   Ask the gateway to automatically delete the call request after the call is made if it is set to '1' 

    The return value is the call request id <reqId>. 

Example

    call_text('123-4567', 'Hello, how are you doing', 1); 

Make a call to phone number '123-4567' and say 'Hello, how are you doing'. Since the selfdelete bit is set, the call request record in the gateway will be removed automatically after the call.

    $reqId = call_text(123-4567, 'Hello, how are you doing', 0);
  

Make a call to phone number '123-4567' and say 'Hello, how are you doing'. Since the selfdelete bit is not set, the call request record in the gateway will not be removed after the call. You can then use call_status to get the call status, or use call_remove to remove the call record.

call_audio

Synopsis

    call_audio <phoneno> <audiofile> <selfdelete>

Description

Make a phone call and play the specified audio message.

Options

    <phoneno>     The phone number to call
 
    <audiofile>   The audio message for the phone call. The format must be PCM 16bit, 8KHz, mono wave file. The audio file must be on the same host as Voicent Gateway.
 
    <selfdelete>  Ask the gateway to automatically delete the call request after the call is made if it is set to '1' 

    The return value is the call request id <reqId>. 

Example

    call_audio('123-4567', 'C:\my audios\hello.wav', 1); 

Make a call to phone number '123-4567' and play the hello.wav file. Since the selfdelete bit is set, the call request record in the gateway will be removed automatically after the call.

    $reqId = call_audio(123-4567, 'Hello, how are you doing', 0);
  

Make a call to phone number '123-4567' and play the hello.wav file. Since the selfdelete bit is not set, the call request record in the gateway will not be removed after the call. You can then use call_status to get the call status, or use call_remove to remove the call record.

call_status

Synopsis

    call_status <reqId> 

Description

Check the call status of the call with <reqId>. If the call is made, the return value is 'Call Made', or if the call is failed, the return value is 'Call Failed', and for any other status, the return value is ''.

Example

    $status = call_status('11234035434');

call_remove

Synopsis

    call_remove <reqId>

Description

Remove the call record of the call with <reqId>. If the call is not made yet, it will be removed also.

Example

    call_remove('11234035434');

call_till_confirm

Synopsis

    call_till_confirm <vcast prog> <vcast doc> <confirmcode> <wavfile>

Description

Keep calling a list of people until anyone enters the confirmation code. The message is the specified audio file. This is ideal for using it in a phone notification escalation process.

To use this feature, Voicent BroadcastByPhone Professional version has to be installed. This function is similar to the command line interface BroadcastByPhone has. But since the command cannot be invoke over a remote machine, this perl function uses the gateway to schedule an event, which in turn invokes the command on the gateway host.

Options

    <vcast prog>     The BroadcastByPhone program. It is usually 'C:\Program Files\Voicent\BroadcastByPhone\bin\vcast' on the gateway host.
 
    <vcast doc>     The BroadcastByPhone call list to use.
 
    <confirmcode>   The confirmation code use for the broadcast 

    <wavfile>       The audio file to use for the broadcast 

Example

    call_till_confirm(
        'C:\Program Files\Voicent\BroadcastByPhone\bin\vcast.exe',
        'C:\My calllist\escalation.voc',
        '911911',
        'C:\My calllist\escalation.wav'); 

This will invoke BroadcastByPhone program on the gateway host and start calling everyone one the call list defined in 'C:\My calllist\escalation.voc'. The audio message played is 'C:\My calllist\escalation.wav'. And as soon as anyone on the list enters the confirmation code '911911', the call will stop automatically.

EXPORT

None by default.

SEE ALSO

Please check online http://www.voicent.com/devnet

AUTHOR

Andrew Kern, Voicent Communications, <andrew@voicent.com>

COPYRIGHT AND LICENSE

This software is provided AS_IS.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.