<br><br><div class="gmail_quote">On Mon, Oct 12, 2009 at 4:01 AM, homqua <span dir="ltr">&lt;<a href="mailto:ngay01042005@gmail.com">ngay01042005@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi,<br>
I have implemented the solution for tone detection in wiki, and also answer<br>
the channel before detecting the tone:<br>
&lt;condition field=&quot;destination_number&quot; expression=&quot;^(055138419992)$&quot;&gt;<br>
    &lt;action application=&quot;answer&quot;/&gt;<br>
    &lt;action application=&quot;tone_detect&quot; data=&quot;fax 1100 r +15000 transfer fax<br>
XML default&quot;/&gt;<br>
<br>
<br>
&lt;extension name=&quot;fax&quot;&gt;<br>
      &lt;condition field=&quot;destination_number&quot; expression=&quot;^fax$&quot;&gt;<br>
        &lt;action application=&quot;answer&quot; /&gt;<br>
        &lt;action application=&quot;sleep&quot; data=&quot;1000&quot;/&gt;<br>
        &lt;action application=&quot;rxfax&quot;<br>
data=&quot;/usr/local/freeswitch/storage/fax/${caller_id_number}-${strftime(%Y-%m-%d-%H-%M-%S)}.tiff&quot;/&gt;<br>
    &lt;action application=&quot;set&quot; data=&quot;fax_mode=recv&quot;/&gt;<br>
        &lt;action application=&quot;hangup&quot;/&gt;<br>
      &lt;/condition&gt;<br>
    &lt;/extension&gt;<br>
<br>
<br>
But FS cannot recognize the tone, and therefore cannot move to fax<br>
extension.  Below are the error in FS:<br>
<br>
2009-10-12 10:57:16.702287 [NOTICE] switch_channel.c:602 New Channel<br>
sofia/external/anonymous@anonymous.invalid<br>
[c431f0a3-9231-4724-ba39-9e4ef7edfca2]<br>
2009-10-12 10:57:16.703413 [INFO] mod_dialplan_xml.c:315 Processing<br>
Anonymous-&gt;055138419992 in context public<br>
2009-10-12 10:57:16.719288 [NOTICE] switch_ivr.c:1349 Transfer<br>
sofia/external/anonymous@anonymous.invalid to XML[055138419992@default]<br>
2009-10-12 10:57:16.719288 [INFO] mod_dialplan_xml.c:315 Processing<br>
Anonymous-&gt;055138419992 in context default<br>
2009-10-12 10:57:16.722289 [NOTICE] mod_dptools.c:649 Channel<br>
[sofia/external/anonymous@anonymous.invalid] has been answered<br>
2009-10-12 10:57:16.722289 [NOTICE] mod_dptools.c:1324 Enabling tone<br>
detection &#39;fax&#39; &#39;1100&#39;<br>
2009-10-12 10:57:16.723302 [NOTICE] switch_core_state_machine.c:179 Hangup<br>
sofia/external/anonymous@anonymous.invalid [CS_EXECUTE] [NORMAL_CLEARING]<br>
2009-10-12 10:57:16.740285 [NOTICE] switch_core_session.c:1086 Session 1<br>
(sofia/external/anonymous@anonymous.invalid) Ended<br>
2009-10-12 10:57:16.740285 [NOTICE] switch_core_session.c:1088 Close Channel<br>
sofia/external/anonymous@anonymous.invalid [CS_DESTROY]<br>
<br>
And the trace for SIP messages:  <a href="http://pastebin.com/m4e47e7d9" target="_blank">http://pastebin.com/m4e47e7d9</a><br>
<br>
If anyone has any idea, tell me please.<br>
Thanks.<br></blockquote><div><br>I think the trouble here is that you don&#39;t have anything else in the dialplan after the tone_detect. The tone_detect app is non-block, which means that it doesn&#39;t sit there and wait for a tone. If you want the dialplan to sit and wait then do a sleep app after your tone_detect. The other question I would have is this: what happens if the incoming call is not a fax? What do you want to do then?<br>
<br>-MC<br><br></div></div>