<p>Russell Bryant has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8623">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_originate: Add async option.<br><br>Add an option to make app_originate not wait for the created channel<br>to answer.<br><br>Change-Id: I7fc2facd77079abc6321f44e8bcd4e39298de2ae<br>Requested-by: Frederic Steinfels <fst@highdefinition.ch><br>Signed-off-by: Russell Bryant <russell@russellbryant.net><br>---<br>M apps/app_originate.c<br>1 file changed, 10 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/23/8623/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/apps/app_originate.c b/apps/app_originate.c<br>index 30fa565..107be84 100644<br>--- a/apps/app_originate.c<br>+++ b/apps/app_originate.c<br>@@ -74,6 +74,10 @@<br>                   </parameter><br>                    <parameter name="options" required="false"><br>                                 <optionlist><br>+                           <option name="a"><br>+                                    <para>Originate asynchronously.  In other words, continue in the dialplan<br>+                                      without waiting for the originated channel to answer.</para><br>+                           </option><br>                               <option name="b" argsep="^"><br>                                        <para>Before originating the outgoing call, Gosub to the specified<br>                                      location using the newly created channel.</para><br>@@ -123,6 +127,7 @@<br> enum {<br>  OPT_PREDIAL_CALLEE =    (1 << 0),<br>       OPT_PREDIAL_CALLER =    (1 << 1),<br>+      OPT_ASYNC =             (1 << 2),<br> };<br> <br> enum {<br>@@ -133,6 +138,7 @@<br> };<br> <br> AST_APP_OPTIONS(originate_exec_options, BEGIN_OPTIONS<br>+        AST_APP_OPTION('a', OPT_ASYNC),<br>       AST_APP_OPTION_ARG('b', OPT_PREDIAL_CALLEE, OPT_ARG_PREDIAL_CALLEE),<br>  AST_APP_OPTION_ARG('B', OPT_PREDIAL_CALLER, OPT_ARG_PREDIAL_CALLER),<br> END_OPTIONS );<br>@@ -250,7 +256,8 @@<br> <br>                 res = ast_pbx_outgoing_exten_predial(chantech, cap_slin, chandata,<br>                            timeout * 1000, args.arg1, exten, priority, &outgoing_status,<br>-                            AST_OUTGOING_WAIT, NULL, NULL, NULL, NULL, NULL, 0, NULL,<br>+                            ast_test_flag64(&opts, OPT_ASYNC) ? AST_OUTGOING_NO_WAIT : AST_OUTGOING_WAIT,<br>+                            NULL, NULL, NULL, NULL, NULL, 0, NULL,<br>                                predial_callee);<br>      } else {<br>              ast_debug(1, "Originating call to '%s/%s' and connecting them to %s(%s)\n",<br>@@ -258,7 +265,8 @@<br> <br>                 res = ast_pbx_outgoing_app_predial(chantech, cap_slin, chandata,<br>                              timeout * 1000, args.arg1, args.arg2, &outgoing_status,<br>-                          AST_OUTGOING_WAIT, NULL, NULL, NULL, NULL, NULL, NULL,<br>+                               ast_test_flag64(&opts, OPT_ASYNC) ? AST_OUTGOING_NO_WAIT : AST_OUTGOING_WAIT,<br>+                            NULL, NULL, NULL, NULL, NULL, NULL,<br>                           predial_callee);<br>      }<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8623">change 8623</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8623"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I7fc2facd77079abc6321f44e8bcd4e39298de2ae </div>
<div style="display:none"> Gerrit-Change-Number: 8623 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Russell Bryant <russell@russellbryant.net> </div>