[Asterisk-Dev] Problems about applicationmap

Chih-Wei Huang cwhuang at citron.com.tw
Wed Jan 4 23:17:17 MST 2006


I'm trying to use applicationmap in features.conf to implement
some interesting functions. (e.g., 3-way calling)
But I encountered some issues that I don't understand or figure out.
Recall the applicationmap is defined in the following syntax:

<featurename> => <keysequence>,<caller|callee>,<App> [,App Args]

The Asterisk version is 1.2.1.


* Using Goto as the application doesn't work,
though bug 3764 said it should be.
http://bugs.digium.com/view.php?id=3764

The verbose message did say "Goto(...)", but nothing happened then.
More strange, if callee is specified like,

3way_callee => *3,callee,Goto,invite|s|1

The verbose message said "Goto(invite,s,2)" (i.e., priority+1)
But there is no such an offest if caller is specified.

However, using Dial Local channel does work.

3way_callee => *3,callee,Dial,Local/s at invite

Could someone explain why?


* It seems I can send the caller or callee into a specified application,
but not both. Am I correct?
To implement 3-way calling, I have to send caller and callee into
different applications variously, say, MOH for caller and WaitForExten
for callee. But it seems there is no way to do this.
Even I defined two features like:

3way_caller => *3,caller,...
3way_callee => *3,callee,...

It doesn't work. Only one feature is detected and executed.
The other is ignored.
I traced the code and confirmed the situation.
Did I miss something?

To overcome the problem, I think we can extend the syntax to specify
"both" to indicate both caller and callee need to be send into the
specified application.
The parser is easy, but I don't know how to start applications for
both channels simutaneously.
Could I simply add code like the following to feature_exec_app in
res_features.c

    if (ast_test_flag(feature,AST_FEATURE_FLAG_CALLER))
                res = pbx_exec(work, app, feature->app_args, 1);

    if (ast_test_flag(feature,AST_FEATURE_FLAG_CALLEE))
                res = pbx_exec(peer, app, feature->app_args, 1);




More information about the asterisk-dev mailing list