[Asterisk-Dev] Problems about applicationmap

Christian Richter christian.richter at beronet.com
Thu Jan 5 13:01:05 MST 2006


Hi

>* Using Goto as the application doesn't work,
>though bug 3764 said it should be.
>http://bugs.digium.com/view.php?id=3764
>  
>
Yeah i think, the problem is that it really won't work to start multiple
applications with this feature .. so indeed goto won't work, we'd needed
to extend the whole thing to call ast_pbx_start and to change
context/extension of the channel, but that could create some issues with
the cdr probably ..

I never tried to use Goto, thought it would work automatically ;)

>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?
>
>  
>
That's probably the best way to do it. A local channel is a new channel
which calls itself ast_pbx_start and jumps into the extensions.conf then.

>* It seems I can send the caller or callee into a specified application,
>but not both. Am I correct?
>  
>
yes you are 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,...
>
>  
>
no that won't work indeed.

>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);
>
>  
>
that won't work the way you'd like to, because now the first application
would be executed till it's ready, and afterwards the second one would
be executed.

You'd need to start a new thread which handles the second application i
think, but then you'd need to manage situations like:
what happens if the first application stops, but the second still goes on ?

What we should do i think is createing a Redirect application which
works like the manager command, you could use redirect to send the
second channel into another part of the extensions.conf ..



>_______________________________________________
>--Bandwidth and Colocation provided by Easynews.com --
>
>Asterisk-Dev mailing list
>To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev
>
>  
>




More information about the asterisk-dev mailing list