WaitAcceptCallAndRecord

From IRON Test Suite
Jump to navigation Jump to search

DESCRIPTION

This command waits for an incoming call on the specified GSM port, accepts it and then records voice to the specified WAV file (sample rate 8kHz, mono, 8 bits per sample, block-align 1, A-LAW coding). An optional timeout (in seconds) can be specified.
If timeout is not specified or is greater than general timeout, general timeout will be used. Optional flag PCM16 can be added to record 16 bits per sample. Command exits as soon as call is connected and the voice starts to record.

COMMAND

Command Input arguments Returns
WaitAcceptCallAndRecord Port index, Wav file path, [Timeout], [PCM16 flag] Calling number, in the case of error, Error Code

OUTPUT

GSM port command status in the following format:
"%s\n", command_status

EXAMPLE

~# WaitAcceptCallAndRecord 1 /usr/wav/record.wav
CONNECTED 0612943276

~# WaitAndAcceptCall 2 /usr/wav/record.wav 120
TIMEOUT EXPIRED