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

Danny Nicholas danny at debsinc.com
Thu Mar 10 08:49:43 CST 2011


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Gilles
Sent: Thursday, March 10, 2011 8:39 AM
To: asterisk-users at lists.digium.com
Subject: Re: [asterisk-users] [1.4] Reading phone number the French way?

On Thu, 10 Mar 2011 08:34:51 -0600, "Danny Nicholas"
<danny at debsinc.com> wrote:
>========== 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
>========== 

>This one is easy.  You have a specific pattern to match 0800.  092 has no
>pattern and therefore defaults back to an "Asterisk Standard Playback".

Sorry, it was a typo: I did mean numbers starting with "0800" or
"0892". Those are the FR equivalent of 1.800 numbers in the US.

Going through the patterns above, it should use the same patterns for
either numbers, but for some reason, fails for 0892 :-/

BTW, is there a way to enable say.conf debugging in the CLI, so I
could check which patterns it goes through to analyze a number?

Thank you.

Thought that was too easy...  "sip set debug peer" is probably going to be
your best bet for say.conf debugging.  If you do "sip set debug peer 2222"
as opposed to "core set debug 10", you are getting "nodal debugging" as
opposed to "general debugging".




More information about the asterisk-users mailing list