Summary:ASTERISK-03116: information is missing on how to handle Directory() exit event
Reporter:Serge Vecher (serge-v)Labels:
Date Opened:2004-12-28 17:22:37.000-0600Date Closed:2011-06-07 14:10:19
Versions:Frequency of
Description:Wiki page on Directory() specifies that user may leave the Directory by pressing '*'. What is not specified, however, is _where_ the call is returned to.
When inside the directory, if '*' key is pressed, asterisk reports:
WARNING[7223]: app_directory.c:256 do_directory: Can't find extension 'a' in current context. Not exiting the Directory!

interestingly, if '0' is pressed, asterisk reports:
WARNING[7223]: app_directory.c:242 do_directory: Can't find extension 'a' in current context. Not exiting the Directory!
Possible, because I have operator=yes in voicemail.conf. At any rate, this behaviour is documented for Voicemail(), not Directoty().

Getting back to the problem. If I have the following setup:
exten => 9,1,Directory(vm-context|dial-context)

Defining 'a' extension (or 'o' while we are at it) in contexts [incoming] or [dial-context] (even in vm-context in voicemail.conf as was suggested on the list (http://lists.digium.com/pipermail/asterisk-users/2003-December/030239.html) does not resolve the situation.

So the question is, how do we properly handle the Directory() exit event?
Comments:By: Mark Spencer (markster) 2004-12-28 18:13:56.000-0600

From "show application directory"

 Directory(vm-context[|dial-context[|options]]): Presents the user 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, and specifies  the  context  of voicemail.conf to use.  The
dial-context is the context to use for dialing the users, and defaults to
the vm-context if unspecified. The 'f' option causes the directory to match
based on the first name in voicemail.conf instead of the last name.

I just tested with Directory(default,default) and both '0' and '*' worked as expected.  Are you sure you're on CVS head?
Returns 0 unless the user hangs up. It  also sets up the channel on exit
to enter the extension the user selected.  If the user enters '0' and there
exists an extension 'o' in the current context, the directory will exit with 0
and call control will resume at that extension.  Entering '*' will exit similarly,
but to the 'a' extension, much like app_voicemail's behavior.

By: Serge Vecher (serge-v) 2004-12-29 17:03:53.000-0600

mark, just double-combed the extensions.conf file. My 'a' and 'o' extensions were placed in the wrong context -- my bad -- sorry for the false alarm. I will make a respective comment of the wiki page, so the info there is in sync with "show application directory"



By: Mark Spencer (markster) 2004-12-29 17:18:04.000-0600