Russell,<br><br>Basically what I am trying to do is to play my own music on hold to callers waiting in a queue.&nbsp; During that call I want to be able to collect DTMF from the caller so that I can change audio files that I am playing back to the caller.<br>
<br>Jonathan<br><br><div class="gmail_quote">On Tue, Oct 28, 2008 at 9:31 PM, Russell Bryant <span dir="ltr">&lt;<a href="mailto:russell@digium.com">russell@digium.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
----- &quot;BJ Weschke&quot; &lt;<a href="mailto:bweschke@gmail.com">bweschke@gmail.com</a>&gt; wrote:<br>
<div><div></div><div class="Wj3C7c"><br>
&gt; jonathan augenstine wrote:<br>
&gt; &gt; (gdb) bt<br>
&gt; &gt; #0 &nbsp;0xb7f0a540 in pthread_mutex_lock () from<br>
&gt; &gt; /lib/tls/i686/cmov/libpthread.so.0<br>
&gt; &gt; #1 &nbsp;0x080f5b22 in ast_sched_runq (con=0x0)<br>
&gt; &gt; &nbsp; &nbsp; at<br>
&gt; /home/jonathan/asterisk/asterisk-1.4.22/include/asterisk/lock.h:755<br>
&gt; &gt; #2 &nbsp;0x080a1488 in waitstream_core (c=0x81f8e50, breakon=0x81261d1<br>
&gt; &gt; &quot;0123456789#*ABCD&quot;,<br>
&gt; &gt; &nbsp; &nbsp; forward=0x81281b0 &quot;&quot;, rewind=0x81281b0 &quot;&quot;, skip_ms=0,<br>
&gt; audiofd=-1,<br>
&gt; &gt; cmdfd=-1,<br>
&gt; &gt; &nbsp; &nbsp; context=0x0) at file.c:1217<br>
&gt; &gt; #3 &nbsp;0x080a18e8 in ast_waitstream_full (c=0x81f8e50,<br>
&gt; &gt; &nbsp; &nbsp; breakon=0x81261d1 &quot;0123456789#*ABCD&quot;, audiofd=-1, cmdfd=-1) at<br>
&gt; &gt; file.c:1238<br>
&gt; &gt; #4 &nbsp;0x0808a9c3 in ast_readstring_full (c=0x81f8e50, s=0xb6a12068 &quot;&quot;,<br>
&gt;<br>
&gt; &gt; len=1,<br>
&gt; &gt; &nbsp; &nbsp; timeout=5000, ftimeout=10000, enders=0x8138971 &quot;#&quot;, audiofd=-1,<br>
&gt;<br>
&gt; &gt; ctrlfd=-1)<br>
&gt; &gt; &nbsp; &nbsp; at channel.c:3120<br>
&gt; &gt; #5 &nbsp;0x0808ab14 in ast_readstring (c=0x81f8e50, s=0xb6a12068 &quot;&quot;,<br>
&gt; len=1,<br>
&gt; &gt; timeout=5000,<br>
&gt; &gt; &nbsp; &nbsp; ftimeout=10000, enders=0x8138971 &quot;#&quot;) at channel.c:3104<br>
&gt; &gt; #6 &nbsp;0x08060a9d in ast_app_getdata (c=0x81f8e50,<br>
&gt; &gt; &nbsp; &nbsp; prompt=0xb6a125c0<br>
&gt; &gt; &quot;/var/lib/asterisk/sounds/en/shared_audio/ad_spots/pcm8/Spot72691&quot;,<br>
&gt;<br>
&gt; &gt; s=0xb6a12068 &quot;&quot;, maxlen=1, timeout=0) at app.c:125<br>
&gt; &gt; #7 &nbsp;0xb7c45870 in play_voodoo_ad (chan=0x81f8e50, audio=0xb6a121a0)<br>
&gt; at<br>
&gt; &gt; res_voodoo.c:462<br>
&gt; &gt; #8 &nbsp;0xb7c464e8 in play_voodoo_local (parm=0x81f8e50) at<br>
&gt; res_voodoo.c:659<br>
&gt; &gt; #9 &nbsp;0x0810256b in dummy_start (data=0x81f9328) at utils.c:912<br>
&gt; &gt; #10 0xb7f084fb in start_thread () from<br>
&gt; /lib/tls/i686/cmov/libpthread.so.0<br>
&gt; &gt; #11 0xb7e21e5e in clone () from /lib/tls/i686/cmov/libc.so.6<br>
&gt; &gt; (<br>
&gt;<br>
&gt;<br>
&gt; &nbsp;Looks like you&#39;re trying to lock a channel lock on a channel that&#39;s<br>
&gt; not there any more ?<br>
<br>
</div></div>Indeed, it&#39;s possible.<br>
<br>
By looking at the backtrace, I can see that you created a thread in your module, and this thread is attempting to play a file on a channel. &nbsp;In Asterisk, doing media handling like this outside of the normal channel threads is not recommended, to say the least. &nbsp;:)<br>

<br>
Perhaps you can share more information on what you&#39;re trying to accomplish and we can provide some guidance on the right approach.<br>
<font color="#888888"><br>
<br>
--<br>
Russell Bryant<br>
Senior Software Engineer<br>
Open Source Team Lead<br>
Digium, Inc.<br>
</font><div><div></div><div class="Wj3C7c"><br>
_______________________________________________<br>
--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
 &nbsp; <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
</div></div></blockquote></div><br>