Skip Menu |

This queue is for tickets about the asterisk-perl CPAN distribution.

Report information
The Basics
Id: 27670
Status: resolved
Priority: 0/
Queue: asterisk-perl

People
Owner: Nobody in particular
Requestors: jfields.bitcard.org [...] spammenot.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.09
Fixed in: (no value)



Subject: stream_file offset not supported
The stream_file command in asterisk supports a optional 3rd parameter: offset_samples. The purpose of this is to start playing at some point in the file other than at sample zero. For example I want to do the equivalent of 'tail' on the audio file and only play the last 5 seconds. This should work but the 3rd parameter is ignored: $AGI->stream_file('filetoplay','123#','32000'); The AGI.pm stream_file function doesn't support the 3rd parameter. Please update so it passes the 3rd parameter. :) In v0.09: sub stream_file { my ($self, $filename, $digits) = @_; $digits = '""' if (!defined($digits)); return -1 if (!defined($filename)); return $self->execute("STREAM FILE $filename $digits"); } Show quoted text
>--------------
The record_file function properly supports an offset_sample option like this: sub record_file { my ($self, $filename, $format, $digits, $timeout, $offset, $beep, $silence) = @_; my $extra = ''; return -1 if (!defined($filename)); $digits = '""' if (!defined($digits)); $extra .= $offset if (defined($offset)); $extra .= ' ' . $beep if (defined($beep)); $extra .= ' s=' . $silence if (defined($silence)); return $self->execute("RECORD FILE $filename $format $digits $timeout $extra"); }
This is fixed in 0.10 which is available at http://asterisk.gnuinter.net or on CPAN in a few minutes.