[asterisk-users] [1.4] Reading phone number the French way?

Gilles codecomplete at free.fr
Tue Mar 8 06:22:18 CST 2011


Hello,

I need to write a script which prompts the callee to type a number,
and then read it back to them as confirmation:

======= extensions.conf
[robocall]
;Expect 10-digit number excluding final #, 2 tries, 20s time-out
exten => s,n(nbr2call),Read(NBR2CALL,please-type-number,10,,2,20)

exten => s,n,GotoIf($[${LEN(${NBR2CALL})} != 10]?end)
;exten => s,n,SayDigits(${NBR2CALL})
exten => s,n,SayNumber(${NBR2CALL})

exten => s,n(end),Hangup()
======= 

Besides the fact that my Asterisk setup only has US sound files in
/var/lib/asterisk/sounds/digits/, I was wondering how to get Asterisk
to read back the number the French way, ie. digits are read by pairs
to the exception of the leading tuple that always starts with 0.

For instance, a landline number in Paris like 01 42 92 81 00 is read
"zero-one, forty-two, ninety-two, eighty-one, zero-zero", where I
assume Americans would read all the digits individually ("zero, one,
four, two, etc.")

Has someone already looked into this and knows how to solve it?

Thank you.




More information about the asterisk-users mailing list