[asterisk-users] Saying Ordinal Numbers

asterisk at phreaknet.org asterisk at phreaknet.org
Tue Aug 10 07:18:13 CDT 2021


On 8/10/2021 6:06 AM, Antony Stone wrote:
> On Tuesday 10 August 2021 at 12:40:39, Dovid Bender wrote:
>
>> Hi,
>>
>> Is there any way in Asterisk to say an ordinal number?
> My sounds directory (en_UK) contains files with names such as "first.gsm", 
> "second.gsm", "ninth.gsm" etc.
>
> You could simply copy these to a subdirectory named "ordinal" into filenames 
> like "ordinal/1.gsm", "ordinal/2.gsm" etc (the same as you have already under 
> the "digits" subdirectory), and then use:
>
> Playback(ordinal/${DIGIT})
>
> The main limitation would be whether you want it to go beyond 20th (which is 
> far as those recordings go for me, except for the decades 30th, 40th...100th).
The prompts for saying any ordinal number are all there: from 1 to
999,999,999 - they just need to be spliced together properly. I am
currently in the process of refactoring core "Say" code and could add a
SayOrdinal() application while I'm at it. Would this meet your needs?
NA



More information about the asterisk-users mailing list