[asterisk-dev] app_meetme - distinguish between redirect and hangup?

Russell Bryant russell at digium.com
Tue May 12 09:22:03 CDT 2009


Tony Mountifield wrote:
> I wanted to check what the correct way to test this was. I think I need
> to check that the only softhangup flag set is the asyncgoto one:
> 
>     if (chan->_softhangup == AST_SOFTHANGUP_ASYNCGOTO) {
>     	/* channel was redirected, but not hung up for any other reason */
>     }
> 
> Is there anything else to be aware of? Thanks for the sanity check.

You're on the right track.  I have a couple of comments:

1) You may want to check for AST_SOFTHANGUP_ASYNCGOTO using a bitwise
and instead of equality, to be consistent with how the value is being
set it ast_softhangup_nolock().

2) Checking for this value will only work for channel's executing the
dialplan.  In your case, for channels in MeetMe, that is most likely the
case, but it's not definite.

For example, you can do an originate with the target being a specific
application and not an extension.  In that case, the channel will not be
executing the dialplan.

For channels not executing the dialplan ... I honestly don't see a way
to be able to determine what happened.  It's going to look like a hangup
(a masquerade will have happened).

-- 
Russell Bryant
Digium, Inc. | Senior Software Engineer, Open Source Team Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list