[asterisk-dev] [asterisk-users] Calling Directory app from AGI
Mike Diehl
mdiehl at diehlnet.com
Wed Mar 28 10:28:58 CDT 2012
On Wednesday 28 March 2012 1:49:47 am Tilghman Lesher wrote:
> On Tue, Mar 27, 2012 at 7:21 PM, Mike Diehl <mdiehl at diehlnet.com> wrote:
> > I'm going to resurrect this message since my signed developer's agreement
> > has been approved.
> >
> > I have a patch to app_directory that causes it to set a variable with the
> > box number of the selected mailbox. My patch is for 1.6.x, but I've got
> > a 10.x upgrade on my radar and will be happy to port my patch to the
> > latest version.
>
> If you have a patch, you're more than welcome to reopen the issue and
> upload the patch there. What isn't accepted on the issue tracker are
> feature requests without patches. Having a patch excludes it from
> being simply a feature request.
>
> My general inclination upon hearing about your patch is to question
> whether it conditionally sets a variable based upon an option flag,
> and whether the name of the variable is specified via option flag
> argument. While the option flag argument is not a requirement, though
> useful, any additionally set variable should be conditional based upon
> the specification of a particular option flag. The reason for this is
> that no matter how well you may believe your variable is named, it has
> the potential to break existing dialplans if your chosen variable name
> conflicts with a variable already set in somebody's dialplan.
Yes, I created an additional option flag, "s," to enable this function. Here
is an excerpt from "core show application directory" after the patch:
vm-context
This is the context within voicemail.conf to use for the Directory.
If not specified and 'searchcontexts=no' in "voicemail.conf", then
'default' will be assumed.
options
s: Do not connect call. Instead set ${DIR_EXTEN} to the selected
extension.
Now would be a good time to comment on my choice of flag and variable name,
btw.
--
Take care and have fun,
Mike Diehl.
More information about the asterisk-dev
mailing list