[asterisk-users] [1.4] Reading phone number the French way?
Gilles
codecomplete at free.fr
Thu Mar 10 06:38:44 CST 2011
On Thu, 10 Mar 2011 13:18:41 +0100, Dave Cotton
<dcotton at linuxautrement.com> wrote:
>Look at the GotoIf statement for example
Thanks Dave for the tip, but I found that I needed to change a pattern
that was already in say.conf:
=======
[fr](date-base,digit-base) ;BAD _[n]um:0. => num:${SAY:1}
_[n]um:0X => num:${SAY:0:1}, num:${SAY:1:1}
...
;regular phone numbers : landlines and cellphones
;_pho[n]e:0[1-9]XXXXXXXX => num:${SAY:0:1}, num:${SAY:1:1},
num:${SAY:2:2}, num:${SAY:4:2}, num:${SAY:6:2}, num:${SAY:8:2}
=======
If I got it right, the way say.conf works, is that it reads the whole
say.conf to make a list of the different patterns. Then, when reading
a prefix+number, it reads the patterns on the right side and tries to
find if it furthers matches another pattern.
In the example above, "_[n]um:0X" will match "num:${SAY:6:2}", which
will read the two digits as expected, ie. without ignoring a leading
zero.
Thank you.
More information about the asterisk-users
mailing list