Please dont tell me this is impossible

Home » Asterisk Users » Please dont tell me this is impossible
Asterisk Users 5 Comments

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

5 thoughts on - Please dont tell me this is impossible

  • 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

  • Please use more meaningful subjects.

    ‘Please dont tell me this is impossible’

    I’m sure there are lots of things I could tell you that are impossible.

    ‘Issue with Perl-AGI’

    I’m sure there are many issues with Perl and AGI if you don’t understand
    the protocol.

    Better subjects = better responses.