Hi Guys,<br>I am getting an error when executing another mysql query in dialplan after calling stored procedure.<br>If calling the procedure from mysql cli it gives a result like:<br>
mysql> call call_control(78236721,1000,1233);<br>
+------+<br>
| pass |<br>
+------+<br>
| 1 |<br>
+------+<br>So I need asterisk to recognize this pass and take some actions based on what the pass value is.<br>Dialplan looks like this:<br><br>MYSQL(Connect connid ${DBDefaultHost} ${DBuser} ${DBpass} ${DBname}) <br>MySQL(Query resultid ${connid} CALL call_control(78236721,1000,1233))<br>
MySQL(Fetch fetchid ${resultid} pass)<br>MYSQL(clear ${resultid})<br>MySQL(Query resultid ${connid} SELECT/INSERT whatever from table)<br><br>So, it gives me this pass value correct, but if I execute some other query INSERT or SELECT after clearing the result, it gives me an error<br>
[May 17 16:16:13] WARNING[19572]: app_addon_sql_mysql.c:374
aMYSQL_query: aMYSQL_query: mysql_query failed. Error: Commands out of
sync; you can't run this command now<br>The error disappears if I reconnect to mysql after calling the stored procedure but it seams not right to me to connect to mysql 2 times for 1 call. <br><br>Did anyone have the same issue?<br>
<br>