How to stop playback after a fixed time

General discussions about Asterisk.

Moderators: Moderator, Support

How to stop playback after a fixed time

Postby tanbir_ahmed » Sun Aug 02, 2015 6:50 am

How can I stop playing an audio after a fixed time and execute the following command in agi script??
Code: Select all
$billsec = $agi->get_variable('CDR(duration)',true);
$total_min = $agi->get_variable('total_min',true); // $total_min is a local variable
$time_to_play = $total_min - $billsec;
$agi->exec('Playback','/var/lib/asterisk/sounds/my_file'); //Here I want to set the playback time to $time_to_play
tanbir_ahmed
Newsterisk
 
Posts: 1
Joined: Sun Aug 02, 2015 6:48 am

Re: How to stop playback after a fixed time

Postby david55 » Mon Aug 03, 2015 5:15 am

This isn't a support forum.

You could use a local channel with a time limit.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am


Return to Asterisk General

Who is online

Users browsing this forum: No registered users and 1 guest