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

Gilles codecomplete at free.fr
Wed Mar 9 07:45:50 CST 2011


On Tue, 08 Mar 2011 07:47:39 EST, kenner at gnat.com (Richard Kenner)
wrote:
>Maybe something like:
>
>exten => s,n,SayDigits(${NBR2CALL:0:1})
>exten => s,n,SayNumber(${NBR2CALL:2:2})
>exten => s,n,SayNumber(${NBR2CALL:4:2})
>exten => s,n,SayNumber(${NBR2CALL:6:2})
>exten => s,n,SayNumber(${NBR2CALL:8:2})
>
>Or make changes in say.conf.

Thanks for the great tip.

Adding the FR sound files and say.conf, and making sure zapata.conf
and sip.conf set the right language sort of worked: Using the trick
above, Asterisk does read the number correctly, expect that in case a
tuple is "00", it only says "zero" instead of "zero-zero", and when
using "01" it just says "one" instead of "zero-one". I guess Asterisk
ignores leading zeros:

============
;... eighty-one,zero
exten => 3333,1,Set(NBR2CALL=0142928100)

exten => 3333,n,SayDigits(${NBR2CALL:0:1})
exten => 3333,n,SayDigits(${NBR2CALL:1:1})
exten => 3333,n,SayNumber(${NBR2CALL:2:2})
exten => 3333,n,SayNumber(${NBR2CALL:4:2})
exten => 3333,n,SayNumber(${NBR2CALL:6:2})
exten => 3333,n,SayNumber(${NBR2CALL:8:2})

;... eighty-one,one
;exten => 3333,n,Set(NBR2CALL=0142928101)

exten => 3333,n,SayDigits(${NBR2CALL:0:1})
exten => 3333,n,SayDigits(${NBR2CALL:1:1})
exten => 3333,n,SayNumber(${NBR2CALL:2:2})
exten => 3333,n,SayNumber(${NBR2CALL:4:2})
exten => 3333,n,SayNumber(${NBR2CALL:6:2})
exten => 3333,n,SayNumber(${NBR2CALL:8:2})

exten => 3333,n,Playback(demo-thanks)

exten => 3333,n,Hangup
============

Actually, removing say.conf and restarting Asterisk doesn't seem to
have an impact: Does Asterisk really use say.conf, and does it add
features that could solve this issue?

Thank you.




More information about the asterisk-users mailing list