On Tue, 08 Mar 2011 13:22:18 +0100, Gilles <codecompl...@free.fr> wrote: >I need to write a script which prompts the callee to type a number, >and then read it back to them as confirmation:
Apparently, the right way to read a phone number back to the user is not to use SayNumber() (which might be OK for US-style reading) but rather Playback(<prefix>:<number>,say), which will then rely on say.conf For instance: ======= extensions.conf exten => 2222,1,Set(NBR2CALL=0142928100) ;exten => 2222,n,SayNumber(${NBR2CALL}) exten => 2222,n,Playback(phone:${NBR2CALL},say) ======= Using this almost works: ======= say.conf _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} ======= The remaining problem is when a couple starts with a zero, eg. 01 (should be read "zero one"): In this case, Asterisk ignores the leading zero and simply pronounces the second digit ("one") Does someone know of a trick so that the pattern handles couples that have a leading zero? Thank you. -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users