[Home]

Summary:ASTERISK-05092: app_directory reports "No compatible entries" when there are
Reporter:tim allen (tallen8840)Labels:
Date Opened:2005-09-14 15:23:55Date Closed:2011-06-07 14:10:06
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_directory
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) am_voicemail.conf
( 1) extensions.conf
( 2) voicemail.conf
Description:changes made in CVS revision 1.41 broke it. Have CVS_HEAD reverted to app_directory.c -r 1.40 and all okay.
Comments:By: Kevin P. Fleming (kpfleming) 2005-09-14 19:12:44

That error message does not appear in app_directory.c.

Instead of summarizing the problem incorrectly, it would be helpful if you actually provided a trace of the problem occurring, along with a copy of the relevant configuration information. If you cannot provide voicemail.conf without modifying it first, let us know and we'll arrange to get a copy privately if needed.

By: tim allen (tallen8840) 2005-09-14 20:45:44

Mr. Fleming I have not incorrectly summarized the problem I have simply assumed that developers with CVS access have some knowledge of the code and would appreciate a succinct description. Furthermore, since there were only two lines of code changed between 1.40 and 1.41 I assumed this would be trivial. The "no compatible entries" response was not textural but aural and therefore will not appear in the code. Thanks for the flames, have a nice day.

By: Kevin P. Fleming (kpfleming) 2005-09-14 20:51:00

I did review the patch again, since I'm the one that committed it, and I saw no apparent reason why it would cause this behavior. Since I have no particular knowledge of your configuration, I can only guess at what may have caused it. Generally we prefer to have concrete evidence rather than guessing, but given that you apparently aren't willing to provide it (even though the bug posting guidelines explicitly request it), we'll make do.

By: Kevin P. Fleming (kpfleming) 2005-09-14 20:58:08

Broken code changes reverted in CVS HEAD.

By: tim allen (tallen8840) 2005-09-14 21:17:56

It's back. Just cvs up'd from 1.40 to 1.43.
I don't see how to upload a file from here so I'll try to go back in to the report after this reopens it...

By: tim allen (tallen8840) 2005-09-14 21:23:46

Playing '/var/spool/asterisk/voicemail/default/14/greet' (language 'en')
   -- Playing 'dir-instr' (language 'en')
Sep 14 22:21:41 WARNING[31443]: app_directory.c:197 play_mailbox_owner: Can't find extension '14' in context 'default'.  Did you pass the wrong context to Directory?
   -- Playing 'dir-nomore' (language 'en')
 == Parsing '/etc/asterisk/voicemail.conf': Found

The 4th line is the one you're interested in. Yes I did pass the correct context and yes exten 14 does exist in that context.

By: Kevin P. Fleming (kpfleming) 2005-09-14 21:26:22

OK, reviewing now.

By: Kevin P. Fleming (kpfleming) 2005-09-14 21:34:00

OK, the previous patch was completely wrong. Sorry I missed the fact that logic was backwards and testing the wrong way in that code path. It's fixed now, I think :-)

By: tim allen (tallen8840) 2005-09-14 21:51:06

sorry, still broken

By: Michael Jerris (mikej) 2005-09-14 21:55:08

Are you saying it's still broken with app_directory.c 1.44 or 1.43?

By: tim allen (tallen8840) 2005-09-14 21:59:03

1.44...
I issued cvs up -A app_directory.c and recompiled.

By: Kevin P. Fleming (kpfleming) 2005-09-14 22:06:44

OK, this is going to have to wait until tomorrow when I can set up a test system.

By: auktionmaster (auktionmaster) 2005-09-20 12:21:07

same problem here:

 -- Playing 'dir-nomore' (language 'de')
 == Parsing '/etc/asterisk/voicemail.conf': Found
 -- Playing 'dir-intro' (language 'de')
 == Spawn extension (sip_desks, 947099, 2) exited non-zero on 'SIP/713-8cf1'
 -- Executing Answer("SIP/713-0097", "") in new stack
 -- Executing Directory("SIP/713-8cf1", "default") in new stack
 == Parsing '/etc/asterisk/voicemail.conf': Found
 -- Playing 'dir-intro' (language 'de')
 -- Playing '/var/spool/asterisk/voicemail/default/711/greet' (language 'de')
 -- Playing 'dir-instr' (language 'de')
Sep 20 19:20:12 WARNING[6225]: app_directory.c:197 play_mailbox_owner: Can't find extension '711' in context 'default'.  Did you pass the wrong context to Directory?
 -- Playing 'dir-nomore' (language 'de')
 == Parsing '/etc/asterisk/voicemail.conf': Found
 -- Playing 'dir-intro' (language 'de')

By: Kevin P. Fleming (kpfleming) 2005-09-25 22:24:55

I cannot reproduce this problem on my test system or our main PBX any longer, so I am assuming the last change I put into CVS HEAD corrected the problem. I even tested the voicemail context and the dialplan context being different, and it still worked as expected.

Can someone who is experiencing the problem show the relevant parts of voicemail.conf and extensions.conf (both the call to the Directory() app and the context that is providing the target when '1' is pressed for a found entry)?

By: auktionmaster (auktionmaster) 2005-09-28 01:36:03

Problem still exists with newest CVS HEAD and directory.c (Revision: 1.44)
I attached "extensions.conf" and "am_voicemail.conf":

   -- Executing Answer("SIP/713-885c", "") in new stack
   -- Executing Directory("SIP/713-885c", "default") in new stack
 == Parsing '/etc/asterisk/voicemail.conf': Found
   -- Playing 'dir-intro' (language 'de')
   -- Playing '/var/spool/asterisk/voicemail/default/713/greet' (language 'de')
   -- Playing 'dir-instr' (language 'de')
Sep 28 08:26:43 WARNING[6261]: app_directory.c:197 play_mailbox_owner: Can't find extension '713' in context 'default'.  Did you pass the wrong context to Directory?
   -- Playing 'dir-nomore' (language 'de')
 == Parsing '/etc/asterisk/voicemail.conf': Found
   -- Playing 'dir-intro' (language 'de')

By: auktionmaster (auktionmaster) 2005-09-28 01:44:06

I tried a little bit more and found the difference:

before 1.41 directory.c jumped automatically into voicemail.conf and started recording the voicemail message. Now it looks into extensions.conf for the section called within "Directory()" what to do. Maybe this is not a bug; just a documentation bug :-)

after i added Context "default" to extensions.conf it worked :-)

[default]
exten => 713,1,Say(Hallo)

this means:

for every mailbox in voicemail.conf you also need to add an "exten =>" in extensions.conf under the same "context". So if cou call Directory(whatever) you need a [whatever] context in "voicemail.conf" AND a [whatever] context in extensions.conf.

By: twisted (twisted) 2005-09-28 10:52:01

app_directory takes 3 argumets:

*CLI> show application directory
 -= Info about application 'Directory' =-

[Synopsis]
Provide directory of voicemail extensions

[Description]
 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.
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.


It looks to me like you do not have your application called correctly.  If you want it to look for your extensions in a different context than that in voicemail.conf, you must pass it.

Please read the applicaiton usage instructions before filing bugs.

By: twisted (twisted) 2005-09-28 10:53:19

Let me clarify:  to make directory dial your users that are in different context than 'default' in the dialplan, you must pass it as:

exten => 1234,1,Directory(default|extensions)   ; this will look in [default] in voicemail.conf, and then send callers to [extensions] context in extensions.conf.

By: auktionmaster (auktionmaster) 2005-09-28 13:16:48

Thanks for that and sorry for the confusion.
But i assume it was working another way earlier...

By: Kevin P. Fleming (kpfleming) 2005-09-28 23:00:02

The application is working properly as documented; I do not know how its behavior could have changed, since the parameters have been checked and re-checked.

By: Digium Subversion (svnbot) 2008-01-15 15:48:30.000-0600

Repository: asterisk
Revision: 6609

U   trunk/apps/app_directory.c

------------------------------------------------------------------------
r6609 | kpfleming | 2008-01-15 15:48:30 -0600 (Tue, 15 Jan 2008) | 2 lines

revert a portion of issue ASTERISK-5003 which broke this app (issue ASTERISK-5092)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=6609

By: Digium Subversion (svnbot) 2008-01-15 15:48:32.000-0600

Repository: asterisk
Revision: 6611

U   trunk/apps/app_directory.c

------------------------------------------------------------------------
r6611 | kpfleming | 2008-01-15 15:48:31 -0600 (Tue, 15 Jan 2008) | 2 lines

_really_ fix app_directory (doh... how did I miss this before?) (issue ASTERISK-5092, take two)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=6611