使用default_language
1: phrase
2:say
===================
Controls the default language the Say Phrase engine will use when no language is explicitly specified in the API call. This permits you to easily support multiple languages by only changing a single variable at call time.
1: phrasephrase <macro_name>,<data>
<action application="phrase" data="timespec,12:45:15"/>
http://wiki.freeswitch.org/wiki/Speech_Phrase_Management
<macro name="custom_count">
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="custom/you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="custom/$2.wav"/>
</match>
</input>
</macro>
2.say
3:
streamFile
4:获取数字
destnum = session:playAndGetDigits(3, 20, 3, 5000, "#*", "phrase:getnum", "phrase:error", "\\d+")
<min> <max> <tries> <timeout> <terminators> <file> <invalid_file> <var_name> <regexp> <digit_timeout>
On exit, there may be some useful values in channel variables
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_play_and_get_digits