[Freeswitch-dev] tone_detect

Cesar Cepeda cesar at auronix.com
Mon Sep 8 15:39:17 EDT 2008


Hi all,

I'm trying to detect a fax using tone_detect but I'm getting an unexpected
behavior (at least unexpected for me).  Could someone tell what I'm doing
wrong?

My dialplan is this:

<context name="default">
  <extension name="fax_detected">
	<condition field="destination_number" expression="fax_detected">
		<action application="stop_tone_detect" data="fax"/>
  		<action application="hangup" data="NORMAL_CLEARING"/>
	</condition>
  </extension>


  <extension name="detect_fax">
    <condition field="destination_number" expression="detect_fax">
	<action application="record_session"
data="c:\\eraseme\\prueba.wav"/>
	<action application="tone_detect" data="fax 1100 r +30000 transfer
fax_detected"/>
	<action application="playback"
data="$${DirAudios}_someMessage.WAV"/>
	<action application="hangup" data="NORMAL_CLEARING"/>
    </condition>
  </extension>
</context>

I'm originating a call with "detect_fax" as the target extension.

What I get is the following:

* The call starts, and it is being recorded on file
* The message "_somemessage.wav" starts playing, the fax machine is ringing
* The fax machine answers and gives fax tone
* As soon as you can hear the fax tone the playing is interrupted
* When the fax hangs up without being able to do the handshake, and you hear
the disconnect tone, then the playing resumes.
* The playing ends, fs hangs up the channel normally.

When you hear the recording you can hear the message playing then a few
milliseconds of fax tone and the rest of the message (all the time the play
was interrupted, the recording is also interrupted).

There is also nothing logged to the console when the playing is interrupted.

Thank for any comments.

Bye.

Cesar Cepeda.




More information about the Freeswitch-dev mailing list