Skip to main content

Dial by name directory


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


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.


  • 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


From the dialplan:

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

or, from an IVR:

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