<% local viewtable, viewlibrary, pageinfo, session = ... %>
<% if viewtable and not viewtable.errtxt then %>
Content-Type: Content Type: text/xml

<document type="freeswitch/xml">
  <section name="dialplan">
    <context name="default">
    
      <extension name="unloop">
        <condition field="${unroll_loops}" expression="^true$"/>
        <condition field="${sip_looped_call}" expression="^true$">
	  <action application="deflect" data="${destination_number}"/>
        </condition>
      </extension>

      <extension name="global" continue="true">
        <condition field="${call_debug}" expression="^true$" break="never">
	  <action application="info"/>
        </condition>
      </extension>

      <extension name="Voicemail">
        <condition expression="(.*)" field="destination_number">
	  <action application="answer" />
	  <action application="sleep" data="1000" />
	  <action application="voicemail" data="default <%= viewtable.value.domain.value %> $1" />
	</condition>
      </extension>

    </context>
  </section>
</document>
<% end %>
