[Freeswitch-users] freeswitch International country codes regular expression in lua script

Snabel Kabiya snabel at lexifone.com
Mon Mar 31 21:36:57 MSD 2014


Hi All,

when i use this regular expression in my lua script to validate the number
i get.

    local number = session:playAndGetDigits(0,    20,   1,      tryTimeOut,
"#", promptFile, errorFile,
"^\+(1|2[1-689]\d|2[07]|3[0-469]|3[578]\d|4[0-13-9]|42\d|5[09]\d|5[1-8]|6[0-6]|6[7-9]\d|7|8[035789]\d|8[1246]|9[0-58]|9[679]\d)(\d+)")
    playAndGetDigits does not recognize # as terminator

   - terminators = digits used to end input if less than <max> digits have
   been pressed. (Typically '#')

example when i Dial this number followed by the pound key: 972525777777#
the method plays the error file.

Thanks,
Snabel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140331/f148d9dc/attachment.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list