Re: [Asterisk-java-users] getChannelByName returning an old hungup channel instead of the current o
Brought to you by:
srt
From: Stefan R. <ste...@re...> - 2007-03-16 14:33:21
|
Gaetan Minet wrote: > 4/ I call AsteriskServer.getChannelByName("Zap/1-1"); >=20 > and it returns the first old one that is hung up, not the new one. I would consider this a bug. getChannelByName() should return the newest channel matching the given name. The fix for this would also require updating the javadoc to clearly define what is actually returned. > The same applies with park related events for example. I guess the same= > kind of problem should happen for the MeetMeManager is it uses getByNam= e. 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. > 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). Would you like to submit a patch for this issue? Thanks, =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |