Skip to main content

Dial by name directory

About

dial_by_name_directory.js is a refactor of the original dial by name script, scripts/aadir.js

Click here to expand Table of Contents

Concept

The script prompts the caller to enter the user they are trying to reach, last name/first name. The caller enters letters until a unique match is made, then the user is transferred to that user.

Installation

  • Since this is a javascript app, mod_spidermonkey must be configured and enabled.
  • Copy dial_by_name_directory.js to ${freeswitch_base_dir}/scripts
  • copy dial_by_name_directory.xml to somewhere ${freeswitch_base_dir}/conf/lang/en, and ensure the directory it is in gets included by en.xml

Usage

From the dialplan:

<extension name="dial_by_name">
<condition field="destination_number" expression="^6000$">
<action application="javascript" data="dial_by_name_directory.js" />
</condition>
</extension>

or, from an IVR:

<entry action="menu-exec-app" digits="9" param="javascript dial_by_name_directory.js"/>