<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt">I use Asterisk 1.6.2.11 and this is my dialplan:<br><br>[test]<br> exten => 9999,1,NoOp(${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})<br>exten => 9999,n,Answer()<br> exten => 9999,n,NoOp(${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})<br>exten => 9999,n,PlayBack(hello-world)<br> exten => 9999,n,NoOp(${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})<br>exten => 9999,n,MYSQL(Set timeout 2)<br> exten => 9999,n,NoOp(${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})<br>exten => 9999,n,MYSQL(Connect connid localhost user pass asterisk)<br> exten => 9999,n,NoOp(${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})<br>exten => 9999,n,MYSQL(Query resultid ${connid} SELECT
SLEEP(10))<br> exten => 9999,n,NoOp(${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})<br>exten => 9999,n,MYSQL(Fetch fetchid ${resultid} RESULT)<br> exten => 9999,n,NoOp(${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})<br>exten => 9999,n,MYSQL(Clear ${resultid})<br> exten => 9999,n,NoOp(${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})<br>exten => 9999,n,MYSQL(Disconnect ${connid})<br> exten => 9999,n,NoOp(${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})<br>exten => 9999,n,NoOp(Result: ${RESULT})<br> exten => 9999,n,NoOp(${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})<br>exten => 9999,n,Hangup()<br><br><br><br><br>When i call to 9999 this is the CLI output:<br><br>Connected to Asterisk 1.6.2.11 currently running on Asterisk (pid = 2092)<br>Verbosity is at least 2147483647<br>Asterisk*CLI><br> == Using SIP RTP CoS mark
5<br> -- Executing [9999 at test:1] NoOp("SIP/test-00000000", "2010-09-03 14:57:35") in new stack<br> -- Executing [9999 at test:2] Answer("SIP/test-00000000", "") in new stack<br> -- Executing [9999 at test:3] NoOp("SIP/test-00000000", "2010-09-03 14:57:35") in new stack<br> -- Executing [9999 at test:4] Playback("SIP/test-00000000", "hello-world") in new stack<br> -- <SIP/test-00000000> Playing 'hello-world.gsm' (language 'en')<br> -- Executing [9999 at test:5] NoOp("SIP/test-00000000", "2010-09-03 14:57:36") in new stack<br> -- Executing [9999 at test:6] MYSQL("SIP/test-00000000", "Set timeout 2") in new stack<br> -- Executing [9999 at test:7] NoOp("SIP/test-00000000", "2010-09-03 14:57:36") in new stack<br> -- Executing [9999 at test:8] MYSQL("SIP/test-00000000", "Connect connid
localhost user pass asterisk") in new stack<br> -- Executing [9999 at test:9] NoOp("SIP/test-00000000", "2010-09-03 14:57:37") in new stack<br> -- Executing [9999 at test:10] MYSQL("SIP/test-00000000", "Query resultid 1 SELECT SLEEP(10)") in new stack<br> -- Executing [9999 at test:11] NoOp("SIP/test-00000000", "2010-09-03 14:57:47") in new stack<br> -- Executing [9999 at test:12] MYSQL("SIP/test-00000000", "Fetch fetchid 2 RESULT") in new stack<br> -- Executing [9999 at test:13] NoOp("SIP/test-00000000", "2010-09-03 14:57:47") in new stack<br> -- Executing [9999 at test:14] MYSQL("SIP/test-00000000", "Clear 2") in new stack<br> -- Executing [9999 at test:15] NoOp("SIP/test-00000000", "2010-09-03 14:57:47") in new stack<br> -- Executing [9999 at test:16] MYSQL("SIP/test-00000000", "Disconnect 1") in new
stack<br> -- Executing [9999 at test:17] NoOp("SIP/test-00000000", "2010-09-03 14:57:47") in new stack<br> -- Executing [9999 at test:18] NoOp("SIP/test-00000000", "Result: 0") in new stack<br> -- Executing [9999 at test:19] NoOp("SIP/test-00000000", "2010-09-03 14:57:47") in new stack<br> -- Executing [9999 at test:20] Hangup("SIP/test-00000000", "") in new stack<br> == Spawn extension (test, 9999, 20) exited non-zero on 'SIP/test-00000000'<br>Asterisk*CLI><br><br><br><br>According to "Asterisk*CLI> core show application MYSQL":<br> MYSQL(Set timeout <num>)<br> Set the connection timeout, in seconds.<br><br><br><br>As you see the "SELECT SLEEP(10)" query took 10 seconds and the MySQL timeout <br>was set to 2 seconds.<br>I think the timeout should have ended the execution of the query.<br>Does anyone know why it didn't?<br></div><br>
</body></html>