sending fax

bono056

Joined
Jan 19, 2010
Messages
70
Likes
0
Points
0
#1
hi
i want to send a fax using my IP-PBX. i followed these steps:
1-defining an extension for fax (720)
2-defing a visrtual fax
3-set one of my trunk lines(for example 88888888) dedicatedto faxes, so when someone calls this 88888888, asterix conducte caller to 720 (my virtual fax).
4-wroting a dial plan, so when i dial 1234, this context will run:
Code:
exten => 1234,1,Answer()
exten => 1234,n,Background(hellp)
exten => 1234,n,Dial(DAHDI/g0/88888888)

exten => 1234,n,SetVar(FAXFILE=/tmp/fax1.tif)
exten => 1234,n,txfax(${FAXFILE}) 

exten => 1234,n,Hangup()
i also tested this one

Code:
exten => 1234,1,Answer()
exten => 1234,n,Background(hellp)
exten => 1234,n,Dial(DAHDI/g0/88888888)

exten => fax,1,SetVar(FAXFILE=/tmp/fax1.tif)
exten => fax,2,txfax(${FAXFILE}) 

exten => 1234,n,Hangup()
but neither of them didnt work.
when asterisk dial 88888888(line 3) i hear fax beep, but after that nothing happening.
any guidance?
 

fmvillares

Joined
Sep 8, 2007
Messages
1,785
Likes
0
Points
0
#2
you re mixing hylafax with tx fax app...
to send faxes install winprint hylafax in any windows pc, point it to asterisk server add in ip hylafax permits the ip of that pc and then youre ready to send faxes...

other issues is that not any carriers could send faxes over and ip pbx...sip carriers almost never could carry faxes unless they ll have support for t38 and this option is not incluided in hylafax so you need a t38 ata or t38 fax...if you have analog lines they will need to have good quality to carry a 9600 bps signal

see ya
 

bono056

Joined
Jan 19, 2010
Messages
70
Likes
0
Points
0
#3
tanx fmvillares, i kind of mess up with these fax things.
i was thinkung about sending fax via SpanDSP. i think txfax & rxfax are asterisk application added by SpanDSP, am i correct?
& what i am going to do is sending a tiff file to a caller, when he choose an option in IVR system.
i have a menu, & i want if the caller for example dial 6#, send him a fax via dialed trunk.
it must be kind of voice/fax switch, that i think asterisk support.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#4
make sure that asterisk has access to the .tif file(s) and for all sorts of reasons don't use /tmp, /var/spool/asterisk/fax is probably a better choice and chown it to asterisk:asterisk
 

bono056

Joined
Jan 19, 2010
Messages
70
Likes
0
Points
0
#5
tanX dicko, but do you think my way for doing such a task is ok? i mean using txfax. & i wonder is it possible to do it with hyla?
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#6
Avantfax is a very sophisticated interface for sending and receiving faxes, it really needs "interaction" . for a simple "fax on demand" application that you described I would stick with app_txfax and spend the time to make sure the .tif files are seen as acceptable faxes (G3 compression) and readable by asterisk.

regards

dicko
 

bono056

Joined
Jan 19, 2010
Messages
70
Likes
0
Points
0
#7
hi
i have spandsp-0.0.4-3, & also i moved my tif file to /var/spool/asterisk/fax/ & chown it tosterisk, but it didnet work out again. i wonder how can i track the problem, error or log file which help me going through the problem.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#8
In a strangely ironic way, it might be a good idea to install avantfax first, even if you won't ultimately need it.

It will enable you to test easily if your setup will support faxes at all, all the FXO tuning you can worry about later, but it will give you a stable platform in which you can test your spandsp/dahdi connections to real fax machines.

It will also install a few tools that you will find useful like pdf2fax (ghostscript) that will ensure that your generated tif's are "correct" in format.

dicko
 

bono056

Joined
Jan 19, 2010
Messages
70
Likes
0
Points
0
#9
thanX, i'm gonna install avanta.
another thing is, with my designed dial plan i send fax with spanDSP, & recieve it with HylaFax. in HylaFax log folder (/var/spool/hylafax/log/), there is a file for every attempt to send/recieve file.
i put one of them, maybe it helps more experienced user to find the problem:
Code:
Feb 27 18:32:30.54: [ 3324]: SESSION BEGIN 000000039 
Feb 27 18:32:30.54: [ 3324]: HylaFAX (tm) Version 4.3.3
Feb 27 18:32:30.54: [ 3324]: CallID: "88888888" "88888888" "<NONE>" "s"
Feb 27 18:32:30.54: [ 3324]: MODEM set XON/XOFF/FLUSH: input ignored, output disabled
Feb 27 18:32:30.54: [ 3324]: <-- [4:ATA\r]
Feb 27 18:32:34.26: [ 3324]: --> [7]
Feb 27 18:32:34.26: [ 3324]: ANSWER: FAX CONNECTION  DEVICE '/dev/ttyIAX1'
Feb 27 18:32:34.26: [ 3324]: STATE CHANGE: ANSWERING -> RECEIVING
Feb 27 18:32:34.26: [ 3324]: RECV FAX: begin
Feb 27 18:32:34.26: [ 3324]: <-- HDLC<32:FF C0 04 B5 00 AA 12 9E 36 86 62 82 1A 04 14 2E B6 94 04 6A A6 4E CE 96 F6 76 04 2C 74 CC 74 CC>
Feb 27 18:32:34.26: [ 3324]: <-- data [32]
Feb 27 18:32:34.26: [ 3324]: <-- data [2]
Feb 27 18:32:35.22: [ 3324]: --> [7]
Feb 27 18:32:35.22: [ 3324]: <-- HDLC<23:FF C0 02 86 26 A6 72 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04>
Feb 27 18:32:35.22: [ 3324]: <-- data [23]
Feb 27 18:32:35.22: [ 3324]: <-- data [2]
Feb 27 18:32:35.96: [ 3324]: --> [7]
Feb 27 18:32:35.96: [ 3324]: <-- HDLC<13:FF C8 01 00 73 5F 23 01 FB C1 01 01 18>
Feb 27 18:32:35.96: [ 3324]: <-- data [13]
Feb 27 18:32:35.96: [ 3324]: <-- data [2]
Feb 27 18:32:36.54: [ 3324]: --> [2]
Feb 27 18:32:36.54: [ 3324]: <-- [9:AT+FRH=3\r]
Feb 27 18:32:43.54: [ 3324]: --> [0:]
Feb 27 18:32:43.54: [ 3324]: MODEM <Empty line>
Feb 27 18:32:43.54: [ 3324]: MODEM TIMEOUT: waiting for v.21 carrier
Feb 27 18:32:43.54: [ 3324]: <-- data [1]
Feb 27 18:32:43.56: [ 3324]: --> [2]
Feb 27 18:32:43.56: [ 3324]: DELAY 1500 ms
Feb 27 18:32:45.06: [ 3324]: <-- [9:AT+FTH=3\r]
Feb 27 18:32:45.06: [ 3324]: --> [7]
Feb 27 18:32:45.06: [ 3324]: <-- HDLC<32:FF C0 04 B5 00 AA 12 9E 36 86 62 82 1A 04 14 2E B6 94 04 6A A6 4E CE 96 F6 76 04 2C 74 CC 74 CC>
Feb 27 18:32:45.06: [ 3324]: <-- data [32]
Feb 27 18:32:45.06: [ 3324]: <-- data [2]
Feb 27 18:32:46.84: [ 3324]: --> [7]
Feb 27 18:32:46.84: [ 3324]: <-- HDLC<23:FF C0 02 86 26 A6 72 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04>
Feb 27 18:32:46.84: [ 3324]: <-- data [23]
Feb 27 18:32:46.84: [ 3324]: <-- data [2]
Feb 27 18:32:47.58: [ 3324]: --> [7]
Feb 27 18:32:47.58: [ 3324]: <-- HDLC<13:FF C8 01 00 73 5F 23 01 FB C1 01 01 18>
Feb 27 18:32:47.58: [ 3324]: <-- data [13]
Feb 27 18:32:47.58: [ 3324]: <-- data [2]
Feb 27 18:32:48.16: [ 3324]: --> [2]
Feb 27 18:32:48.16: [ 3324]: <-- [9:AT+FRH=3\r]
Feb 27 18:32:55.17: [ 3324]: --> [0:]
Feb 27 18:32:55.17: [ 3324]: MODEM <Empty line>
Feb 27 18:32:55.17: [ 3324]: MODEM TIMEOUT: waiting for v.21 carrier
Feb 27 18:32:55.17: [ 3324]: <-- data [1]
Feb 27 18:32:55.18: [ 3324]: --> [2]
Feb 27 18:32:55.18: [ 3324]: DELAY 1500 ms
Feb 27 18:32:56.68: [ 3324]: <-- [9:AT+FTH=3\r]
Feb 27 18:32:56.68: [ 3324]: --> [7]
Feb 27 18:32:56.68: [ 3324]: <-- HDLC<32:FF C0 04 B5 00 AA 12 9E 36 86 62 82 1A 04 14 2E B6 94 04 6A A6 4E CE 96 F6 76 04 2C 74 CC 74 CC>
Feb 27 18:32:56.68: [ 3324]: <-- data [32]
Feb 27 18:32:56.68: [ 3324]: <-- data [2]
Feb 27 18:32:58.46: [ 3324]: --> [7]
Feb 27 18:32:58.46: [ 3324]: <-- HDLC<23:FF C0 02 86 26 A6 72 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04>
Feb 27 18:32:58.46: [ 3324]: <-- data [23]
Feb 27 18:32:58.46: [ 3324]: <-- data [2]
Feb 27 18:32:59.20: [ 3324]: --> [7]
Feb 27 18:32:59.20: [ 3324]: <-- HDLC<13:FF C8 01 00 73 5F 23 01 FB C1 01 01 18>
Feb 27 18:32:59.20: [ 3324]: <-- data [13]
Feb 27 18:32:59.20: [ 3324]: <-- data [2]
Feb 27 18:32:59.78: [ 3324]: --> [2]
Feb 27 18:32:59.78: [ 3324]: <-- [9:AT+FRH=3\r]
Feb 27 18:33:06.79: [ 3324]: --> [0:]
Feb 27 18:33:06.79: [ 3324]: MODEM <Empty line>
Feb 27 18:33:06.79: [ 3324]: MODEM TIMEOUT: waiting for v.21 carrier
Feb 27 18:33:06.79: [ 3324]: <-- data [1]
Feb 27 18:33:06.80: [ 3324]: --> [2]
Feb 27 18:33:06.80: [ 3324]: DELAY 1500 ms
Feb 27 18:33:08.30: [ 3324]: <-- [9:AT+FTH=3\r]
Feb 27 18:33:08.30: [ 3324]: --> [7]
Feb 27 18:33:08.30: [ 3324]: <-- HDLC<32:FF C0 04 B5 00 AA 12 9E 36 86 62 82 1A 04 14 2E B6 94 04 6A A6 4E CE 96 F6 76 04 2C 74 CC 74 CC>
Feb 27 18:33:08.30: [ 3324]: <-- data [32]
Feb 27 18:33:08.30: [ 3324]: <-- data [2]
Feb 27 18:33:10.08: [ 3324]: --> [7]
Feb 27 18:33:10.08: [ 3324]: <-- HDLC<23:FF C0 02 86 26 A6 72 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04>
Feb 27 18:33:10.08: [ 3324]: <-- data [23]
Feb 27 18:33:10.08: [ 3324]: <-- data [2]
Feb 27 18:33:10.82: [ 3324]: --> [7]
Feb 27 18:33:10.82: [ 3324]: <-- HDLC<13:FF C8 01 00 73 5F 23 01 FB C1 01 01 18>
Feb 27 18:33:10.82: [ 3324]: <-- data [13]
Feb 27 18:33:10.82: [ 3324]: <-- data [2]
Feb 27 18:33:11.40: [ 3324]: --> [2]
Feb 27 18:33:11.40: [ 3324]: <-- [9:AT+FRH=3\r]
Feb 27 18:33:18.41: [ 3324]: --> [0:]
Feb 27 18:33:18.41: [ 3324]: MODEM <Empty line>
Feb 27 18:33:18.41: [ 3324]: MODEM TIMEOUT: waiting for v.21 carrier
Feb 27 18:33:18.41: [ 3324]: <-- data [1]
Feb 27 18:33:18.42: [ 3324]: --> [2]
Feb 27 18:33:18.42: [ 3324]: RECV FAX: No answer (T.30 T1 timeout)
Feb 27 18:33:18.42: [ 3324]: RECV FAX: end
Feb 27 18:33:18.42: [ 3324]: SESSION END
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#10
Hi Bono056,
You get many 'MODEM <Empty line>', it looks as if your audio has some cuts.
Which kind of trunk are you using to call out?
SIP trunks must be very well fine tuned to get a minimum reliability, don't use it for production. If you need reliable faxing through SIP you will need a T.38 fax or gateway, as Elastix can't terminate T.38, just can act as passthrough.
 

bono056

Joined
Jan 19, 2010
Messages
70
Likes
0
Points
0

bono056

Joined
Jan 19, 2010
Messages
70
Likes
0
Points
0
#12
i use regular analog trunk line to send my fax.
& can u descrive MODEM <Empty Line> & HDLC & data[] in this log? these lines must show something about not sending fax.
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#13

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,887
Members
17,565
Latest member
omarmenichetti
Top