<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Thu, Jul 18, 2013 at 3:40 AM, Alexander Frolkin <span dir="ltr"><<a href="mailto:avf@eldamar.org.uk" target="_blank">avf@eldamar.org.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<div class="im"><br>
> When you execute an Originate action, are you doing so synchronously or<br>
> asynchronously?<br>
><br>
> A synchronous Originate performs the full outbound dial operation on the<br>
> thread servicing the AMI request. Since each session in AMI gets its own<br>
> thread that services both actions and events, a synchronous Originate can<br>
> block that session from receiving events until it completes.<br>
<br>
</div>I may be misunderstanding, but would your suggestion be to open a new<br>
AMI connection for each action? (Or at least each action that can<br>
block.)<br></blockquote><div><br></div><div style>Not at all. The Originate action has a parameter 'async' that, when present and set to True, will not block the thread servicing the AMI session.</div><div style>
<br></div><div style><a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_Originate">https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_Originate</a> </div><div style><br></div><div style>
I would suggest setting that field to True in your Originate actions.</div><div style><br></div><div style>Matt</div></div><div><br></div>-- <br><div dir="ltr"><div>Matthew Jordan<br></div><div>Digium, Inc. | Engineering Manager</div>
<div>445 Jan Davis Drive NW - Huntsville, AL 35806 - USA</div><div>Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> & <a href="http://asterisk.org" target="_blank">http://asterisk.org</a></div>
</div>
</div></div>