O'Reilly logo

Asterisk: The Future of Telephony by Leif Madsen, Jared Smith, Jim Van Meggelen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Directory() — Provides a dialable directory of extensions

Synopsis

    Directory(vm-context[,dial-context[,options]])

Presents users with a directory of extensions from which they may select by name. The list of names and extensions is discovered from voicemail.conf. The vm-context argument is required; it specifies the context of voicemail.conf to use.

The dial-context argument is the context to use for dialing the users, and it defaults to vm-context if unspecified. Currently, the only option that can be specified in the options argument is f, which causes the directory to match based on the first name in voicemail.conf instead of the last name.

If the user enters 0 (zero) and there exists an extension o (the lowercase letter o) in the current context, the call control will go to that extension. Entering * will exit similarly, but to the a extension, much like Voicemail()’s behavior.

Returns 0 unless the user hangs up.

               exten => *,1,Directory(default,incoming)
    exten => #,1,Directory(default,incoming,f)

See Also

voicemail.conf

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required