<include>
<X-PRE-PROCESS cmd="set" data="AT_EPENT1=0 0 0 -1 -1 0 -1 0 -1 -1 0 -1"/>
<X-PRE-PROCESS cmd="set" data="AT_EPENT2=1 1 1 -1 -1 1 -1 1 -1 -1 1 -1"/>
<X-PRE-PROCESS cmd="set" data="AT_CPENT1=0 -1 -1 0 -1 0 0 0 -1 -1 0 -1"/>
<X-PRE-PROCESS cmd="set" data="AT_CPENT2=1 -1 -1 1 -1 1 1 1 -1 -1 1 -1"/>
<X-PRE-PROCESS cmd="set" data="AT_CMAJ1=0 -1 0 0 -1 0 -1 0 0 -1 0 -1"/>
<X-PRE-PROCESS cmd="set" data="AT_CMAJ2=1 -1 1 1 -1 1 -1 1 1 -1 1 -1"/>
<X-PRE-PROCESS cmd="set" data="AT_BBLUES=1 -1 1 -1 -1 1 -1 1 1 1 -1 -1"/>
<X-PRE-PROCESS cmd="set" data="ATGPENT2=-1 1 -1 1 -1 1 -1 -1 1 -1 1 -1"/>
<extension name="101">
<condition field="destination_number" expression="^101$">
<!-- AUTOTALENT DEFAULTS -->
<!--
<action application="set" data="AT_TUNE=440"/>
<action application="set" data="AT_FIXED=0"/>
<action application="set" data="AT_PULL=0"/>
<action application="set" data="AT_A=0"/>
<action application="set" data="AT_Bb=-1"/>
<action application="set" data="AT_B=0"/>
<action application="set" data="AT_C=0"/>
<action application="set" data="AT_Db=-1"/>
<action application="set" data="AT_D=0"/>
<action application="set" data="AT_Eb=-1"/>
<action application="set" data="AT_E=0"/>
<action application="set" data="AT_F=0"/>
<action application="set" data="AT_Gb=-1"/>
<action application="set" data="AT_G=0"/>
<action application="set" data="AT_Ab=-1"/>
<action application="set" data="AT_AMOUNT=1"/>
<action application="set" data="AT_SMOOTH=0"/>
<action application="set" data="AT_SHIFT=0"/>
<action application="set" data="AT_OUTSCALE=0"/>
<action application="set" data="AT_LFODEPTH=0"/>
<action application="set" data="AT_LFORATE=5"/>
<action application="set" data="AT_LFOSHAPE=0"/>
<action application="set" data="AT_LFOSYMM=0"/>
<action application="set" data="AT_LFOQUANT=0"/>
<action application="set" data="AT_FCORR=0"/>
<action application="set" data="AT_FWARP=0"/>
<action application="set" data="AT_MIX=1"/>
-->
<action application="set" data="AT_TUNE=440"/>
<action application="set" data="AT_FIXED=0"/>
<action application="set" data="AT_PULL=0"/>
<action application="set" data="AT_AMOUNT=1"/>
<action application="set" data="AT_SMOOTH=0"/>
<action application="set" data="AT_SHIFT=1"/>
<action application="set" data="AT_OUTSCALE=0"/>
<action application="set" data="AT_LFODEPTH=0"/>
<action application="set" data="AT_LFORATE=5"/>
<action application="set" data="AT_LFOSHAPE=0"/>
<action application="set" data="AT_LFOSYMM=0"/>
<action application="set" data="AT_LFOQUANT=0"/>
<action application="set" data="AT_FCORR=0"/>
<action application="set" data="AT_FWARP=0"/>
<action application="set" data="AT_MIX=1"/>
<!-- you have to download the ladspa package and the desired plugins from their desired site -->
<action application="set"><![CDATA[ladspa_params=${AT_TUNE} ${AT_FIXED} ${AT_PULL} ${AT_EPENT2} ${AT_AMOUNT} ${AT_SMOOTH} ${AT_SHIFT} ${AT_OUTSCALE} ${AT_LFODEPTH} ${AT_LFORATE} ${AT_LFOSHAPE} ${AT_LFOSYMM} ${AT_LFOQUANT} ${AT_FCORR} ${AT_FWARP} ${AT_MIX}]]></action>
<action application="ladspa_run" data="r|autotalent||${ladspa_params}"/>
<action application="ladspa_run" data="r|tap_chorusflanger||"/>
<action application="ladspa_run" data="r|phasers_1217.so|autoPhaser|"/>
<action application="bridge" data="sofia/internal/888@conference.freeswitch.org"/>
</condition>
</extension>
</include>
<include>
<extension name="pizza_demo">
<condition field="destination_number" expression="^(pizza|74992)$"/>
<condition field="${module_exists(mod_v8)}" expression="true"/>
<condition field="${module_exists(mod_pocketsphinx)}" expression="true">
<action application="javascript" data="ps_pizza.js"/>
</condition>
</extension>
</include>
<include>
<extension name="local.example.com">
<condition field="${toll_allow}" expression="local"/>
<condition field="destination_number" expression="^(\d{7})$">
<action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
<action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
<action application="bridge" data="sofia/gateway/${default_gateway}/1${default_areacode}$1"/>
</condition>
</extension>
<extension name="domestic.example.com">
<condition field="${toll_allow}" expression="domestic"/>
<condition field="destination_number" expression="^(\d{11})$">
<action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
<action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
<action application="bridge" data="sofia/gateway/${default_gateway}/$1"/>
</condition>
</extension>
<extension name="international.example.com">
<condition field="${toll_allow}" expression="international"/>
<condition field="destination_number" expression="^(011\d+)$">
<action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
<action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
<action application="bridge" data="sofia/gateway/${default_gateway}/$1"/>
</condition>
</extension>
</include>
<include>
<extension name="Talking Clock Time" ><!--e.g. 10:56pm-->
<condition field="destination_number" expression="^9170$">
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="say" data="en CURRENT_TIME pronounced
${strepoch()}"/>
<action application="hangup"/>
</condition>
</extension>
<extension name="Talking Clock Date" ><!--e.g. March 8, 2011-->
<condition field="destination_number" expression="^9171$">
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="say" data="en CURRENT_DATE pronounced
${strepoch()}"/>
<action application="hangup"/>
</condition>
</extension>
<extension name="Talking Clock Date and Time" ><!--e.g. March 8, 2011
10:56pm-->
<condition field="destination_number" expression="^9172$">
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="say" data="en CURRENT_DATE_TIME pronounced
${strepoch()}"/>
<action application="hangup"/>
</condition>
</extension>
</include>
<include>
<!--
用于自动外呼
-->
<extension name="smartivr_autodialeer">
<condition field="destination_number" expression="^(19.*)$">
<action application="set" data="media_bug_answer_req=true"/>
<action application="export" data="RECORD_STEREO=false"/>
<action application="set" data="record_file=/var/smartivr/uploads/record/${strftime(%Y-%m-%d)}/${uuid}.wav"/>
<action application="record_session" data="${record_file}"/>
<action application="wait_for_answer"/>
<!--
检测到忙音自动挂断
-->
<action application="tone_detect" data="busy 450 r 0 hangup 'normal_clearing' 3"/>
<action application="set" data="apiurl=http://121.41.44.9/api/smartivr/IVREntery"/>
<!--
使用自动外呼模块设置flow等于任务ID
-->
<action application="set" data="flowid=${autodialer_task}"/>
<action application="socket" data="127.0.0.1:8040 async full" />
</condition>
</extension>
<!--
用于呼入
-->
<extension name="smartivr_calin">
<condition field="destination_number" expression="^(9999.*)$">
<action application="answer"/>
<action application="set" data="apiurl=http://121.41.44.9/smartivr1.php"/>
<action application="set" data="flowid=$1"/>
<action application="export" data="RECORD_STEREO=false"/>
<action application="set" data="record_file=$${recordings_dir}/${strftime(%Y-%m-%d)}/${caller_id_number}.$1.${strftime
(%H-%M-%S)}.${uuid}.wav"/>
<action application="record_session" data="${record_file}"/>
<action application="socket" data="127.0.0.1:8040 async full" />
</condition>
</extension>
</include>