[Freeswitch-dev] fax tone detection inside app
msc at freeswitch.org
Wed Oct 14 11:32:12 PDT 2009
On Wed, Oct 14, 2009 at 11:11 AM, Peter Volchek
<pvolchek at voicemobility.com>wrote:
> Could anyone help me how to setup the event handler within lua script?
> My dialplan is simply configured to execute an application for the DID
> All code processing is being happened within lua code.
> Now, consider the following scenario.
> - The call comes in
> - My script starts
> - The prompt(greeting) is being played "No one is available at a moment,
> please leave a message or start sending your fax now"
> Are there any ways, to find out at this point, whether fax negotiation
> has started?
> The following pseudo code would explain my concern:
> if ( getEvent("Detected-Tone") == "fax" )
> You can use the tone_detect app per the wiki (
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_tone_detect) to detect
the tone and act accordingly. You just need to decide what to do while
waiting to detect the tone. Personally, I don't like doing too much call
control inside a script, but YMMV.
Not having tried it myself I would suggest trying something simple, like
using the tone_detect app to set a chan var and then have your script keep
checking that chan var until your timeout has expired or it sees the fax
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FreeSWITCH-dev