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

Tony Mountifield tony at softins.co.uk
Thu Mar 10 09:10:19 CST 2011


In article <elnhn616qu3tcfss2lmfn6jhtn57q3f2ar at 4ax.com>,
Gilles <codecomplete at free.fr> wrote:
> On Thu, 10 Mar 2011 14:37:45 +0100, Gilles <codecomplete at free.fr>
> wrote:
> >I figured out how extensions.conf and say.conf work and posted my
> >results in the reply to Dave.
> 
> Noticed something strange, though: 0800123456 is played OK (ie.
> 0.800.12.34.56) , but 092123456 is played digit by digit (0.8.9.2,
> etc.):
> 
> ========== say.conf
> 
> ;1-9
> _[n]um:X => digits/${SAY}
> 
> ;10-99
> _[n]um:1X => digits/${SAY}
> _[n]um:[2-9]0 =>  digits/${SAY}
> _[n]um:[2-6]1 => digits/${SAY:0:1}0, vm-and, digits/${SAY:1}
> _[n]um:71 => digits/60, vm-and, num:1${SAY:1}
> _[n]um:7X => digits/60, num:1${SAY:1}
> _[n]um:9X => digits/80, num:1${SAY:1}
> _[n]um:[2-9][1-9] =>  digits/${SAY:0:1}0, num:${SAY:1}
> 
> ;100-999
> _[n]um:100 => digits/hundred
> _[n]um:1XX => digits/hundred, num:${SAY:1}
> _[n]um:[2-9]00 => num:${SAY:0:1}, digits/hundred
> _[n]um:[2-9]XX => num:${SAY:0:1}, digits/hundred, num:${SAY:1}
> 
> ;0800XXXXXX -> 0899XXXXXX
> ;_pho[n]e:08XXXXXXXX => num:${SAY:0:1}, num:${SAY:1:3},
> num:${SAY:4:2}, num:${SAY:6:2}, num:${SAY:8:2}
> 
> ========== CLI
> 
> -- Executing [2222 at internal:4] Playback("SIP/xlite-02a56004",
> "phone:0810009032|say") in new stack
> -- <SIP/xlite-02a56004> Playing 'digits/0' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/8' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/hundred' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/10' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/0' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/0' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/90' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/30' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/2' (language 'fr')
> 
> -- Executing [2222 at internal:6] Playback("SIP/xlite-02a56004",
> "phone:0892123456}|say") in new stack
^^^^^^^^^^^^^^^^^^^^^^^^^
> -- <SIP/xlite-02a56004> Playing 'digits/0' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/8' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/9' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/2' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/1' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/2' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/3' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/4' (language 'fr')
> -- <SIP/xlite-02a56004> Playing 'digits/5' (language 'fr')
> -- Executing [2222 at internal:7] Hangup("SIP/xlite-02a56004", "") in new
> stack

You have a spurious } after 0892123456 which is preventing it
from matching the pattern in say.conf

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list