Early WAV file not getting played

Hello All
I am using trixbox with php…I am facing very weird scenrio

Earlier I was using
$agi->stream_file( ‘thank_you_for_calling’, ‘123456789*#’ );

Yesterday suddenly it stopped playing…after then i have added some blank wav files to play and then played the main file So it worked like below
$agi->stream_file( ‘blank’ );
$agi->stream_file( ‘blank’ );
$agi->stream_file( ‘blank’ );
$agi->stream_file( ‘blank’ );
$agi->stream_file( ‘blank’ );
$agi->stream_file( ‘thank_you_for_calling’, ‘123456789*#’ );

I dont know what is the issue…Can someone PLEASE HELP ME OUT

You probably need a delay to allow the media path to establish and stabilise. That would suggest you are using VoIP.

Hello David Thanks for reply
I have added
$agi->wait_for_digit( 6000 ); also did nto worked for me :frowning:

The time starts when you answer the call. Playing back the sound implicitly answers the call.

hello David
Earlier also I have first answered the call and then played
$agi->stream_file( ‘thank_you_for_calling’, ‘123456789*#’ );

So Earlier code was in
$agi->answer();
$agi->stream_file( ‘thank_you_for_calling’, ‘123456789*#’ );

Then we faced the issue that wav file is not getting played So I have added blank files like this
$agi->answer();
$agi->stream_file( ‘blank’ );
$agi->stream_file( ‘blank’ );
$agi->stream_file( ‘blank’ );
$agi->stream_file( ‘blank’ );
$agi->stream_file( ‘blank’ );
$agi->stream_file( ‘thank_you_for_calling’, ‘123456789*#’ );


So I am not sure exactly why this was happened :frowning: and how adding blank files resolved my issue and how to overcome from the above problem