From xxx, 6 Months ago, written in XML.
- go back
Embed
Viewing differences between and xxx
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <!--
  4.  
  5.    NOTICE:
  6.  
  7.  
  8.  
  9.    This context is usually accessed via authenticated callers on the sip profile on port 5060
  10.  
  11.    or transfered callers from the public context which arrived via the sip profile on port 5080.
  12.  
  13.  
  14.  
  15.    Authenticated users will use the user_context variable on the user to determine what context
  16.  
  17.    they can access.  You can also add a user in the directory with the cidr= attribute acl.conf.xml
  18.  
  19.    will build the domains ACL using this value.
  20.  
  21. -->
  22.  
  23. <!-- http://wiki.freeswitch.org/wiki/Dialplan_XML -->
  24.  
  25. <include>
  26.  
  27.   <context name="default">
  28.  
  29.  
  30.  
  31.     <extension name="unloop">
  32.  
  33.       <condition field="${unroll_loops}" expression="^true$"/>
  34.  
  35.       <condition field="${sip_looped_call}" expression="^true$">
  36.  
  37.            <action application="deflect" data="${destination_number}"/>
  38.  
  39.       </condition>
  40.  
  41.     </extension>
  42.  
  43.  
  44.  
  45.     <!-- Example of doing things based on time of day.
  46.  
  47.  
  48.  
  49.           year = 4 digit year. Example year="2009"
  50.  
  51.           yday = 1-365
  52.  
  53.           mon = 1-12
  54.  
  55.           mday = 1-31
  56.  
  57.           week = 1-52
  58.  
  59.           mweek= 1-6
  60.  
  61.           wday = 1-7
  62.  
  63.           hour = 0-23
  64.  
  65.           minute = 0-59
  66.  
  67.           minute-of-day = 1-1440
  68.  
  69.  
  70.  
  71.           Example:
  72.  
  73.           <condition minute-of-day="540-1080"> (9am to 6pm EVERY day)
  74.  
  75.           do something ...
  76.  
  77.           </condition>
  78.  
  79.    -->
  80.  
  81.     <extension name="tod_example" continue="true">
  82.  
  83.       <condition wday="1-7" hour="0-23">
  84.  
  85.            <action application="set" data="open=true"/>
  86.  
  87.       </condition>
  88.  
  89.     </extension>
  90.  
  91.  
  92.  
  93.     <!-- Example of routing based on holidays
  94.  
  95.  
  96.  
  97.           This example covers all US Federal holidays except for inauguration day.
  98.  
  99.    -->
  100.  
  101.  
  102.  
  103.     <extension name="holiday_example" continue="true">
  104.  
  105.       <condition mday="1" mon="1">
  106.  
  107.            <!-- new year's day -->
  108.  
  109.            <action application="set" data="open=false"/>
  110.  
  111.       </condition>
  112.  
  113.       <condition wday="2" mweek="3" mon="1">
  114.  
  115.            <!-- martin luther king day is the 3rd monday in january -->
  116.  
  117.            <action application="set" data="open=false"/>
  118.  
  119.       </condition>
  120.  
  121.       <condition wday="2" mweek="3" mon="2">
  122.  
  123.            <!-- president's day is the 3rd monday in february -->
  124.  
  125.            <action application="set" data="open=false"/>
  126.  
  127.       </condition>
  128.  
  129.            <action application="set" data="open=false"/>
  130.  
  131.       </condition>
  132.  
  133.       <condition mday="4" mon="7">
  134.  
  135.            <!-- independence day -->
  136.  
  137.            <action application="set" data="open=false"/>
  138.  
  139.       </condition>
  140.  
  141.       <condition wday="2" mday="1-7" mon="9">
  142.  
  143.            <!-- labor day is the 1st monday in september (the only monday between the 1st and the 7th) -->
  144.  
  145.            <action application="set" data="open=false"/>
  146.  
  147.       </condition>
  148.  
  149.       <condition wday="2" mweek="2" mon="10">
  150.  
  151.            <!-- columbus day is the 2nd monday in october -->
  152.  
  153.            <action application="set" data="open=false"/>
  154.  
  155.       </condition>
  156.  
  157.       <condition mday="11" mon="11">
  158.  
  159.            <!-- veteran's day -->
  160.  
  161.            <action application="set" data="open=false"/>
  162.  
  163.       </condition>
  164.  
  165.       <condition wday="5-6" mweek="4" mon="11">
  166.  
  167.            <!-- thanksgiving is the 4th thursday in november and usually there's an extension for black friday -->
  168.  
  169.            <action application="set" data="open=false"/>
  170.  
  171.       </condition>
  172.  
  173.       <condition mday="25" mon="12">
  174.  
  175.            <!-- Christmas -->
  176.  
  177.            <action application="set" data="open=false"/>
  178.  
  179.       </condition>
  180.  
  181.     </extension>
  182.  
  183.  
  184.  
  185.     <extension name="global-intercept">
  186.  
  187.       <condition field="destination_number" expression="^886$">
  188.  
  189.            <action application="answer"/>
  190.  
  191.            <action application="intercept" data="${hash(select/${domain_name}-last_dial_ext/global)}"/>
  192.  
  193.            <action application="sleep" data="2000"/>
  194.  
  195.       </condition>
  196.  
  197.     </extension>
  198.  
  199.  
  200.  
  201.     <extension name="group-intercept">
  202.  
  203.       <condition field="destination_number" expression="^\*8$">
  204.  
  205.            <action application="answer"/>
  206.  
  207.            <action application="intercept" data="${hash(select/${domain_name}-last_dial_ext/${callgroup})}"/>
  208.  
  209.            <action application="sleep" data="2000"/>
  210.  
  211.       </condition>
  212.  
  213.     </extension>
  214.  
  215.  
  216.  
  217.     <extension name="intercept-ext">
  218.  
  219.       <condition field="destination_number" expression="^\*\*(\d+)$">
  220.  
  221.            <action application="answer"/>
  222.  
  223.            <action application="intercept" data="${hash(select/${domain_name}-last_dial_ext/$1)}"/>
  224.  
  225.            <action application="sleep" data="2000"/>
  226.  
  227.       </condition>
  228.  
  229.     </extension>
  230.  
  231.  
  232.  
  233.     <extension name="redial">
  234.  
  235.       <condition field="destination_number" expression="^(redial|870)$">
  236.  
  237.            <action application="transfer" data="${hash(select/${domain_name}-last_dial/${caller_id_number})}"/>
  238.  
  239.       </condition>
  240.  
  241.     </extension>
  242.  
  243.  
  244.  
  245.     <extension name="global" continue="true">
  246.  
  247.       <condition field="${call_debug}" expression="^true$" break="never">
  248.  
  249.            <action application="info"/>
  250.  
  251.       </condition>
  252.  
  253.  
  254.  
  255.       <condition field="${default_password}" expression="^1234$" break="never">
  256.  
  257.            <action application="log" data="CRIT WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING "/>
  258.  
  259.            <action application="log" data="CRIT Open $${conf_dir}/vars.xml and change the default_password."/>
  260.  
  261.            <action application="log" data="CRIT Once changed type 'reloadxml' at the console."/>
  262.  
  263.            <action application="log" data="CRIT WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING "/>
  264.  
  265.            <action application="sleep" data="500"/>
  266.  
  267.       </condition>
  268.  
  269.       <!--
  270.  
  271.             This is an example of how to auto detect if telephone-event is missing and activate inband detection
  272.  
  273.      -->
  274.  
  275.       <!--
  276.  
  277.      <condition field="${switch_r_sdp}" expression="a=rtpmap:(\d+)\stelephone-event/8000" break="never">
  278.  
  279.           <action application="set" data="rtp_payload_number=$1"/>
  280.  
  281.           <anti-action application="start_dtmf"/>
  282.  
  283.      </condition>
  284.  
  285.      -->
  286.  
  287.       <condition field="${rtp_has_crypto}" expression="^($${rtp_sdes_suites})$" break="never">
  288.  
  289.            <action application="set" data="rtp_secure_media=true"/>
  290.  
  291.            <!-- Offer SRTP on outbound legs if we have it on inbound. -->
  292.  
  293.            <!-- <action application="export" data="rtp_secure_media=true"/> -->
  294.  
  295.       </condition>
  296.  
  297.  
  298.  
  299.       <!--
  300.  
  301.           Since we have inbound-late-negotation on by default now the
  302.  
  303.           above behavior isn't the same so you have to do one extra step.
  304.  
  305.           -->
  306.  
  307.       <condition field="${endpoint_disposition}" expression="^(DELAYED NEGOTIATION)"/>
  308.  
  309.       <condition field="${switch_r_sdp}" expression="(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)" break="never">
  310.  
  311.            <action application="set" data="rtp_secure_media=true"/>
  312.  
  313.            <!-- Offer SRTP on outbound legs if we have it on inbound. -->
  314.  
  315.            <!-- <action application="export" data="rtp_secure_media=true"/> -->
  316.  
  317.       </condition>
  318.  
  319.  
  320.  
  321.  
  322.  
  323.       <condition>
  324.  
  325.            <action application="hash" data="insert/${domain_name}-spymap/${caller_id_number}/${uuid}"/>
  326.  
  327.            <action application="hash" data="insert/${domain_name}-last_dial/${caller_id_number}/${destination_number}"/>
  328.  
  329.            <action application="hash" data="insert/${domain_name}-last_dial/global/${uuid}"/>
  330.  
  331.            <action application="export" data="RFC2822_DATE=${strftime(%a, %d %b %Y %T %z)}"/>
  332.  
  333.       </condition>
  334.  
  335.     </extension>
  336.  
  337.  
  338.  
  339.     <!-- If sip_req_host is not a local domain then this has to be an external sip uri -->
  340.  
  341.     <!--
  342.  
  343.    <extension name="external_sip_uri" continue="true">
  344.  
  345.      <condition field="source" expression="mod_sofia"/>
  346.  
  347.      <condition field="${outside_call}" expression="^$"/>
  348.  
  349.      <condition field="${domain_exists(${sip_req_host})}" expression="true">
  350.  
  351.           <anti-action application="bridge" data="sofia/${use_profile}/${sip_to_uri}"/>
  352.  
  353.      </condition>
  354.  
  355.    </extension>
  356.  
  357.    -->
  358.  
  359.     <!--
  360.  
  361.           Snom button demo, call 9000 to make button 2 mapped to transfer the current call to a conference
  362.  
  363.    -->
  364.  
  365.  
  366.  
  367.     <extension name="snom-demo-2">
  368.  
  369.       <condition field="destination_number" expression="^9001$">
  370.  
  371.            <action application="eval" data="${snom_bind_key(2 off DND ${sip_from_user} ${sip_from_host} ${sofia_profile_name} message notused)}"/>
  372.  
  373.            <action application="transfer" data="3000"/>
  374.  
  375.       </condition>
  376.  
  377.     </extension>
  378.  
  379.  
  380.  
  381.     <extension name="snom-demo-1">
  382.  
  383.       <condition field="destination_number" expression="^9000$">
  384.  
  385.            <!--<key> <light> <label> <user> <host> <profile> <action_name> <action>-->
  386.  
  387.            <action application="eval" data="${snom_bind_key(2 on DND ${sip_from_user} ${sip_from_host} ${sofia_profile_name} message api+uuid_transfer ${uuid} 9001)}"/>
  388.  
  389.            <action application="playback" data="$${hold_music}"/>
  390.  
  391.       </condition>
  392.  
  393.     </extension>
  394.  
  395.  
  396.  
  397.     <extension name="eavesdrop">
  398.  
  399.       <condition field="destination_number" expression="^88(\d{4})$|^\*0(.*)$">
  400.  
  401.            <action application="answer"/>
  402.  
  403.            <action application="eavesdrop" data="${hash(select/${domain_name}-spymap/$1$2)}"/>
  404.  
  405.       </condition>
  406.  
  407.     </extension>
  408.  
  409.  
  410.  
  411.     <extension name="eavesdrop">
  412.  
  413.       <condition field="destination_number" expression="^779$">
  414.  
  415.            <action application="answer"/>
  416.  
  417.            <action application="set" data="eavesdrop_indicate_failed=tone_stream://%(500, 0, 320)"/>
  418.  
  419.            <action application="set" data="eavesdrop_indicate_new=tone_stream://%(500, 0, 620)"/>
  420.  
  421.            <action application="set" data="eavesdrop_indicate_idle=tone_stream://%(250, 0, 920)"/>
  422.  
  423.            <action application="eavesdrop" data="all"/>
  424.  
  425.       </condition>
  426.  
  427.     </extension>
  428.  
  429.  
  430.  
  431.     <extension name="call_return">
  432.  
  433.       <condition field="destination_number" expression="^\*69$|^869$|^lcr$">
  434.  
  435.            <action application="transfer" data="${hash(select/${domain_name}-call_return/${caller_id_number})}"/>
  436.  
  437.       </condition>
  438.  
  439.     </extension>
  440.  
  441.  
  442.  
  443.     <extension name="del-group">
  444.  
  445.       <condition field="destination_number" expression="^80(\d{2})$">
  446.  
  447.            <action application="answer"/>
  448.  
  449.            <action application="group" data="delete:$1@${domain_name}:${sofia_contact(${sip_from_user}@${domain_name})}"/>
  450.  
  451.            <action application="gentones" data="%(1000, 0, 320)"/>
  452.  
  453.       </condition>
  454.  
  455.     </extension>
  456.  
  457.  
  458.  
  459.     <extension name="add-group">
  460.  
  461.       <condition field="destination_number" expression="^81(\d{2})$">
  462.  
  463.            <action application="answer"/>
  464.  
  465.            <action application="group" data="insert:$1@${domain_name}:${sofia_contact(${sip_from_user}@${domain_name})}"/>
  466.  
  467.            <action application="gentones" data="%(1000, 0, 640)"/>
  468.  
  469.       </condition>
  470.  
  471.     </extension>
  472.  
  473.  
  474.  
  475.     <extension name="call-group-simo">
  476.  
  477.       <condition field="destination_number" expression="^82(\d{2})$">
  478.  
  479.            <action application="bridge" data="{leg_timeout=15,ignore_early_media=true}${group(call:$1@${domain_name})}"/>
  480.  
  481.       </condition>
  482.  
  483.     </extension>
  484.  
  485.  
  486.  
  487.     <extension name="call-group-order">
  488.  
  489.       <condition field="destination_number" expression="^83(\d{2})$">
  490.  
  491.            <action application="bridge" data="{leg_timeout=15,ignore_early_media=true}${group(call:$1@${domain_name}:order)}"/>
  492.  
  493.       </condition>
  494.  
  495.     </extension>
  496.  
  497.  
  498.  
  499.     <extension name="extension-intercom">
  500.  
  501.       <condition field="destination_number" expression="^8(10[01][0-9])$">
  502.  
  503.            <action application="set" data="dialed_extension=$1"/>
  504.  
  505.            <action application="export" data="sip_auto_answer=true"/>
  506.  
  507.            <action application="bridge" data="user/${dialed_extension}@${domain_name}"/>
  508.  
  509.       </condition>
  510.  
  511.     </extension>
  512.  
  513.  
  514.  
  515.     <!--
  516.  
  517.           dial the extension (1000-1019) for 30 seconds and go to voicemail if the
  518.  
  519.           call fails (continue_on_fail=true), otherwise hang up after a successful
  520.  
  521.           bridge (hangup_after_bridge=true)
  522.  
  523.    -->
  524.  
  525.     <extension name="Local_Extension">
  526.  
  527.       <condition field="destination_number" expression="^(10[01][0-9])$">
  528.  
  529.            <action application="export" data="dialed_extension=$1"/>
  530.  
  531.            <!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> -->
  532.  
  533.            <action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/>
  534.  
  535.            <action application="bind_meta_app" data="2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
  536.  
  537.            <action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/>
  538.  
  539.            <action application="bind_meta_app" data="4 b s execute_extension::att_xfer XML features"/>
  540.  
  541.            <action application="set" data="ringback=${us-ring}"/>
  542.  
  543.            <action application="set" data="transfer_ringback=$${hold_music}"/>
  544.  
  545.            <action application="set" data="call_timeout=30"/>
  546.  
  547.            <!-- <action application="set" data="sip_exclude_contact=${network_addr}"/> -->
  548.  
  549.            <action application="set" data="hangup_after_bridge=true"/>
  550.  
  551.            <!--<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION"/> -->
  552.  
  553.            <action application="set" data="continue_on_fail=true"/>
  554.  
  555.            <action application="hash" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/>
  556.  
  557.            <action application="hash" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/>
  558.  
  559.            <action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}"/>
  560.  
  561.            <action application="hash" data="insert/${domain_name}-last_dial_ext/${called_party_callgroup}/${uuid}"/>
  562.  
  563.            <action application="hash" data="insert/${domain_name}-last_dial_ext/global/${uuid}"/>
  564.  
  565.            <!--<action application="export" data="nolocal:rtp_secure_media=${user_data(${dialed_extension}@${domain_name} var rtp_secure_media)}"/>-->
  566.  
  567.            <action application="hash" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/>
  568.  
  569.            <action application="bridge" data="user/${dialed_extension}@${domain_name}"/>
  570.  
  571.            <action application="answer"/>
  572.  
  573.            <action application="sleep" data="1000"/>
  574.  
  575.            <action application="bridge" data="loopback/app=voicemail:default ${domain_name} ${dialed_extension}"/>
  576.  
  577.       </condition>
  578.  
  579.     </extension>
  580.  
  581.  
  582.  
  583.     <extension name="Local_Extension_Skinny">
  584.  
  585.       <condition field="destination_number" expression="^(11[01][0-9])$">
  586.  
  587.            <action application="set" data="dialed_extension=$1"/>
  588.  
  589.            <action application="export" data="dialed_extension=$1"/>
  590.  
  591.            <action application="set" data="call_timeout=30"/>
  592.  
  593.            <action application="set" data="hangup_after_bridge=true"/>
  594.  
  595.            <action application="set" data="continue_on_fail=true"/>
  596.  
  597.         <action application="bridge" data="skinny/internal/${destination_number}"/>
  598.  
  599.            <action application="answer"/>
  600.  
  601.            <action application="sleep" data="1000"/>
  602.  
  603.            <action application="bridge" data="loopback/app=voicemail:default ${domain_name} ${dialed_extension}"/>
  604.  
  605.       </condition>
  606.  
  607.     </extension>
  608.  
  609.  
  610.  
  611.     <extension name="group_dial_sales">
  612.  
  613.       <condition field="destination_number" expression="^2000$">
  614.  
  615.            <action application="bridge" data="${group_call(sales@${domain_name})}"/>
  616.  
  617.       </condition>
  618.  
  619.     </extension>
  620.  
  621.  
  622.  
  623.     <extension name="group_dial_support">
  624.  
  625.       <condition field="destination_number" expression="^2001$">
  626.  
  627.            <action application="bridge" data="group/support@${domain_name}"/>
  628.  
  629.       </condition>
  630.  
  631.     </extension>
  632.  
  633.  
  634.  
  635.     <extension name="group_dial_billing">
  636.  
  637.       <condition field="destination_number" expression="^2002$">
  638.  
  639.            <action application="bridge" data="group/billing@${domain_name}"/>
  640.  
  641.       </condition>
  642.  
  643.     </extension>
  644.  
  645.  
  646.  
  647.     <!-- voicemail operator extension -->
  648.  
  649.     <extension name="operator">
  650.  
  651.       <condition field="destination_number" expression="^(operator|0)$">
  652.  
  653.            <action application="set" data="transfer_ringback=$${hold_music}"/>
  654.  
  655.            <action application="transfer" data="1000 XML features"/>
  656.  
  657.       </condition>
  658.  
  659.     </extension>
  660.  
  661.  
  662.  
  663.     <!-- voicemail main extension -->
  664.  
  665.     <extension name="vmain">
  666.  
  667.       <condition field="destination_number" expression="^vmain$|^4000$|^\*98$">
  668.  
  669.            <action application="answer"/>
  670.  
  671.            <action application="sleep" data="1000"/>
  672.  
  673.            <action application="voicemail" data="check default ${domain_name}"/>
  674.  
  675.       </condition>
  676.  
  677.     </extension>
  678.  
  679.  
  680.  
  681.     <!--
  682.  
  683.           This extension is used by mod_portaudio so you can pa call sip:someone@example.com
  684.  
  685.           mod_portaudio will pass the entire string to the dialplan for routing.
  686.  
  687.    -->
  688.  
  689.     <extension name="sip_uri">
  690.  
  691.       <condition field="destination_number" expression="^sip:(.*)$">
  692.  
  693.            <action application="bridge" data="sofia/${use_profile}/$1"/>
  694.  
  695.       </condition>
  696.  
  697.     </extension>
  698.  
  699.  
  700.  
  701.     <!--
  702.  
  703.           start a dynamic conference with the settings of the "default" conference profile in conference.conf.xml
  704.  
  705.    -->
  706.  
  707.     <extension name="nb_conferences">
  708.  
  709.       <condition field="destination_number" expression="^(30\d{2})$">
  710.  
  711.            <action application="answer"/>
  712.  
  713.            <action application="conference" data="$1-${domain_name}@default"/>
  714.  
  715.       </condition>
  716.  
  717.     </extension>
  718.  
  719.  
  720.  
  721.     <extension name="wb_conferences">
  722.  
  723.       <condition field="destination_number" expression="^(31\d{2})$">
  724.  
  725.            <action application="answer"/>
  726.  
  727.            <action application="conference" data="$1-${domain_name}@wideband"/>
  728.  
  729.       </condition>
  730.  
  731.     </extension>
  732.  
  733.  
  734.  
  735.     <extension name="uwb_conferences">
  736.  
  737.       <condition field="destination_number" expression="^(32\d{2})$">
  738.  
  739.            <action application="answer"/>
  740.  
  741.            <action application="conference" data="$1-${domain_name}@ultrawideband"/>
  742.  
  743.       </condition>
  744.  
  745.     </extension>
  746.  
  747.     <!-- MONO 48kHz conferences -->
  748.  
  749.     <extension name="cdquality_conferences">
  750.  
  751.       <condition field="destination_number" expression="^(33\d{2})$">
  752.  
  753.            <action application="answer"/>
  754.  
  755.            <action application="conference" data="$1-${domain_name}@cdquality"/>
  756.  
  757.       </condition>
  758.  
  759.     </extension>
  760.  
  761.  
  762.  
  763.     <!-- STEREO 48kHz conferences / Video MCU -->
  764.  
  765.     <extension name="cdquality_stereo_conferences">
  766.  
  767.       <condition field="destination_number" expression="^(35\d{2}).*?-screen$">
  768.  
  769.            <action application="answer"/>
  770.  
  771.            <action application="send_display" data="FreeSWITCH Conference|$1"/>
  772.  
  773.            <action application="set" data="conference_member_flags=join-vid-floor"/>
  774.  
  775.            <action application="conference" data="$1@video-mcu-stereo"/>
  776.  
  777.       </condition>
  778.  
  779.     </extension>
  780.  
  781.  
  782.  
  783.     <extension name="conference-canvases" continue="true">
  784.  
  785.       <condition field="destination_number" expression="(35\d{2})-canvas-(\d+)">
  786.  
  787.            <action application="push" data="conference_member_flags=second-screen"/>
  788.  
  789.            <action application="set" data="video_initial_watching_canvas=$2"/>
  790.  
  791.            <action application="transfer" data="$1"/>
  792.  
  793.       </condition>
  794.  
  795.     </extension>
  796.  
  797.  
  798.  
  799.     <extension name="conf mod">
  800.  
  801.       <condition field="destination_number" expression="^6070-moderator$">
  802.  
  803.            <action application="answer"/>
  804.  
  805.            <action application="set" data="conference_member_flags=moderator"/>
  806.  
  807.            <action application="conference" data="$1-${domain_name}@video-mcu-stereo"/>
  808.  
  809.       </condition>
  810.  
  811.     </extension>
  812.  
  813.  
  814.  
  815.     <extension name="cdquality_conferences">
  816.  
  817.       <condition field="destination_number" expression="^(35\d{2})$">
  818.  
  819.            <action application="answer"/>
  820.  
  821.            <action application="conference" data="$1@video-mcu-stereo"/>
  822.  
  823.       </condition>
  824.  
  825.     </extension>
  826.  
  827.  
  828.  
  829.     <extension name="cdquality_conferences_720">
  830.  
  831.       <condition field="destination_number" expression="^(36\d{2})$">
  832.  
  833.            <action application="answer"/>
  834.  
  835.            <action application="conference" data="$1@video-mcu-stereo-720"/>
  836.  
  837.       </condition>
  838.  
  839.     </extension>
  840.  
  841.  
  842.  
  843.     <extension name="cdquality_conferences_480">
  844.  
  845.       <condition field="destination_number" expression="^(37\d{2})$">
  846.  
  847.            <action application="answer"/>
  848.  
  849.            <action application="conference" data="$1@video-mcu-stereo-480"/>
  850.  
  851.       </condition>
  852.  
  853.     </extension>
  854.  
  855.  
  856.  
  857.     <extension name="cdquality_conferences_320">
  858.  
  859.       <condition field="destination_number" expression="^(38\d{2})$">
  860.  
  861.            <action application="answer"/>
  862.  
  863.            <action application="conference" data="$1@video-mcu-stereo-320"/>
  864.  
  865.       </condition>
  866.  
  867.     </extension>
  868.  
  869.  
  870.  
  871.     <!-- dial the FreeSWITCH conference via SIP-->
  872.  
  873.     <extension name="freeswitch_public_conf_via_sip">
  874.  
  875.       <condition field="destination_number" expression="^9(888|8888|1616|3232)$">
  876.  
  877.            <action application="export" data="hold_music=silence"/>
  878.  
  879.            <!--
  880.  
  881.                This will take the SAS from the b-leg and send it to the display on the a-leg phone.
  882.  
  883.                Known working with Polycom and Snom maybe others.
  884.  
  885.           -->
  886.  
  887.            <action application="bridge" data=sofia/${use_profile}/$1@conference.freeswitch.org/>
  888.  
  889.       </condition>
  890.  
  891.     </extension>
  892.  
  893.  
  894.  
  895.     <!--
  896.  
  897.           This extension will start a conference and invite a group.
  898.  
  899.           At anytime the participant can dial *2 to bridge directly to the boss.
  900.  
  901.           All other callers are then hung up on.
  902.  
  903.    -->
  904.  
  905.     <extension name="mad_boss_intercom">
  906.  
  907.       <condition field="destination_number" expression="^0911$">
  908.  
  909.            <action application="set" data="conference_auto_outcall_caller_id_name=Mad Boss1"/>
  910.  
  911.            <action application="set" data="conference_auto_outcall_caller_id_number=0911"/>
  912.  
  913.            <action application="set" data="conference_auto_outcall_timeout=60"/>
  914.  
  915.            <action application="set" data="conference_utils_auto_outcall_flags=mute"/>
  916.  
  917.            <action application="set" data="conference_auto_outcall_prefix={sip_auto_answer=true,execute_on_answer='bind_meta_app 2 a s1 transfer::intercept:${uuid} inline'}"/>
  918.  
  919.            <action application="set" data="sip_exclude_contact=${network_addr}"/>
  920.  
  921.            <action application="conference_set_auto_outcall" data="${group_call(sales)}"/>
  922.  
  923.            <action application="conference" data="madboss_intercom1@default+flags{endconf|deaf}"/>
  924.  
  925.       </condition>
  926.  
  927.     </extension>
  928.  
  929.  
  930.  
  931.     <!--
  932.  
  933.           This extension will start a conference and invite a few of people.
  934.  
  935.           At anytime the participant can dial *2 to bridge directly to the boss.
  936.  
  937.           All other callers are then hung up on.
  938.  
  939.    -->
  940.  
  941.     <extension name="mad_boss_intercom">
  942.  
  943.       <condition field="destination_number" expression="^0912$">
  944.  
  945.            <action application="set" data="conference_auto_outcall_caller_id_name=Mad Boss2"/>
  946.  
  947.            <action application="set" data="conference_auto_outcall_caller_id_number=0912"/>
  948.  
  949.            <action application="set" data="conference_auto_outcall_timeout=60"/>
  950.  
  951.            <action application="set" data="conference_utils_auto_outcall_flags=mute"/>
  952.  
  953.            <action application="set" data="conference_auto_outcall_prefix={sip_auto_answer=true,execute_on_answer='bind_meta_app 2 a s1 transfer::intercept:${uuid} inline'}"/>
  954.  
  955.            <action application="set" data="sip_exclude_contact=${network_addr}"/>
  956.  
  957.            <action application="conference_set_auto_outcall" data="loopback/9664"/>
  958.  
  959.            <action application="conference" data="madboss_intercom2@default+flags{endconf|deaf}"/>
  960.  
  961.       </condition>
  962.  
  963.     </extension>
  964.  
  965.  
  966.  
  967.     <!--This extension will start a conference and invite several people upon entering -->
  968.  
  969.     <extension name="mad_boss">
  970.  
  971.       <condition field="destination_number" expression="^0913$">
  972.  
  973.            <!--These params effect the outcalls made once you join-->
  974.  
  975.            <action application="set" data="conference_auto_outcall_caller_id_name=Mad Boss"/>
  976.  
  977.            <action application="set" data="conference_auto_outcall_caller_id_number=0911"/>
  978.  
  979.            <action application="set" data="conference_auto_outcall_timeout=60"/>
  980.  
  981.            <action application="set" data="conference_utils_auto_outcall_flags=none"/>
  982.  
  983.            <!--<action application="set" data="conference_auto_outcall_announce=say:You have been called into an emergency conference"/>-->
  984.  
  985.            <!--Add as many of these as you need, These are the people you are going to call-->
  986.  
  987.            <action application="conference_set_auto_outcall" data="loopback/9664"/>
  988.  
  989.            <action application="conference" data="madboss3@default"/>
  990.  
  991.       </condition>
  992.  
  993.     </extension>
  994.  
  995.  
  996.  
  997.     <!-- a sample IVR  -->
  998.  
  999.     <extension name="ivr_demo">
  1000.  
  1001.       <condition field="destination_number" expression="^5000$">
  1002.  
  1003.         <action application="answer"/>
  1004.  
  1005.         <action application="sleep" data="2000"/>
  1006.  
  1007.            <action application="ivr" data="demo_ivr"/>
  1008.  
  1009.       </condition>
  1010.  
  1011.     </extension>
  1012.  
  1013.  
  1014.  
  1015.     <!-- Create a conference on the fly and pull someone in at the same time. -->
  1016.  
  1017.     <extension name="dynamic_conference">
  1018.  
  1019.       <condition field="destination_number" expression="^5001$">
  1020.  
  1021.            <action application="conference" data="bridge:mydynaconf:sofia/${use_profile}/1234@conference.freeswitch.org"/>
  1022.  
  1023.       </condition>
  1024.  
  1025.     </extension>
  1026.  
  1027.  
  1028.  
  1029.     <extension name="rtp_multicast_page">
  1030.  
  1031.       <condition field="destination_number" expression="^pagegroup$|^7243$">
  1032.  
  1033.            <action application="answer"/>
  1034.  
  1035.            <action application="esf_page_group"/>
  1036.  
  1037.       </condition>
  1038.  
  1039.     </extension>
  1040.  
  1041.  
  1042.  
  1043.     <!--
  1044.  
  1045.           Parking extensions... transferring calls to 5900 will park them in a queue.
  1046.  
  1047.    -->
  1048.  
  1049.     <extension name="park">
  1050.  
  1051.       <condition field="destination_number" expression="^5900$">
  1052.  
  1053.            <action application="set" data="fifo_music=$${hold_music}"/>
  1054.  
  1055.            <action application="fifo" data="5900@${domain_name} in"/>
  1056.  
  1057.       </condition>
  1058.  
  1059.     </extension>
  1060.  
  1061.  
  1062.  
  1063.     <!--
  1064.  
  1065.           Parking pickup extension.  Calling 5901 will pickup the call.
  1066.  
  1067.    -->
  1068.  
  1069.     <extension name="unpark">
  1070.  
  1071.       <condition field="destination_number" expression="^5901$">
  1072.  
  1073.            <action application="answer"/>
  1074.  
  1075.            <action application="fifo" data="5900@${domain_name} out nowait"/>
  1076.  
  1077.       </condition>
  1078.  
  1079.     </extension>
  1080.  
  1081.  
  1082.  
  1083.     <!--
  1084.  
  1085.           Valet park retrieval, works with valet_park extension below.
  1086.  
  1087.           Retrieve a valet parked call by dialing 6000 + park number + #
  1088.  
  1089.    -->
  1090.  
  1091.     <extension name="valet_park">
  1092.  
  1093.       <condition field="destination_number" expression="^(6000)$">
  1094.  
  1095.            <action application="answer"/>
  1096.  
  1097.            <action application="valet_park" data="valet_parking_lot ask 1 11 10000 ivr/ivr-enter_ext_pound.wav"/>
  1098.  
  1099.       </condition>
  1100.  
  1101.     </extension>
  1102.  
  1103.  
  1104.  
  1105.     <!--
  1106.  
  1107.           Valet park 6001-6099.  Blind x-fer to 6001, 6002, etc. to valet park the call.
  1108.  
  1109.           Dial 6001, 6002, etc. to retrieve a call that is already valet parked.
  1110.  
  1111.           After call is retrieved, park extension is free for another call.
  1112.  
  1113.    -->
  1114.  
  1115.     <extension name="valet_park">
  1116.  
  1117.       <condition field="destination_number" expression="^((?!6000)60\d{2})$">
  1118.  
  1119.            <action application="answer"/>
  1120.  
  1121.            <action application="valet_park" data="valet_parking_lot $1"/>
  1122.  
  1123.       </condition>
  1124.  
  1125.     </extension>
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.     <!--
  1132.  
  1133.           This extension is used with Snom phones.
  1134.  
  1135.  
  1136.  
  1137.           Set a function key to park+lot (lot being a number or name.)
  1138.  
  1139.           Set type to Park+Orbit.  You can then park and pickup using
  1140.  
  1141.           the softkey on the phone.  Should work with other phones.
  1142.  
  1143.    -->
  1144.  
  1145.     <extension name="park">
  1146.  
  1147.       <condition field="source" expression="mod_sofia"/>
  1148.  
  1149.       <condition field="destination_number" expression="park\+(\d+)">
  1150.  
  1151.            <action application="fifo" data="$1@${domain_name} in undef $${hold_music}"/>
  1152.  
  1153.       </condition>
  1154.  
  1155.     </extension>
  1156.  
  1157.     <!--
  1158.  
  1159.           The extension is parking pickup with a to param of the fifo we are calling
  1160.  
  1161.           Some phones send things like orbit= and you can extract that info.
  1162.  
  1163.    -->
  1164.  
  1165.     <extension name="unpark">
  1166.  
  1167.       <condition field="source" expression="mod_sofia"/>
  1168.  
  1169.       <condition field="destination_number" expression="^parking$"/>
  1170.  
  1171.       <condition field="${sip_to_params}" expression="fifo\=(\d+)">
  1172.  
  1173.            <action application="answer"/>
  1174.  
  1175.            <action application="fifo" data="$1@${domain_name} out nowait"/>
  1176.  
  1177.       </condition>
  1178.  
  1179.     </extension>
  1180.  
  1181.  
  1182.  
  1183.     <!--
  1184.  
  1185.       This extension is used with Linksys phones.
  1186.  
  1187.  
  1188.  
  1189.       Set a Phone tab option Call Park Serv to yes. You can park and
  1190.  
  1191.       pickup using soft keys "park" and "unpark" found during
  1192.  
  1193.       active call when moving navigation button. The other option
  1194.  
  1195.       is to use phone's star codes (defaults to *38 and *39).
  1196.  
  1197.    -->
  1198.  
  1199.     <extension name="park">
  1200.  
  1201.       <condition field="source" expression="mod_sofia"/>
  1202.  
  1203.       <condition field="destination_number" expression="callpark"/>
  1204.  
  1205.       <condition field="${sip_refer_to}">
  1206.  
  1207.            <expression><![CDATA[sip:callpark@${domain_name};orbit=(\d+)]]></expression>
  1208.  
  1209.            <action application="fifo" data="$1@${domain_name} in undef $${hold_music}"/>
  1210.  
  1211.       </condition>
  1212.  
  1213.     </extension>
  1214.  
  1215.  
  1216.  
  1217.     <!--
  1218.  
  1219.       This extension is used with Linksys phones.
  1220.  
  1221.  
  1222.  
  1223.       The extension is parking pickup with a to param of the fifo
  1224.  
  1225.       we are calling. Linksys sends orbit=<parkingslotnumber>
  1226.  
  1227.       and we extract that info.
  1228.  
  1229.    -->
  1230.  
  1231.     <extension name="unpark">
  1232.  
  1233.       <condition field="source" expression="mod_sofia"/>
  1234.  
  1235.       <condition field="destination_number" expression="pickup"/>
  1236.  
  1237.       <condition field="${sip_to_params}" expression="orbit\=(\d+)">
  1238.  
  1239.            <action application="answer"/>
  1240.  
  1241.            <action application="fifo" data="$1@${domain_name} out nowait"/>
  1242.  
  1243.        </condition>
  1244.  
  1245.     </extension>
  1246.  
  1247.  
  1248.  
  1249.     <!--
  1250.  
  1251.           Here are some examples of how to override the ringback heard by the
  1252.  
  1253.           far end.  You have two variables that you can use to override this.
  1254.  
  1255.  
  1256.  
  1257.           ringback          - used when a call isn't answered. (early media)
  1258.  
  1259.           transfer_ringback - used when the call is already answered. (post answer)
  1260.  
  1261.    -->
  1262.  
  1263.  
  1264.  
  1265.     <!-- Demonstration of how to override the ringback in various situations -->
  1266.  
  1267.     <extension name="wait">
  1268.  
  1269.       <condition field="destination_number" expression="^wait$">
  1270.  
  1271.            <action application="pre_answer"/>
  1272.  
  1273.            <action application="sleep" data="20000"/>
  1274.  
  1275.            <action application="answer"/>
  1276.  
  1277.            <action application="sleep" data="1000"/>
  1278.  
  1279.            <action application="playback" data="voicemail/vm-goodbye.wav"/>
  1280.  
  1281.            <action application="hangup"/>
  1282.  
  1283.       </condition>
  1284.  
  1285.     </extension>
  1286.  
  1287.  
  1288.  
  1289.     <extension name="fax_receive">
  1290.  
  1291.       <condition field="destination_number" expression="^9178$">
  1292.  
  1293.            <action application="answer" />
  1294.  
  1295.            <action application="playback" data="silence_stream://2000"/>
  1296.  
  1297.            <action application="rxfax" data="$${temp_dir}/rxfax.tif"/>
  1298.  
  1299.            <action application="hangup"/>
  1300.  
  1301.       </condition>
  1302.  
  1303.     </extension>
  1304.  
  1305.  
  1306.  
  1307.     <extension name="fax_transmit">
  1308.  
  1309.       <condition field="destination_number" expression="^9179$">
  1310.  
  1311.            <action application="txfax" data="$${temp_dir}/txfax.tif"/>
  1312.  
  1313.            <action application="hangup"/>
  1314.  
  1315.       </condition>
  1316.  
  1317.     </extension>
  1318.  
  1319.  
  1320.  
  1321.     <!-- Send a 180 and let the far end generate ringback. -->
  1322.  
  1323.     <extension name="ringback_180">
  1324.  
  1325.       <condition field="destination_number" expression="^9180$">
  1326.  
  1327.            <action application="ring_ready"/>
  1328.  
  1329.            <action application="sleep" data="20000"/>
  1330.  
  1331.            <action application="answer"/>
  1332.  
  1333.            <action application="sleep" data="1000"/>
  1334.  
  1335.            <action application="playback" data="voicemail/vm-goodbye.wav"/>
  1336.  
  1337.            <action application="hangup"/>
  1338.  
  1339.       </condition>
  1340.  
  1341.     </extension>
  1342.  
  1343.  
  1344.  
  1345.     <!-- Send a 183 and send uk-ring as the ringtone. (early media) -->
  1346.  
  1347.     <extension name="ringback_183_uk_ring">
  1348.  
  1349.       <condition field="destination_number" expression="^9181$">
  1350.  
  1351.            <action application="set" data="ringback=$${uk-ring}"/>
  1352.  
  1353.            <action application="bridge" data="{ignore_early_media=true}loopback/wait"/>
  1354.  
  1355.       </condition>
  1356.  
  1357.     </extension>
  1358.  
  1359.  
  1360.  
  1361.     <!-- Send a 183 and use music as the ringtone. (early media) -->
  1362.  
  1363.     <extension name="ringback_183_music_ring">
  1364.  
  1365.       <condition field="destination_number" expression="^9182$">
  1366.  
  1367.            <action application="set" data="ringback=$${hold_music}"/>
  1368.  
  1369.            <action application="bridge" data="{ignore_early_media=true}loopback/wait"/>
  1370.  
  1371.       </condition>
  1372.  
  1373.     </extension>
  1374.  
  1375.  
  1376.  
  1377.     <!-- Answer the call and use music as the ringtone. (post answer) -->
  1378.  
  1379.     <extension name="ringback_post_answer_uk_ring">
  1380.  
  1381.       <condition field="destination_number" expression="^9183$">
  1382.  
  1383.            <action application="set" data="transfer_ringback=$${uk-ring}"/>
  1384.  
  1385.            <action application="answer"/>
  1386.  
  1387.            <action application="bridge" data="{ignore_early_media=true}loopback/wait"/>
  1388.  
  1389.       </condition>
  1390.  
  1391.     </extension>
  1392.  
  1393.  
  1394.  
  1395.     <!-- Answer the call and use music as the ringtone. (post answer) -->
  1396.  
  1397.     <extension name="ringback_post_answer_music">
  1398.  
  1399.       <condition field="destination_number" expression="^9184$">
  1400.  
  1401.            <action application="set" data="transfer_ringback=$${hold_music}"/>
  1402.  
  1403.            <action application="answer"/>
  1404.  
  1405.            <action application="bridge" data="{ignore_early_media=true}loopback/wait"/>
  1406.  
  1407.       </condition>
  1408.  
  1409.     </extension>
  1410.  
  1411.  
  1412.  
  1413.     <extension name="ClueCon">
  1414.  
  1415.       <condition field="destination_number" expression="^9191$">
  1416.  
  1417.         <action application="set" data="effective_caller_id_name=ClueCon IVR"/>
  1418.  
  1419.         <action application="bridge" data=sofia/$${domain}/2000@bkw.org/>
  1420.  
  1421.       </condition>
  1422.  
  1423.     </extension>
  1424.  
  1425.  
  1426.  
  1427.     <extension name="show_info">
  1428.  
  1429.       <condition field="destination_number" expression="^9192$">
  1430.  
  1431.            <action application="answer"/>
  1432.  
  1433.            <action application="info"/>
  1434.  
  1435.            <action application="sleep" data="250"/>
  1436.  
  1437.            <action application="hangup"/>
  1438.  
  1439.       </condition>
  1440.  
  1441.     </extension>
  1442.  
  1443.  
  1444.  
  1445.     <extension name="video_record">
  1446.  
  1447.       <condition field="destination_number" expression="^9193$">
  1448.  
  1449.            <action application="answer"/>
  1450.  
  1451.            <action application="record_fsv" data="$${temp_dir}/testrecord.fsv"/>
  1452.  
  1453.       </condition>
  1454.  
  1455.     </extension>
  1456.  
  1457.  
  1458.  
  1459.     <extension name="video_playback">
  1460.  
  1461.       <condition field="destination_number" expression="^9194$">
  1462.  
  1463.            <action application="answer"/>
  1464.  
  1465.            <action application="play_fsv" data="$${temp_dir}/testrecord.fsv"/>
  1466.  
  1467.       </condition>
  1468.  
  1469.     </extension>
  1470.  
  1471.  
  1472.  
  1473.     <extension name="delay_echo">
  1474.  
  1475.       <condition field="destination_number" expression="^9195$">
  1476.  
  1477.            <action application="answer"/>
  1478.  
  1479.            <action application="delay_echo" data="5000"/>
  1480.  
  1481.       </condition>
  1482.  
  1483.     </extension>
  1484.  
  1485.  
  1486.  
  1487.     <extension name="echo">
  1488.  
  1489.       <condition field="destination_number" expression="^9196$">
  1490.  
  1491.            <action application="answer"/>
  1492.  
  1493.            <action application="echo"/>
  1494.  
  1495.       </condition>
  1496.  
  1497.     </extension>
  1498.  
  1499.  
  1500.  
  1501.     <extension name="milliwatt">
  1502.  
  1503.       <condition field="destination_number" expression="^9197$">
  1504.  
  1505.            <action application="answer"/>
  1506.  
  1507.            <action application="playback" data="{loops=-1}tone_stream://%(251,0,1004)"/>
  1508.  
  1509.       </condition>
  1510.  
  1511.     </extension>
  1512.  
  1513.  
  1514.  
  1515.     <extension name="tone_stream">
  1516.  
  1517.       <condition field="destination_number" expression="^9198$">
  1518.  
  1519.            <action application="answer"/>
  1520.  
  1521.            <action application="playback" data="{loops=10}tone_stream://path=${conf_dir}/tetris.ttml"/>
  1522.  
  1523.       </condition>
  1524.  
  1525.     </extension>
  1526.  
  1527.  
  1528.  
  1529.     <!--
  1530.  
  1531.           You will no longer hear the bong tone.  The wav file is playing stating the call is secure.
  1532.  
  1533.           The file will not play unless you have both TLS and SRTP active.
  1534.  
  1535.    -->
  1536.  
  1537.  
  1538.  
  1539.     <extension name="hold_music">
  1540.  
  1541.       <condition field="destination_number" expression="^9664$"/>
  1542.  
  1543.       <condition field="${rtp_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$">
  1544.  
  1545.            <action application="answer"/>
  1546.  
  1547.            <action application="execute_extension" data="is_secure XML features"/>
  1548.  
  1549.            <action application="playback" data="$${hold_music}"/>
  1550.  
  1551.            <anti-action application="answer"/>
  1552.  
  1553.            <anti-action application="playback" data="silence_stream://2000"/>
  1554.  
  1555.            <anti-action application="playback" data="$${hold_music}"/>
  1556.  
  1557.       </condition>
  1558.  
  1559.     </extension>
  1560.  
  1561.  
  1562.  
  1563.     <extension name="laugh break">
  1564.  
  1565.       <condition field="destination_number" expression="^9386$">
  1566.  
  1567.         <action application="answer"/>
  1568.  
  1569.         <action application="sleep" data="1500"/>
  1570.  
  1571.         <action application="playback" data="phrase:funny_prompts"/>
  1572.  
  1573.         <action application="hangup"/>
  1574.  
  1575.       </condition>
  1576.  
  1577.     </extension>
  1578.  
  1579.  
  1580.  
  1581.     <!--
  1582.  
  1583.           You can place files in the default directory to get included.
  1584.  
  1585.    -->
  1586.  
  1587.     <X-PRE-PROCESS cmd="include" data="default/*.xml"/>
  1588.  
  1589.  
  1590.  
  1591.     <!--
  1592.  
  1593.    <extension name="refer">
  1594.  
  1595.      <condition field="${sip_refer_to}">
  1596.  
  1597.           <expression><![CDATA[sip:${destination_number}@${domain_name}]]></expression>
  1598.  
  1599.      </condition>
  1600.  
  1601.      <condition field="${sip_refer_to}">
  1602.  
  1603.           <expression><![CDATA[sip:(.*)@(.*)]]></expression>
  1604.  
  1605.           <action application="set" data="refer_user=$1"/>
  1606.  
  1607.           <action application="set" data="refer_domain=$2"/>
  1608.  
  1609.           <action application="info"/>
  1610.  
  1611.           <action application="bridge" data="sofia/${use_profile}/${refer_user}@${refer_domain}"/>
  1612.  
  1613.      </condition>
  1614.  
  1615.    </extension>
  1616.  
  1617.    -->
  1618.  
  1619.     <!--
  1620.  
  1621.           This is an example of how to override the RURI on an outgoing invite to a registered contact.
  1622.  
  1623.    -->
  1624.  
  1625.     <!--
  1626.  
  1627.    <extension name="ruri">
  1628.  
  1629.      <condition field="destination_number" expression="^ruri$">
  1630.  
  1631.           <action application="bridge" data="sofia/${ruri_profile}/${ruri_user}${regex(${sofia_contact(${ruri_contact})}|^[^\@]+(.*)|%1)}"/>
  1632.  
  1633.      </condition>
  1634.  
  1635.    </extension>
  1636.  
  1637.  
  1638.  
  1639.    <extension name="7004">
  1640.  
  1641.      <condition field="destination_number" expression="^7004$">
  1642.  
  1643.           <action application="set" data="ruri_profile=default"/>
  1644.  
  1645.           <action application="set" data="ruri_user=2000"/>
  1646.  
  1647.           <action application="set" data="ruri_contact=1001@${domain_name}"/>
  1648.  
  1649.           <action application="execute_extension" data="ruri"/>
  1650.  
  1651.      </condition>
  1652.  
  1653.    </extension>
  1654.  
  1655.    -->
  1656.  
  1657.  
  1658.  
  1659.     <extension name="enum">
  1660.  
  1661.       <condition field="${module_exists(mod_enum)}" expression="true"/>
  1662.  
  1663.       <condition field="destination_number" expression="^(.*)$">
  1664.  
  1665.            <action application="transfer" data="$1 enum"/>
  1666.  
  1667.       </condition>
  1668.  
  1669.     </extension>
  1670.  
  1671.  
  1672.  
  1673.     <extension name="acknowledge_call">
  1674.  
  1675.       <condition field="destination_number" expression="^(.*)$">
  1676.  
  1677.            <action application="acknowledge_call"/>
  1678.  
  1679.            <action application="ring_ready"/>
  1680.  
  1681.            <action application="playback" data="$${hold_music}"/>
  1682.  
  1683.       </condition>
  1684.  
  1685.     </extension>
  1686.  
  1687.  
  1688.  
  1689.   </context>
  1690.  
  1691. </include>