Notification of an event in the dialplan
I'm currently using FreeSwitch between two systems as a "rate limiter' with the limit application. I bring calls in, run through a hash to identify a loop - if my hash variable is met, I transfer the call to a new extension where I log the event and return a 503 to the source. If not I return a 302 to the source to send the call on its way. I'd like a way to identify these events to our NOC via email or a SNMP trap but I am not sure the best way to do it. The alert would fall into the 503 extension. What is the best way to accomplish this? I'd like to keep the call flow as simple as possible. Any ideas? Thanks - - Chris
A simple approach might be to use the system app: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_system If you have a simple shell script that launches an email that would a quick and easy way to get going. -MC On Mon, May 20, 2013 at 1:25 PM, Christopher Aloi <chris.aloi@gmail.com>wrote:
I'm currently using FreeSwitch between two systems as a "rate limiter' with the limit application.
I bring calls in, run through a hash to identify a loop - if my hash variable is met, I transfer the call to a new extension where I log the event and return a 503 to the source. If not I return a 302 to the source to send the call on its way.
I'd like a way to identify these events to our NOC via email or a SNMP trap but I am not sure the best way to do it.
The alert would fall into the 503 extension.
What is the best way to accomplish this?
I'd like to keep the call flow as simple as possible.
Any ideas?
Thanks -
- Chris
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
I was thinking about that - my concern was "and waits for the result". Could that potentially hang call processing? If I pass to a python -> sendmail script and wait for the result, if my script hangs, I would have these calls waiting for the result (right?) On Monday, May 20, 2013, Michael Collins wrote:
A simple approach might be to use the system app: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_system
If you have a simple shell script that launches an email that would a quick and easy way to get going.
-MC
On Mon, May 20, 2013 at 1:25 PM, Christopher Aloi <chris.aloi@gmail.com<javascript:_e({}, 'cvml', 'chris.aloi@gmail.com');>
wrote:
I'm currently using FreeSwitch between two systems as a "rate limiter' with the limit application.
I bring calls in, run through a hash to identify a loop - if my hash variable is met, I transfer the call to a new extension where I log the event and return a 503 to the source. If not I return a 302 to the source to send the call on its way.
I'd like a way to identify these events to our NOC via email or a SNMP trap but I am not sure the best way to do it.
The alert would fall into the 503 extension.
What is the best way to accomplish this?
I'd like to keep the call flow as simple as possible.
Any ideas?
Thanks -
- Chris
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <javascript:_e({}, 'cvml', 'consulting@freeswitch.org');> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <javascript:_e({}, 'cvml', '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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
Hmm, this looks promising: http://wiki.freeswitch.org/wiki/Mod_commands#bg_system Execute a system command in the background. Usage: bg_system <command> Please update the wiki if you get more information about how that works... -Avi On Tue, May 21, 2013 at 2:22 AM, Christopher Aloi <chris.aloi@gmail.com>wrote:
I was thinking about that - my concern was "and waits for the result". Could that potentially hang call processing? If I pass to a python -> sendmail script and wait for the result, if my script hangs, I would have these calls waiting for the result (right?)
On Monday, May 20, 2013, Michael Collins wrote:
A simple approach might be to use the system app: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_system
If you have a simple shell script that launches an email that would a quick and easy way to get going.
-MC
On Mon, May 20, 2013 at 1:25 PM, Christopher Aloi <chris.aloi@gmail.com>wrote:
I'm currently using FreeSwitch between two systems as a "rate limiter' with the limit application.
I bring calls in, run through a hash to identify a loop - if my hash variable is met, I transfer the call to a new extension where I log the event and return a 503 to the source. If not I return a 302 to the source to send the call on its way.
I'd like a way to identify these events to our NOC via email or a SNMP trap but I am not sure the best way to do it.
The alert would fall into the 503 extension.
What is the best way to accomplish this?
I'd like to keep the call flow as simple as possible.
Any ideas?
Thanks -
- Chris
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
Yeah, this should work. OTTOMH I'd say do this: <action application="set" data="res=${bg_system(/path/to/script.py arg1 arg2)}"/> Let us know how that works... -MC On Mon, May 20, 2013 at 10:40 PM, Avi Marcus <avi@avimarcus.net> wrote:
Hmm, this looks promising: http://wiki.freeswitch.org/wiki/Mod_commands#bg_system Execute a system command in the background.
Usage: bg_system <command>
Please update the wiki if you get more information about how that works...
-Avi
On Tue, May 21, 2013 at 2:22 AM, Christopher Aloi <chris.aloi@gmail.com>wrote:
I was thinking about that - my concern was "and waits for the result". Could that potentially hang call processing? If I pass to a python -> sendmail script and wait for the result, if my script hangs, I would have these calls waiting for the result (right?)
On Monday, May 20, 2013, Michael Collins wrote:
A simple approach might be to use the system app: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_system
If you have a simple shell script that launches an email that would a quick and easy way to get going.
-MC
On Mon, May 20, 2013 at 1:25 PM, Christopher Aloi <chris.aloi@gmail.com>wrote:
I'm currently using FreeSwitch between two systems as a "rate limiter' with the limit application.
I bring calls in, run through a hash to identify a loop - if my hash variable is met, I transfer the call to a new extension where I log the event and return a 503 to the source. If not I return a 302 to the source to send the call on its way.
I'd like a way to identify these events to our NOC via email or a SNMP trap but I am not sure the best way to do it.
The alert would fall into the 503 extension.
What is the best way to accomplish this?
I'd like to keep the call flow as simple as possible.
Any ideas?
Thanks -
- Chris
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
On Tue, May 21, 2013 at 2:26 PM, Michael Collins <msc@freeswitch.org> wrote:
<action application="set" data="res=${bg_system(/path/to/script.py arg1 arg2)}"/>
It's a little off the subject, but I use luarun in my dialplan to do a CNAM lookup in the background while an IVR is waiting for the caller to make a choice. Luarun runs a LUA script in the background. <action application="set" data="api_result=${luarun cid_bg.lua ${uuid}}"/> -- Steve
participants (4)
-
Avi Marcus
-
Christopher Aloi
-
Michael Collins
-
Steven Schoch