Re: [Asterisk-java-users] getChannelByName returning an old hungup channel instead of the current o
Brought to you by:
srt
From: Gaetan M. <gm...@ea...> - 2007-03-16 15:06:17
|
> Indeed. Though the real fix would be to provide some patches for > Asterisk to include the uniqueId in these events which should be a > one-liner. Nevertheless this would not solve our problem as we have to > take older versions of Asterisk into account. > This is actually exactly what happened to me. I was working with a bristuffed 1.2.9 that includes uniqueid in all those events and my queue/parking manager worked ok. Then I have had to jump to a non bristuffed 1.2.12 that only has the channel name and started experiencing weird channels and NPEs (linked channel of an hung up channel is null...) >> Also, this can be problematic if someone uses getChannelByName and >> expects it to return null if there is no such channel in asterisk at >> this moment ("Is my zap line free ?"). >> > > This could also be resolved by checking for null and an isActive() > method on AsteriskChannel (not sure if its already implemented). > Then we'll have boiler code in every call such as if (chan == null || ! chan.isActive()) unless well announced and documented this will be a frequent mistake among users I think. In that case, we should also return the most recent hung up channel, isn't it ? > Would you like to submit a patch for this issue? > Ok I'll update my trunk and try the fix asap. > Thanks, > > =Stefan > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |