This is what I ended up doing, working fine now.<div><br></div><div>Cheers<br><br><div class="gmail_quote">On 18 August 2010 08:52, Nasir Iqbal <span dir="ltr"><<a href="mailto:nasir@ictinnovations.com">nasir@ictinnovations.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Avoid to use MySQL dialplan application, instead write an AGI script for this purpose<br><br><div class="gmail_quote">
<div><div></div><div class="h5">On Tue, Aug 17, 2010 at 4:59 PM, Geraint Lee <span dir="ltr"><<a href="mailto:geraint@gmail.com" target="_blank">geraint@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">Right, I'm baffled.<div><br></div><div>I have:</div><div><div>exten => s,1,MYSQL(Connect DB1 127.0.0.1 geraint xxx amis2)</div>
<div>exten => s,n,MYSQL(Query NORESULT ${DB1} INSERT\ INTO\ recordings\ (caller_number\,called_number\,date_created\,date_started\,in_use\,server_id)\ VALUES\ (\'${CALLERID(number)}\'\,\'${ARG1}\'\,NOW()\,NOW()\,\'Yes\'\,12))</div>
<div>exten => s,n,MYSQL(Query RESULT1 ${DB1} SELECT\ LAST_INSERT_ID())</div><div>exten => s,n,MYSQL(Fetch FOUND1 ${RESULT1} VALUE1)</div><div>exten => s,n,MYSQL(Clear ${RESULT1})</div><div>exten => s,n,MYSQL(Disconnect ${DB1})</div>
<div>exten => s,n,MixMonitor(${VALUE1}.wav)</div><div>exten => s,n,Set(CALLERID(all)=xxx)</div><div>exten => s,n,Dial(SIP/prov1/${ARG1})</div></div><div><br></div><div>in a macro to dial numbers...</div><div><br>
</div><div>Every few hours or so every call hangs on the s,1 MYSQL(Connect) and won't work until i restart asterisk.</div><div><br></div><div>The mysql server has a maximum connections of 2048 (of which around 90 are in use) so it's not a mysql connection limit problem from what i can tell since while asterisk is "stuck" i can still log in to mysql just fine, as can the web server.</div>
<div><br></div><div>Does anyone have any suggestions what could be causing asterisk to get stuck here? i don't see anything in cli and core show channels just shows everyone stuck in state ring on the connect string with no errors.</div>
<div><br></div><div>Cheers</div><div><br></div><font color="#888888"><div>Geraint</div>
</font><br></div></div>--<div class="im"><br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></div></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br>
Nasir Iqbal<br><br>ICT Innovations<br>
<a href="http://www.ictinnovations.com/" target="_blank">http://www.ictinnovations.com/</a><br><br>
</font><br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div>