Variable auto hunt

From FreeSWITCH Wiki
Jump to: navigation, search

auto_hunt

Setting auto_hunt to "true" will alter the normal sequential processing of dialplan extensions. auto_hunt will cause the dialplan to 'jump' to a specific extension name, not processing any other extension. The destination_number and extension name must be the same in order for this to work. The condition must still match, but the extension name is the operative element.

In the example below, there is no way to reach extension 333 without auto_hunt.

Usage: In vars.xml:

<X-PRE-PROCESS cmd="set" data="auto_hunt=true"/>

Example:

<extension name="do_xfer">
  <condition field="destination_number" expression="^.*$">
    <action application="set" data="auto_hunt=true"/>
    <action application="transfer" data="333"/>
  </condition>
</extension>

<extension name="333">
  <condition field="destination_number" expression="^333$">
    <action application="info"/>
  </condition>
</extension>


See also:

Implemented By:

Module Name Source FileLast Revised
mod_dialplan_xmlmod_dialplan_xml.c 12144