From Joshua Young, 7 Years ago, written in Plain Text.
- view diff
Embed
  1. THIS IS "playback.xml"
  2.  
  3. <include>
  4.   <extension name="Playback WAV file">
  5.     <condition field="destination_number" expression="^(123456)$">
  6.       <action application="answer"/>
  7.       <action application="sleep" data="1000"/>
  8.       <action application="playback" data="$${recordings_dir}/2017-05-08-18-42-04_5fbe805b-b1ab-476b-b126-c9358d1821\
  9. 56.mp4"/>
  10.     </condition>
  11.   </extension>
  12. </include>
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21. FROM "diaplan/default.xml"
  22.  
  23.  
  24.     <extension name="Local_Extension">
  25.       <condition field="destination_number" expression="^(10[01][0-9])$">
  26.         <action application="export" data="dialed_extension=$1"/>
  27.         <!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> -->
  28.         <action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/>
  29.         <action application="bind_meta_app" data="2 b s record_session::$${recordings_dir}/${caller_id_number}.${str\
  30. ftime(%Y-%m-%d-%H-%M-%S)}.mp4"/>
  31.         <action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/>
  32.         <action application="bind_meta_app" data="4 b s execute_extension::att_xfer XML features"/>
  33.         <action application="set" data="ringback=${us-ring}"/>
  34.         <action application="set" data="transfer_ringback=$${hold_music}"/>
  35.         <action application="set" data="call_timeout=30"/>
  36.         <!-- <action application="set" data="sip_exclude_contact=${network_addr}"/> -->
  37.         <action application="set" data="hangup_after_bridge=true"/>
  38.         <!--<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO\
  39. _ROUTE_DESTINATION"/> -->
  40.         <action application="set" data="continue_on_fail=true"/>
  41.         <action application="hash" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/\
  42. >
  43.         <action application="hash" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/>
  44.         <action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var ca\
  45. llgroup)}"/>
  46.         <action application="hash" data="insert/${domain_name}-last_dial_ext/${called_party_callgroup}/${uuid}"/>
  47.         <action application="hash" data="insert/${domain_name}-last_dial_ext/global/${uuid}"/>
  48.         <!--<action application="export" data="nolocal:rtp_secure_media=${user_data(${dialed_extension}@${domain_nam\
  49. e} var rtp_secure_media)}"/>-->
  50.         <action application="hash" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/>
  51.         <action application="set" data="record_file_name=$${recordings_dir}/${strftime(%Y-%m-%d-%H-%M-%S)}_${uuid}.m\
  52. p4" inline="true"/>
  53.         <action application="record_session" data="${record_file_name}"/>
  54.         <action application="bridge" data="user/${dialed_extension}@${domain_name}"/>
  55.         <action application="answer"/>
  56.         <action application="sleep" data="1000"/>
  57.         <action application="bridge" data="loopback/app=voicemail:default ${domain_name} ${dialed_extension}"/>
  58.       </condition>
  59.     </extension>
  60.  
  61.