Hi,<br><br>I&#39;m migrating an application module from asterisk 1.2 to 1.8. So far it&#39;s been a fairly straightforward process, but I&#39;ve run into one behavioral difference in Asterisk that I&#39;m hoping someone here can either vet or make a suggestion for a better approach.<br>
<br>Our app is an IVR-type machine detection setup where the module plays a stream specified in the calling arguments while at the same time listening to the inbound channel audio for various ques. We want the module to clean up and exit either when it receives a que that it&#39;s looking for, or when the remote hangs up, or when the stream has finished playing out. The first two work fine, but a working method for detecting the end of the playing stream seems to have changed between 1.2.x and 1.8.x.<br>
<br>In 1.2 we basically had a big while {} loop and if (! chan-&gt;stream) we would break the loop. At the end of the stream, chan-&gt;stream would go null and this would break just fine. But in 1.8, chan-&gt;stream no longer goes null upon completion. i have been searching for a viable substitute, and so far what I have come up with is using ast_stream_tell() to watch for the advancing stream position and when it stops advancing, we have reached the end, at which point we can break.<br>
<br>Is there a better way? This feels kind of hack-y...<br><br>Thanks!<br>- Sean<br><br>