set the hangup hook just on the a leg<span></span><br><br>On Saturday, September 3, 2016, Dmitry Mordovin <<a href="mailto:d.mordovin@dwide.com">d.mordovin@dwide.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
I run command from ESL, connect to 8021 port and send command.<br>
<br>
I know about api_hangup_hook, in my case it will fire two times for
each call (if first supplier fail)<br>
But I want event when originate complete done, to be sure no one
tries to call any more.<br>
<br>
<br>
----------------------<br>
How are you running api commands, there might be a way to do it like
you<br>
are saying. That being said, originate command finishes not when
the call<br>
ends, but when we relieve media from the other end, or depending on<br>
settings sometimes even sooner. You probably want to look at<br>
api_hangup_hook<br>
<br>
<br>
<br>
<div>On 09/03/2016 08:02 PM, Dmitry Mordovin
wrote:<br>
</div>
<blockquote type="cite">Hello
<br>
<br>
I want to execute two commands with bgapi, but can't find solution
in FreeSWITCH manual or google.
<br>
<br>
bgapi expand originate
<leg_timeout=30,continue_on_<wbr>fail=true>[origination_caller_<wbr>id_name='test']sofia/gateway/<wbr>first_supplier/12345@first_<wbr>supplier|[origination_caller_<wbr>id_name='test']sofia/gateway/<wbr>second_supplier/12345@second_<wbr>supplier
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 'curl' to be executed after 'originate' done (call
disconnected).
<br>
Like linux shell can run commands one by one, just separate with
';'
<br>
<br>
Is it possible? If so, how can I do it?
<br>
<br>
</blockquote>
<br>
<br>
<br>
</div>
</blockquote>