[Freeswitch-users] Detecting a fax

Mark Campbell-Smith mcampbellsmith at gmail.com
Mon Oct 5 21:15:21 PDT 2009


Thanks for your help Mike and Tihomir.

A little more playing around and I found that having <action
application="fax_detect"/> as well as <action
application="tone_detect" data="fax 1100 r +5000 transfer fax XML
features" /> do not work together.

Simply by removing fax_detect, the fax is detected beautifully.

My problem now is trying to email the fax.  I followed the
instructions on the wiki at http://wiki.freeswitch.org/wiki/Mod_fax,
but the dialplan <action application="system" .../> is not executed
after the rxfax command.  I know the script works because if I put the
system command in another part of the dialplan and hard code the
filename to attach, then the email is sent.

    <extension name="receivefax">
      <condition field="destination_number" expression="^receivefax$">
        <action application="answer" />
        <action application="playback" data="silence_stream://2000"/>
        <action application="rxfax"
data="//usr//local//freeswitch//storage//${caller_id_number}-${uuid}.rxfax.tiff"/>
        <action application="system"
data="/usr/local/freeswitch/scripts/emailfax.sh
/usr/local/freeswitch/storage/${caller_id_number}-${uuid}.rxfax.tiff"/>
        <action application="hangup"/>
      </condition>
    </extension>

ideas?
Thanks!

On Tue, Oct 6, 2009 at 1:32 AM, Tihomir Culjaga <tculjaga at gmail.com> wrote:
> hi Mark,
>
> This is an inbound call leg and media channel (so far)  is open in reverse
> direction only (application ringback). I'm afraid you have to answer the
> call to be able to "hear" the fax tone.
>
> T.
>
>
>
> On Mon, Oct 5, 2009 at 2:32 PM, Michael Jerris <mike at jerris.com> wrote:
>>
>> Fax tones are not played by the remote machine until after answer, the
>> tone_detect application starts a media bug that listens for the tone,
>> can you confirm the tone is happening at all.  Maybe the issue here is
>> the timeout, try making that longer, or doing the tone_detect in
>> execute_on_answer
>>
>> Mike
>>
>> On Oct 5, 2009, at 6:28 AM, Mark Campbell-Smith wrote:
>>
>> > Thanks for the response Mike,
>> >
>> > I read that page and this one (among others)
>> > http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_fax_detect, but
>> > I'm still lost.  This is an extract of my dialplan
>> >
>> >    <extension name="Local">
>> >      <condition field="destination_number" expression="^(10[01][0-9])
>> > $">
>> >        <action application="set" data="dialed_extension=$1"/>
>> >        <action application="export" data="dialed_extension=$1"/>
>> >        <action application="set" data="ringback=${au-ring}"/>
>> >        <action application="fax_detect"/>
>> >        <action application="tone_detect" data="fax 1100 r +5000
>> > transfer fax XML features" />
>> >        <action application="set" data="hangup_after_bridge=true"/>
>> >        <action application="set" data="continue_on_fail=true"/>
>> >        <action application="bridge" data="user/${dialed_extension}@$
>> > {domain}"/>
>> >
>> > I would assume that on detecting a fax, the dialplan 'fax' is called
>> > in context features.  This never happens.
>> >
>> > When is the fax tone detected?   Is it while the call is ringing or
>> > can it be detected after the call is answered?  My goal is to be able
>> > to have the same extension for a voice and fax call.  i assume that
>> > the fax 'tones' are standardised and the ones on the wiki are correct?
>> > Also, I guess this doesn't work with media bypass (which I don't
>> > use).
>> >
>> > Thanks!
>> >
>> >
>> > On Mon, Oct 5, 2009 at 9:56 AM, Michael Jerris <mike at jerris.com>
>> > wrote:
>> >> check out
>> >> http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_tone_detect
>> >>
>> >> Note, you can't just have tone_detect as your last iten in the
>> >> dialplan as the call will just get hung up.
>> >>
>> >> Mike
>> >>
>> >> On Oct 4, 2009, at 9:03 AM, Mark Campbell-Smith wrote:
>> >>
>> >>> Hi
>> >>>
>> >>> I was hoping someone could help me to setup the fax detection / tone
>> >>> detection application.
>> >>>
>> >>> I want to be able to transfer an incoming fax to a specific
>> >>> extension.
>> >>> In my default.xml file, I have the following (extracted):
>> >>>
>> >>>    <extension name="1000">
>> >>>      <condition field="destination_number" expression="^(10[01]
>> >>> [0-9])
>> >>> $">
>> >>>        <action application="fax_detect"/>
>> >>>        <action application="tone_detect" data="fax 1100 r +5000
>> >>> transfer fax XML features" />
>> >>>
>> >>> I can't get the fax to be detected and transferred.  Is there any
>> >>> way
>> >>> this can be done?
>> >>>
>> >>> Thanks!
>>
>>
>> _______________________________________________
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>




More information about the FreeSWITCH-users mailing list