Dialplan command to check gateway status before bridge
Hi all I'm looking for dialplan command to check if selected gateway is up or down I'd like to make some kind of condition: if gateway x status is up than do something Any hints?
Well you can do from shell, something like: fs_cli -x "sofia status gateway example.com" | grep "^State\|^Status" And then make a script that will parse the output.... Regards, Mirko On Mon, Jul 11, 2016 at 5:10 PM, Adam Raszynski <netcentrica@gmail.com> wrote:
Hi all
I'm looking for dialplan command to check if selected gateway is up or down
I'd like to make some kind of condition:
if gateway x status is up than do something
Any hints?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org 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 http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Regards, Mirko
Yes Mirko, for sure but not while making over 100 CPS. I'm looking for generic way to do this from FS dialplan, no shell spawning, hacking etc 2016-07-12 10:09 GMT+02:00 Mirko Brankovic <mirkobrankovic@gmail.com>:
Well you can do from shell, something like: fs_cli -x "sofia status gateway example.com" | grep "^State\|^Status"
And then make a script that will parse the output....
Regards, Mirko
On Mon, Jul 11, 2016 at 5:10 PM, Adam Raszynski <netcentrica@gmail.com> wrote:
Hi all
I'm looking for dialplan command to check if selected gateway is up or down
I'd like to make some kind of condition:
if gateway x status is up than do something
Any hints?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org 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 http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Regards, Mirko
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org 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 http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
There is an API call : sofia_gateway_data You can use it inside a dialplan to get the value of a gateway variable. Should give you the status. I tried it, but it is not working on my platform, using CentOS6 packages from the okay repo. Certainly a compilation question (I didn't take time to fix this at the moment).
Answer to my own question found in mailing list archive, maybe someone finds this helpful: http://marc.info/?l=freeswitch-users&m=129680941630897 Testet works OK 2016-07-12 13:03 GMT+02:00 Dominique Jeannerod < dominique.jeannerod@interact-iv.com>:
There is an API call : sofia_gateway_data You can use it inside a dialplan to get the value of a gateway variable. Should give you the status.
I tried it, but it is not working on my platform, using CentOS6 packages from the okay repo. Certainly a compilation question (I didn't take time to fix this at the moment).
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org 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 http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Adam Raszynski
-
Dominique Jeannerod
-
Mirko Brankovic