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 15:44:28
|
Gaetan Minet wrote: > 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...) I hope I don't have such issues in my code as I am also using bristuffed Asterisks most of the time. > Then we'll have boiler code in every call such as > if (chan =3D=3D null || ! chan.isActive()) > unless well announced and documented this will be a frequent mistake > among users I think. Yes you are right, this is error prone. So we sould either use your getActiveChannelByName or an explicit isChannelAvailable() method. > In that case, we should also return the most recent hung up channel, > isn't it ? Yes, probably just by looking at the date the channel was created which should work in both cases. >> Would you like to submit a patch for this issue? >> =20 > Ok I'll update my trunk and try the fix asap. That's great. =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 |