How are you running api commands, there might be a way to do it like you are saying.  That being said, originate command finishes not when the call ends, but when we relieve media from the other end, or depending on settings sometimes even sooner.  You probably want to look at api_hangup_hook<span></span><br><br>On Saturday, September 3, 2016, Dmitry Mordovin &lt;<a href="mailto:d.mordovin@dwide.com">d.mordovin@dwide.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello<br>
<br>
I want to execute two commands with bgapi, but can&#39;t find solution in<br>
FreeSWITCH manual or google.<br>
<br>
bgapi expand originate<br>
&lt;leg_timeout=30,continue_on_<wbr>fail=true&gt;[origination_caller_<wbr>id_name=&#39;test&#39;]sofia/gateway/<wbr>first_supplier/12345@first_<wbr>supplier|[origination_caller_<wbr>id_name=&#39;test&#39;]sofia/gateway/<wbr>second_supplier/12345@second_<wbr>supplier<br>
00294539; curl <a href="http://127.0.0.1/cgi?e=originate_done" target="_blank">http://127.0.0.1/cgi?e=<wbr>originate_done</a><br>
<br>
I want command &#39;curl&#39; to be executed after &#39;originate&#39; done (call<br>
disconnected).<br>
Like linux shell can run commands one by one, just separate with &#39;;&#39;<br>
<br>
Is it possible? If so, how can I do it?<br>
<br>
<br>
______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;consulting@freeswitch.org&#39;)">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;FreeSWITCH-users@lists.freeswitch.org&#39;)">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote>