<div>In my outbound async full ESL script after some moment there are out-of-order message on every &quot;execute&quot; call, and this breaks my event handling in some way.</div><div><br></div><div>Content-Type: command/reply.Reply-Text: +OK event listener enabled plain..                                              </div>
<div>I want to execute some commands syncronously, but setEventLock seems to be broken by this behavior.  </div><div>As the workaround I had to write lock_for_execute_complete function, which waits for execute completion of applications that need to be run sync, but it effectively destroys async events by processing them while waiting for CHANNEL_EXECUTE_COMPLETE.</div>
<div><br></div><div>here is a part of socket dump, note second &quot;Content-Type: command/reply.Reply-Text: +OK event listener enabled plain..&quot; right after execute. There is no event command in script besides the very beginning, so why these messages appear?</div>
<div><br clear="all"></div>T <a href="http://127.0.0.1:8006">127.0.0.1:8006</a> -&gt; <a href="http://127.0.0.1:43282">127.0.0.1:43282</a> [AP]<br>  api uuid_setvar 06d55974-4fe8-11e0-a7c0-e3bb2141c22a pbx_subscriber_customer_id 1                                       <br>
#<br>T <a href="http://127.0.0.1:8006">127.0.0.1:8006</a> -&gt; <a href="http://127.0.0.1:43282">127.0.0.1:43282</a> [AP]<br>  ..                                                                                                                      <br>
##<br>T <a href="http://127.0.0.1:43282">127.0.0.1:43282</a> -&gt; <a href="http://127.0.0.1:8006">127.0.0.1:8006</a> [AP]<br>  Content-Type: api/response.Content-Length: 4..                                                                          <br>
#<br>T <a href="http://127.0.0.1:43282">127.0.0.1:43282</a> -&gt; <a href="http://127.0.0.1:8006">127.0.0.1:8006</a> [AP]<br>  +OK.                                                                                                                    <br>
##<br>T <a href="http://127.0.0.1:8006">127.0.0.1:8006</a> -&gt; <a href="http://127.0.0.1:43282">127.0.0.1:43282</a> [AP]<br>  api sofia_contact <a href="mailto:s000002@asdasd.com">s000002@asdasd.com</a>                                                                           <br>
#<br>T <a href="http://127.0.0.1:8006">127.0.0.1:8006</a> -&gt; <a href="http://127.0.0.1:43282">127.0.0.1:43282</a> [AP]<br>  ..                                                                                                                      <br>
##<br>T <a href="http://127.0.0.1:43282">127.0.0.1:43282</a> -&gt; <a href="http://127.0.0.1:8006">127.0.0.1:8006</a> [AP]<br>  Content-Type: api/response.Content-Length: 96..                                                                         <br>
#<br>T <a href="http://127.0.0.1:43282">127.0.0.1:43282</a> -&gt; <a href="http://127.0.0.1:8006">127.0.0.1:8006</a> [AP]<br>  sofia/local/sip:s000002@172.19.36.54:5061;fs_nat=yes;fs_path=sip%3As000002%40172.19.36.54%3A5061                        <br>
##<br>T <a href="http://127.0.0.1:8006">127.0.0.1:8006</a> -&gt; <a href="http://127.0.0.1:43282">127.0.0.1:43282</a> [AP]<br>  Event-Name: SOCKET_DATA.Content-Type: api/response.Content-Length: 96..sofia/local/sip:s000002@172.19.36.54:5061;fs_nat=<br>
  yes;fs_path=sip%3As000002%40172.19.36.54%3A5061                                                                         <br>#<br>T <a href="http://127.0.0.1:8006">127.0.0.1:8006</a> -&gt; <a href="http://127.0.0.1:43282">127.0.0.1:43282</a> [AP]<br>
  sendmsg.call-command: execute.execute-app-name: bridge.execute-app-arg: {originate_timeout=10,hangup_after_bridge=false,<br>  ignore_early_media=false}user/<a href="mailto:s000002@asdasd.com">s000002@asdasd.com</a><br>#<br>
<strong>T <a href="http://127.0.0.1:43282">127.0.0.1:43282</a> -&gt; <a href="http://127.0.0.1:8006">127.0.0.1:8006</a> [AP]<br>  Content-Type: command/reply.Reply-Text: +OK event listener enabled plain.. </strong>                                             <br>
#<br>T <a href="http://127.0.0.1:43282">127.0.0.1:43282</a> -&gt; <a href="http://127.0.0.1:8006">127.0.0.1:8006</a> [AP]<br>  Content-Type: command/reply.Reply-Text: +OK..                                 <br><br>-- <br>Best regards,<br>
<br>Dmitry Sytchev,<br>IT Engineer<br>