<div class="gmail_quote">On Mon, Feb 7, 2011 at 2:22 AM, Gilles <span dir="ltr">&lt;<a href="mailto:codecomplete@free.fr">codecomplete@free.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Lowering it to 5 seconds makes no difference. I also tried adding a<br>
Hangup before Wait but then the script ends before Wait.<br>
<br></blockquote><div><br>That&#39;s just CRAZY mate! I&#39;m thinking it has EVERYTHING to do with your DAHDI/Zap setup... Barring something in your configuration that I don&#39;t know about, there&#39;s no reason that the system should just hang up the call during the Wait() command...<br>

 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Could it be that it&#39;s just not possible to reuse a channel to dial out<br>
after it&#39;s been used to receive a call, even though it was just for a<br>
ring?<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div><br>Well, first of all, the channel (in the example dialplan and logs you posted earlier) wouldn&#39;t even be dialing a call, it would just be responsible for the generation of the callfile that would then cause Asterisk to spawn a call via whatever Channel you specified....<br>

<br>I just had a thought though....Are you, perhaps, hanging your mobile (or whatever) phone up after dialing into the system to trigger that context? The reason I ask is that would make this suddenly seem more clear....<br>

<br>Basically, try this modified version of the dialplan code:<br><br>[from_fxo]<br>
exten =&gt; s,1,Wait(2)<br>
<br>
exten =&gt; s,n,Set(SOURCE_CIDNUMBER=${<div id=":1nx">CALLERID(num)})<br>
exten =&gt; s,n,Set(SOURCE_CIDNAME=${CALLERID(name)})<br>
exten =&gt; s,n,NoOp(Call from ${SOURCE_CIDNAME} - ${SOURCE_CIDNUMBER})<br>
<br>
exten =&gt; s,n,GotoIf($[&quot;${SOURCE_CIDNUMBER}&quot; = ${GSM}]?goodcid:badcid)<br>
<br>
exten =&gt; s,n(goodcid),NoOp(CID OK)<br>
;how to reliably detect that line is now quiet?<br>
exten =&gt; s,n,Wait(10)<br>
<br>; Note From Sherwood McGowan<br>; By Changing the exten =&gt; s to exten =&gt; h in the section below, we guarantee that Asterisk will execute the code IF THE CALL IS ENDED (like in the examples given on the mailing list)<br>

<br>; Good Luck!<br><br>
exten =&gt; h,1,NoOp(Before cp)<br>
exten =&gt; h,n,system(cp /var/spool/asterisk/skelett.call /var/tmp/skelett.call)<br>
exten =&gt; h,n,NoOp(Before echo)<br>
exten =&gt; h,n,system(echo &quot;Channel: ZAP/1/${IPPI}&quot; &gt;&gt; /var/tmp/skelett.call)<br>
exten =&gt; h,n,NoOp(Before mv)<br>
exten =&gt; h,n,system(mv /var/tmp/skelett.call
/var/spool/asterisk/outgoing/)</div><br><br>Cheers!<br></div></div>