can we go on the way I proposed for knowing which chans are on hold?<br>when a new way will be implemented, we could just change my new command, no?<br><br>Since 99% of my installations use MOH, that will solve all my issues and many issues out there.
<br><br>Is my change to res_musiconhold.c is viable ? do you see any impact?<br><br><div><span class="gmail_quote">On 8/22/07, <b class="gmail_sendername">Russell Bryant</b> <<a href="mailto:russell@digium.com">russell@digium.com
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Clod Patry wrote:<br>> i'd like to know if there's a much cleaner way to know if a specific chan is
<br>> on hold.<br>> The goal behind is simpler: make a new CLI command to list all the channels<br>> that are currently on hold.<br>><br>> Based on that, i could use the ast_channel struct with music_state, since
<br>> all on hold starts it, right (if res_musiconhold.so is loaded) ?<br>> Something like:<br>> if ( chan->music_state) {<br>> //the call is onhold<br>> }<br><br>That won't work, because MOH is not always in use when channels are on hold.
<br>Channel drivers choose how to handle being put on hold. The most common thing<br>to do is just play MOH to the channel. However, there are some channels that<br>can pass this information as signalling across the network. For example, this
<br>can be signalled over PRI in chan_zap, and in chan_iax2. In theory, we could<br>add support for signalling HOLD in chan_sip, but it's not that way yet.<br><br>--<br>Russell Bryant<br>Software Engineer<br>Digium, Inc.
<br><br>_______________________________________________<br>--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--">http://www.api-digital.com--</a><br><br>asterisk-dev mailing list<br>To UNSUBSCRIBE or update options visit:
<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>Clod Patry