Discussion:
[Asterisk-Users] How to send Fax from Asterisk
Vic
2005-07-20 12:10:21 UTC
Permalink
Hi,

I was wondering if somebody could help me with getting Asterisk to SEND a fax.

Here is what I want to do:

We have three offices and people always have trouble getting to it, so I want to have a simple way to people to call in and ask for a map for office A, B or C.

The way it would work is like this:

1. Person will call our phone number

2. Asterisk will answer and ask them to press 0 to talk to operator or 1 to receive a map how to get to our office.

3. User will press 1 and then he will be asked to press 1 for Office 1 map, 2 for Office 2 map and 3 for Office 3 map.

4. User presses 1 and then Asterisk will start sending fax for Map 1

So,

1. Is it possible?

2. How and what do I need to download and install?

I think it can be done using fax and auto-attendant components, but ... which ones?

I would really appreciate your help with this one.

Thanks!

Vic
Bill Merriam
2005-07-20 16:58:28 UTC
Permalink
Post by Vic
1. Person will call our phone number
2. Asterisk will answer and ask them to press 0 to talk to operator or
1 to receive a map how to get to our office.
3. User will press 1 and then he will be asked to press 1 for Office 1
map, 2 for Office 2 map and 3 for Office 3 map.
4. User presses 1 and then Asterisk will start sending fax for Map 1
So,
1. Is it possible?
2. How and what do I need to download and install?
I think it can be done using fax and auto-attendant components, but ... which ones?
I would really appreciate your help with this one.
Thanks!
Vic
There is a txfax application available from
http://www.soft-switch.org/installing-spandsp.html

Of course, your plan requires that they call from their fax machine. It
would also be possible to ask them to enter their fax number and call
that number to deliver the fax. The wiki has information on originating
calls from agi scripts.

Bill
Tom Rymes
2005-07-20 19:24:05 UTC
Permalink
If you install Hylafax, I'm sure that you could have the person
choose which map they want and then enter their fax number. You can
then call sendfax from extensions.conf with the relevant data to send
the fax. Hylafax would then send the fax out using its own dedicated
analog or t1/e1/whatever modem (ie: not through asterisk b/c that
seems to be unreliable at best).

Tom
Post by Bill Merriam
Post by Vic
1. Person will call our phone number
2. Asterisk will answer and ask them to press 0 to talk to
operator or
1 to receive a map how to get to our office.
3. User will press 1 and then he will be asked to press 1 for
Office 1
map, 2 for Office 2 map and 3 for Office 3 map.
4. User presses 1 and then Asterisk will start sending fax for Map 1
So,
1. Is it possible?
2. How and what do I need to download and install?
I think it can be done using fax and auto-attendant components, but ... which ones?
I would really appreciate your help with this one.
Thanks!
Vic
There is a txfax application available from
http://www.soft-switch.org/installing-spandsp.html
Of course, your plan requires that they call from their fax
machine. It
would also be possible to ask them to enter their fax number and call
that number to deliver the fax. The wiki has information on
originating
calls from agi scripts.
Bill
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
http://lists.digium.com/mailman/listinfo/asterisk-users
Vic
2005-07-21 04:00:34 UTC
Permalink
Dear all,
I had Tom Rymes and several others suggest how I can implement sending fax using Asterisk. The idea is to have On-Demand-Fax.
Unfortunately, I wrote down the wrong workflow: the real one is:

1. Person will call our phone number
2. He will be asked to press 1 for Office 1 map, 2 for Office 2 map and 3 for Office 3 map.
3. User presses 1.

4. User is asked to enter his phone number.

5. User enters his phone number and hangs up.

6. Asterisk calls the number entered by user and sends a fax.

Can it be done?

Thanks,

Vic

Tom Rymes <***@rymesheating.com> wrote:If you install Hylafax, I'm sure that you could have the person
choose which map they want and then enter their fax number. You can
then call sendfax from extensions.conf with the relevant data to send
the fax. Hylafax would then send the fax out using its own dedicated
analog or t1/e1/whatever modem (ie: not through asterisk b/c that
seems to be unreliable at best).

Tom
Post by Bill Merriam
Post by Vic
1. Person will call our phone number
2. Asterisk will answer and ask them to press 0 to talk to
operator or
1 to receive a map how to get to our office.
3. User will press 1 and then he will be asked to press 1 for
Office 1
map, 2 for Office 2 map and 3 for Office 3 map.
4. User presses 1 and then Asterisk will start sending fax for Map 1
So,
1. Is it possible?
2. How and what do I need to download and install?
I think it can be done using fax and auto-attendant components, but
... which ones?
I would really appreciate your help with this one.
Thanks!
Vic
There is a txfax application available from
http://www.soft-switch.org/installing-spandsp.html
Of course, your plan requires that they call from their fax
machine. It
would also be possible to ask them to enter their fax number and call
that number to deliver the fax. The wiki has information on
originating
calls from agi scripts.
Bill
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
Asterisk-***@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Dave Cotton
2005-07-21 06:35:11 UTC
Permalink
Post by Vic
Dear all,
1. Person will call our phone number
2. He will be asked to press 1 for Office 1 map, 2 for Office 2 map
and 3 for Office 3 map.
3. User presses 1.
4. User is asked to enter his phone number.
5. User enters his phone number and hangs up.
6. Asterisk calls the number entered by user and sends a fax.
Can it be done?
If you install Hylafax, I'm sure that you could have the
person
choose which map they want and then enter their fax number. You can
then call sendfax from extensions.conf with the relevant data to send
the fax. Hylafax would then send the fax out using its own dedicated
analog or t1/e1/whatever modem (ie: not through asterisk b/c that
seems to be unreliable at best).
The wiki has information on
Post by Bill Merriam
originating
calls from agi scripts.
Bill
_______________________________________________
Sorry for the bad quoting but the original has a strange format.

IMHO the above would answer your needs. Hylafax is a specialist in
faxing, it just works. All you need is a bit of glue, the hooks are
already in place.
--
Dave Cotton <***@linuxautrement.com>
Tom Rymes
2005-07-21 12:48:36 UTC
Permalink
Post by Vic
Dear all,
I had Tom Rymes and several others suggest how I can implement
sending fax using Asterisk. The idea is to have On-Demand-Fax.
1. Person will call our phone number
2. He will be asked to press 1 for Office 1 map, 2 for Office 2
map and 3 for Office 3 map.
3. User presses 1.
4. User is asked to enter his phone number.
5. User enters his phone number and hangs up.
6. Asterisk calls the number entered by user and sends a fax.
Can it be done?
Yes. My earlier suggestion still stands:

1.) Install Hylafax and connect it with a T1 or analog modem,
depending on your volume needs. You should not send hylafax calls
through your asterisk server, AFAICT.
2.) Set up the extension in your dialplan to do what you mention
above, take the appropriate map file (in TIF format, or PS) and the
entered phone number and then call Hylafax's sendfax program from
your dialplan with the correct map filename and the entered phone
number as arguments.
3.) Lather, rinse, repeat if needed.

Tom
Bryce Chidester
2005-07-21 14:07:56 UTC
Permalink
Post by Vic
Dear all,
I had Tom Rymes and several others suggest how I can implement sending
fax using Asterisk. The idea is to have On-Demand-Fax.
1. Person will call our phone number
2. He will be asked to press 1 for Office 1 map, 2 for Office 2 map
and 3 for Office 3 map.
3. User presses 1.
4. User is asked to enter his phone number.
5. User enters his phone number and hangs up.
6. Asterisk calls the number entered by user and sends a fax.
Can it be done?
Thanks,
Vic
Sure, quite easily. Setup said menus that direct through the dialplan
and terminate at something as simple as a System() that executes a
simple shell script that will then create a .call file
in /var/spool/asterisk/outgoing/, specifying the outgoing channel to use
and Application: TxFax. This is mine basically, to give you a start.
------------------------------------------------
exten => x,1,System(/usr/local/bin/asterisk-sendfax "${FAXMACHINE}" "${FAXFILE}" "${LOCALSTATIONID}">/var/spool/asterisk/outgoing/${UNIQUEID}.call)
------------------------------------------------
#/usr/local/bin/asterisk-sendfax "${FAXMACHINE}" "${FAXFILE}" "${LOCALSTATIONID}"
echo "Channel: $1
MaxRetries: 0
WaitTime: 20
Context: incoming-fax
Application: TxFax
Data: $2|caller
SetVar: LOCALSTATIONID=$3"
------------------------------------------------
This was just a quick and dirty hack I made to try out TxFax and it
works. Just a programming note: as stated on the wiki and in various
docs, it's unwise to output straight into a call file due t timing with
when Asterisk may read it and it isn't finished being written, thus it
is always wisest to output to a temporary directory, then perform a mv
operation to place the whole file at once in the directory (not to
mention, its presence isn't written to the filesystem until all the data
is written).

Good luck!
--
-Bryce
***@rhinoequipment.com

NOTICE: The views expressed in this e-mail do not neccesarily reflect
those of my employer, this company, or its employees. This is a personal
e-mail and as such, the opinions expressed are my own.
Continue reading on narkive:
Loading...