[asterisk-dev] features.conf applicationmap issues

Russell Bryant russell at digium.com
Sat Aug 5 00:03:08 MST 2006


Greetings everyone,

During our conference call at the AstriDevCon in Italy this Summer, we
had a discussion regarding an update we needed to make to the
application map so that you not only specified who could activate the
feature, but which channel to activate the feature on.  This all made
sense, under the assumption that the existing configuration option was,
in fact, to configure who gets to activate the feature.  However, that's
not quite the way it works ...

This is from features.conf.sample:

;testfeature => #9,callee,Playback,tt-monkeys   ;Play tt-monkeys to
                                          ;callee if #9 was pressed

>From the comment, it sounds like "callee" means that this feature will
be activated on the "callee".  However, in the code, this field is used
in more than way, and unfortunately, clearing it up is going to require
breaking some situations where it may have worked before.

When this field says "callee", the bridge config structure gets the flag
"AST_BRIDGE_DTMF_CHANNEL_1" set, which tells the bridge to watch for
DTMF from the callee channel.  If it is set to "caller",
"AST_BRIDGE_DTMF_CHANNEL_0" is set on the bridge config telling the
bridge to watch for DTMF from the calling channel.  This all sounds
fine, if the option were only used to determine who gets to activate the
feature.

Unfortunately, this option also does something else.  If an activated
feature is one from the applicationmap, it uses the value of this option
to determine which channel to activate the feature on.

To make this even more of a mess, the behavior changes if you are using
any of the builtin features by including something like "tT" in the
options to the Dial application.  By including "tT" in your Dial
options, the bridge is already set up to monitor DTMF from both the
caller and callee channels.  Then, the "callee" option in the
testfeature above only applies to which channel the features is
activated on.

So, what should we do to clean this up?

My current feeling is that we change the syntax to be the following:

<featurename> =>
<DTMFsequence>,<ActivateOn>[/<ActivatedBy>],<Application>[,<Data>]

The valid values of ActivateOn would be "callee" and "caller", while the
valid values for ActivatedBy would also include "both", which would also
be the default.

If I haven't confused you yet, any thoughts?

-- 
Russell Bryant
Software Developer
Digium, Inc.




More information about the asterisk-dev mailing list