[asterisk-users] Looped message playback

Mojo with Horan & Company, LLC mojo at horanappraisals.com
Thu Sep 21 09:28:09 MST 2006


Depending on the format of your audio file, you could generate a 
one-second sample of audio and then something like the following
------------------------------------------------
#!/bin/bash
NUM=$1
CUR=0

rm -f bigtonefile;

[ $CUR != $NUM ] && {
	cat tonefile >> bigtonefile;
	CUR = $CUR+1;
}
------------------------------------------------
System(generator 7)
Then Playback(bigtonefile) ; for seven seconds of audio

You could use half-second tones or less if you wanted finer granularity.

Just a suggestion, think outside the box, they say :)


Earle Clubb wrote:
> Bill Gibbs wrote:
>> Why not just merge the file together a few times using an audio program
>> and make a longer file?
>>
>> Bill
>>
>> -----Original Message-----
>> From: asterisk-users-bounces at lists.digium.com
>> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Earle
>> Clubb
>> Sent: Thursday, September 21, 2006 9:45 AM
>> To: asterisk-users at lists.digium.com
>> Subject: [asterisk-users] Looped message playback
>>
>> Hello,
>>
>> I'm trying to play an audio file to a phone an arbitrary number of 
>> times.  The audio is a five-second segment of a sine wave.  I need this 
>> to be played repeatedly without gaps between playbacks.  I've tried 
>> doing this in the dial plan, e.g.:
>>
>> exten => s,1,Playback(tonefile)
>> exten => s,2,Goto(1)
>>
>> but there is too long of a gap between the playbacks.  Does anyone know 
>> of a way to achieve this?
>>
>> Thanks,
>> Earle
>> _______________________________________________
>> --Bandwidth and Colocation provided by Easynews.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>> _______________________________________________
>> --Bandwidth and Colocation provided by Easynews.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>
> 
> The duration of the tone can vary at runtime and I have no way of 
> knowing beforehand what the duration will be.
> 
> Earle
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> !DSPAM:500,4512b29352141804284693!
> 

-- 
Mojo <mojo at horanappraisals.com>
Office Manager, Horan & Company, LLC
(907) 747-6666 x112


More information about the asterisk-users mailing list