Re: Please dont tell me this is impossible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



This is from the documentation of Perl-AGI
"$AGI->stream_file($filename, $digits, $offset)
Executes AGI Command "STREAM FILE $filename $digits [$offset]"
This command instructs Asterisk to play the given sound file and
listen for the given dtmf digits. The fileextension must not be used
in the filename because Asterisk will find the most appropriate file
type. $filename can be an array of files or a single filename.
Example: $AGI->stream_file('demo-echotest', '0123');
$AGI->stream_file(['demo-echotest', 'demo-welcome'], '0123');
Returns: -1 on error or hangup, 0 if playback completes without a
digit being pressed, or the ASCII numerical value of the digit if a
digit was pressed"

It does not mention that it returns the offset at which the file
stopped playing. Also, if you could get that number, then restarting
the stream would result, I guess, in an audible interruption. Please
advise how to get the offset on the result and I will try.
Yours
Philip



On Fri, Jun 29, 2012 at 6:27 AM, Thorsten Göllner <tg@xxxxxxxxxxxxx> wrote:
> Am 29.06.2012 11:38, schrieb CDR:
>
>> I have been fighting all night with version 1.8 and have not found a
>> way to do this with any command or Perl AGI->command. I need to play a
>> file and wait until the customer presses at least $maxdigits to
>> return, BUT, the file must continue playing until $maxdigits is
>> received or $timeout has expired. So far I found impossible to achieve
>> this functionality. Am I missing something?
>> Philip
>
>
> The Playcommand will be interrupted by the key but the agi result contains
> the offset. So you can play this file from offset again until you $maxdigits
> has been pressed. Take a look here:
> https://wiki.asterisk.org/wiki/display/AST/AGICommand_STREAM+FILE
>

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



[Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [DCCP]     [Gimp]     [100% Free Online Dating]     [Yosemite News]     [Arts & Crafts]     [Yosemite Photos]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]


Add to Google Powered by Linux