[asterisk-dev] Arbitrary hangup handlers [patch]

Benny Amorsen benny+usenet at amorsen.dk
Wed Sep 15 04:17:46 CDT 2010


Mark Murawski <markm at intellasoft.net> writes:

> Set(CHANNEL(addhanguphandler)="callqueueHangupHandler,s,1");
> Set(CHANNEL(addhanguphandler)="someotherHangupHandler,s,1");
> Set(CHANNEL(addhanguphandler)="yetanotherHangupHandler,s,1");

Wouldn't it be prettier to define a dedicated function for this?

AddHandler(hangup,callqueueHangupHandler)
RemoveHandler(hangup,callqueueHangupHandler)
ReplaceHandler(hangup,oldhandler,newhandler)

Perhaps it isn't necessary to have the first argument, if the only event
that will ever be handled is hangup.


/Benny




More information about the asterisk-dev mailing list