[asterisk-users] Feature Request: "SayNumberFiles"

Danny Nicholas danny at debsinc.com
Thu Dec 3 08:23:27 CST 2009


With a little familiarity of how SayNumber works, this isn't hard at all.
All that Saynumbers does is parse out the number into 1, 2 or 3 digits and
then plays files from /var/lib/asterisk/sounds/digits.  In the example the
OP posted, ${numMessages} had a value of 23, so 20.gsm and 3.gsm would be
played back.  To use the read function's single file "capability", you could
use sox to concatenate the files together, or just use the playback example
below or use an AGI like this:
exten => s,1,AGI(nomessages.agi|${nummessages})
exten => s,n,Background(${PART1}&${PART2}&${PART3}&${PART4})
exten => s,n,Read(faxno,beep,1,skip,1,5)  

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Warren Selby
Sent: Thursday, December 03, 2009 12:56 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Feature Request: "SayNumberFiles"

Why not do something with Background()?  i.e

Playback(you-have)
SayNumber(${numMessages})
Playback(messages)
Background(press-1-or-2)

Then just be sure to record the audio files in the appropriate  
directory...




Thanks,
--Warren Selby

On Dec 3, 2009, at 12:39 AM, Olivier <oza-4h07 at myamail.com> wrote:

> Hi,
>
> Currently, it seems impossible to use the output of SayNumber  
> application as an input to Read application.
> So, if you want to develop an IVR with something like "You've got 23  
> messages. Type 1 to listen to the first one. Type 2 to leave", you  
> must parse this message into 3 pieces and want for the last one play  
> to start listening of user input :
>   Playback ( "You've got")
>   SayNumber (23)
>   Read ("messages. Type 1 to listen to the first one. Type 2 to  
> leave", ...)
>
> Being to get the list of sound files that SayNumber would play would  
> be very convenient to build concatenate several one into one  
> temporary file. When played with Read app, user wouldn't have to  
> wait for the last part to type its answer :
>
>   myfilelist = SayNumberFiles(23)
>   tempfile=concat( "You've got", myfilelist, "messages. Type 1 to  
> listen to the first one. Type 2 to leave")
>   Read (tempfile, ...)
>
> Did I miss a workaround ?
> What would you say about this feature request ?
>
> Regards
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list