bgapi with two commands one by one
Hello I want to execute two commands with bgapi, but can't find solution in FreeSWITCH manual or google. bgapi expand originate <leg_timeout=30,continue_on_fail=true>[origination_caller_id_name='test']sofia/gateway/first_supplier/12345@first_supplier|[origination_caller_id_name='test']sofia/gateway/second_supplier/12345@second_supplier 00294539; curl http://127.0.0.1/cgi?e=originate_done I want command 'curl' to be executed after 'originate' done (call disconnected). Like linux shell can run commands one by one, just separate with ';' Is it possible? If so, how can I do it?
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 On Saturday, September 3, 2016, Dmitry Mordovin <d.mordovin@dwide.com> wrote:
Hello
I want to execute two commands with bgapi, but can't find solution in FreeSWITCH manual or google.
bgapi expand originate <leg_timeout=30,continue_on_fail=true>[origination_caller_ id_name='test']sofia/gateway/first_supplier/12345@first_ supplier|[origination_caller_id_name='test']sofia/gateway/ second_supplier/12345@second_supplier 00294539; curl http://127.0.0.1/cgi?e=originate_done
I want command 'curl' to be executed after 'originate' done (call disconnected). Like linux shell can run commands one by one, just separate with ';'
Is it possible? If so, how can I do it?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <javascript:;> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <javascript:;> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hello I want to execute two commands with bgapi, but can't find solution in FreeSWITCH manual or google. bgapi expand originate <leg_timeout=30,continue_on_fail=true>[origination_caller_id_name='test']sofia/gateway/first_supplier/12345@first_supplier|[origination_caller_id_name='test']sofia/gateway/second_supplier/12345@second_supplier 00294539; curl http://127.0.0.1/cgi?e=originate_done I want command 'curl' to be executed after 'originate' done (call disconnected). Like linux shell can run commands one by one, just separate with ';' Is it possible? If so, how can I do it?
I run command from ESL, connect to 8021 port and send command. I know about api_hangup_hook, in my case it will fire two times for each call (if first supplier fail) But I want event when originate complete done, to be sure no one tries to call any more. ---------------------- 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 On 09/03/2016 08:02 PM, Dmitry Mordovin wrote:
Hello
I want to execute two commands with bgapi, but can't find solution in FreeSWITCH manual or google.
bgapi expand originate <leg_timeout=30,continue_on_fail=true>[origination_caller_id_name='test']sofia/gateway/first_supplier/12345@first_supplier|[origination_caller_id_name='test']sofia/gateway/second_supplier/12345@second_supplier 00294539; curl http://127.0.0.1/cgi?e=originate_done
I want command 'curl' to be executed after 'originate' done (call disconnected). Like linux shell can run commands one by one, just separate with ';'
Is it possible? If so, how can I do it?
set the hangup hook just on the a leg On Saturday, September 3, 2016, Dmitry Mordovin <d.mordovin@dwide.com> wrote:
I run command from ESL, connect to 8021 port and send command.
I know about api_hangup_hook, in my case it will fire two times for each call (if first supplier fail) But I want event when originate complete done, to be sure no one tries to call any more.
---------------------- 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
On 09/03/2016 08:02 PM, Dmitry Mordovin wrote:
Hello
I want to execute two commands with bgapi, but can't find solution in FreeSWITCH manual or google.
bgapi expand originate <leg_timeout=30,continue_on_ fail=true>[origination_caller_id_name='test']sofia/gateway/ first_supplier/12345@first_supplier|[origination_caller_ id_name='test']sofia/gateway/second_supplier/12345@second_supplier 00294539; curl http://127.0.0.1/cgi?e=originate_done
I want command 'curl' to be executed after 'originate' done (call disconnected). Like linux shell can run commands one by one, just separate with ';'
Is it possible? If so, how can I do it?
participants (2)
-
Dmitry Mordovin
-
Michael Jerris