From Mungo Eider, 4 Years ago, written in Plain Text.
- view diff
Embed
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <include>
  3.   <context name="one">
  4.  
  5.     <extension name="unloop">
  6.       <condition field="${unroll_loops}" expression="^true$"/>
  7.       <condition field="${sip_looped_call}" expression="^true$">
  8.               <action application="deflect" data="${destination_number}"/>
  9.       </condition>
  10.     </extension>
  11.  
  12.  
  13.     <extension name="global" continue="true">
  14.       <condition field="${call_debug}" expression="^true$" break="never">
  15.               <action application="info"/>
  16.       </condition>
  17.  
  18.       <condition field="${rtp_has_crypto}" expression="^($${rtp_sdes_suites})$" break="never">
  19.             <action application="set" data="rtp_secure_media=true"/>
  20.       </condition>
  21.  
  22.       <condition field="${endpoint_disposition}" expression="^(DELAYED NEGOTIATION)"/>
  23.       <condition field="${switch_r_sdp}" expression="(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)" break="never">
  24.             <action application="set" data="rtp_secure_media=true"/>
  25.       </condition>
  26.  
  27.       <condition>
  28.         <action application="hash" data="insert/${one}-spymap/${caller_id_number}/${uuid}"/>
  29.         <action application="hash" data="insert/${one}-last_dial/${caller_id_number}/${destination_number}"/>
  30.         <action application="hash" data="insert/${one}-last_dial/global/${uuid}"/>
  31.         <action application="export" data="RFC2822_DATE=${strftime(%a, %d %b %Y %T %z)}"/>
  32.       </condition>
  33.     </extension>
  34.  
  35.     <extension name="Local_Extension">
  36.       <condition field="destination_number" expression="^([8|9][0-2][0-9])$">
  37.         <action application="export" data="dialed_extension=$1"/>
  38.         <action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/>
  39.         <action application="bind_meta_app" data="2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
  40.         <action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/>
  41.         <action application="bind_meta_app" data="4 b s execute_extension::att_xfer XML features"/>
  42.         <action application="set" data="ringback=${us-ring}"/>
  43.         <action application="set" data="transfer_ringback=$${hold_music}"/>
  44.         <action application="set" data="call_timeout=30"/>
  45.         <action application="set" data="hangup_after_bridge=true"/>
  46.         <action application="set" data="continue_on_fail=true"/>
  47.         <action application="hash" data="insert/${one}-call_return/${dialed_extension}/${caller_id_number}"/>
  48.         <action application="hash" data="insert/${one}-last_dial_ext/${dialed_extension}/${uuid}"/>
  49.         <action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${one} var callgroup)}"/>
  50.         <action application="hash" data="insert/${one}-last_dial_ext/${called_party_callgroup}/${uuid}"/>
  51.         <action application="hash" data="insert/${one}-last_dial_ext/global/${uuid}"/>
  52.         <action application="hash" data="insert/${one}-last_dial/${called_party_callgroup}/${uuid}"/>
  53.         <action application="bridge" data="user/${dialed_extension}@${one}"/>
  54.         <action application="answer"/>
  55.         <action application="sleep" data="1000"/>
  56.         <action application="bridge" data="loopback/app=voicemail:default ${one} ${dialed_extension}"/>
  57.       </condition>
  58.     </extension>
  59.  
  60.  
  61.      <extension name="sip_uri">
  62.       <condition field="destination_number" expression="^sip:(.*)$">
  63.             <action application="bridge" data="sofia/${use_profile}/$1"/>
  64.       </condition>
  65.     </extension>
  66.  
  67.     <X-PRE-PROCESS cmd="include" data="one/*.xml"/>
  68.  
  69.     <extension name="acknowledge_call">
  70.       <condition field="destination_number" expression="^(.*)$">
  71.         <action application="acknowledge_call"/>
  72.         <action application="ring_ready"/>
  73.         <action application="playback" data="$${hold_music}"/>
  74.       </condition>
  75.     </extension>
  76.  
  77.   </context>
  78. </include>