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> &lt;<a href="mailto:russell@digium.com">russell@digium.com
</a>&gt; 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>&gt; i&#39;d like to know if there&#39;s a much cleaner way to know if a specific chan is
<br>&gt; on hold.<br>&gt; The goal behind is simpler: make a new CLI command to list all the channels<br>&gt; that are currently on hold.<br>&gt;<br>&gt; Based on that, i could use the ast_channel struct with music_state, since
<br>&gt; all on hold starts it, right (if res_musiconhold.so is loaded) ?<br>&gt; Something like:<br>&gt; if ( chan-&gt;music_state) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;//the call is onhold<br>&gt; }<br><br>That won&#39;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.&nbsp;&nbsp;The most common thing<br>to do is just play MOH to the channel.&nbsp;&nbsp;However, there are some channels that<br>can pass this information as signalling across the network.&nbsp;&nbsp;For example, this
<br>can be signalled over PRI in chan_zap, and in chan_iax2.&nbsp;&nbsp;In theory, we could<br>add support for signalling HOLD in chan_sip, but it&#39;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>&nbsp;&nbsp; <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