[Amportal-users] problems with fax reception using freePBX

Hi have Asterisk running just fine with a single POTS line and a VOIP
line. Recently I have needed to receive some faxes so I’ve installed
iaxmodem and HylaFax, both of which are working fine.

In freePBX I’ve configured extension 3999 to point to the iaxmodem
connection. This works just fine if I connect a computer to the FXS
port and send a fax to x3999, the fax is received and handled just
wonderfully.

Next I configured freePBX to direct calls to IAX/3999 when a fax is
detected.

When I try to send a fax from outside it seems to detect that it is a
fax just fine but does not actually dial the fax extension, just deliver
a ring to the caller.

The only doc I could find on this problem is the link below but it seems
to be stuck at the same point.
http://www.aussievoip.com/wiki/index.php?page=freePBX-HylaFax

Any thoughts or ideas about how to get freePBX to dial the fax
extension? In the console output below I am calling out from a FXS port
(Zap/2-1) via the VOIP line back to the FXO port (Zap/1-1) and
presumably to the fax device. But the fax device (IAX2/3999) never gets
called.

Mike

[root@lenovo etc]# asterisk -r -vvvvvvvc
== Parsing ‘/etc/asterisk/asterisk.conf’: Found
== Parsing ‘/etc/asterisk/extconfig.conf’: Found
Asterisk 1.2.9.1, Copyright © 1999 - 2006 Digium, Inc. and others.
Created by Mark Spencer [email protected]
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘show warranty’ for
details.
This is free software, with components licensed under the GNU General
Public
License version 2 and other licenses; you are welcome to redistribute it
under
certain conditions. Type ‘show license’ for details.

Connected to Asterisk 1.2.9.1 currently running on lenovo (pid = 8189)
Verbosity was 3 and is now 7
– Starting simple switch on ‘Zap/2-1’
– Executing Macro(“Zap/2-1”, “dialout-trunk|2|1xxxxxxxxxx||”) in
new stack
– Executing Set(“Zap/2-1”, “DIAL_TRUNK=2”) in new stack
– Executing Set(“Zap/2-1”, “DIAL_NUMBER=1xxxxxxxxxx”) in new stack
– Executing Set(“Zap/2-1”, “ROUTE_PASSWD=”) in new stack
– Executing GotoIf(“Zap/2-1”, “1?noauth”) in new stack
– Goto (macro-dialout-trunk,s,6)
– Executing Set(“Zap/2-1”, “GROUP()=OUT_2”) in new stack
– Executing Macro(“Zap/2-1”, “user-callerid”) in new stack
– Executing GotoIf(“Zap/2-1”, “0?report”) in new stack
– Executing GotoIf(“Zap/2-1”, “0?start”) in new stack
– Executing Set(“Zap/2-1”, “REALCALLERIDNUM=6002”) in new stack
– Executing NoOp(“Zap/2-1”, “REALCALLERIDNUM is 6002”) in new stack
– Executing Set(“Zap/2-1”, “AMPUSER=”) in new stack
– Executing Set(“Zap/2-1”, “AMPUSERCIDNAME=”) in new stack
– Executing GotoIf(“Zap/2-1”, “1?report”) in new stack
– Goto (macro-user-callerid,s,9)
– Executing NoOp(“Zap/2-1”, “Using CallerID “Channel 2” <6002>”) in
new stack
– Executing Macro(“Zap/2-1”, “record-enable|6002|OUT”) in new stack
– Executing GotoIf(“Zap/2-1”, “0 > 0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing AGI(“Zap/2-1”, “recordingcheck|20060723-185730|
1153695447.0”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20060723-185730|1153695447.0: No AMPUSER db entry for
6002. Not recording
– AGI Script recordingcheck completed, returning 0
– Executing NoOp(“Zap/2-1”, “No recording needed”) in new stack
– Executing Macro(“Zap/2-1”, “outbound-callerid|2”) in new stack
– Executing GotoIf(“Zap/2-1”, “1?start”) in new stack
– Goto (macro-outbound-callerid,s,3)
– Executing NoOp(“Zap/2-1”, “REALCALLERIDNUM is 6002”) in new stack
– Executing Set(“Zap/2-1”, “USEROUTCID=”) in new stack
– Executing Set(“Zap/2-1”, “EMERGENCYCID=”) in new stack
– Executing Set(“Zap/2-1”, "TRUNKOUTCID=“M Hockings” ")
in new stack
– Executing GotoIf(“Zap/2-1”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,11)
– Executing GotoIf(“Zap/2-1”, “0?usercid”) in new stack
– Executing Set(“Zap/2-1”, “CALLERID(all)=“M Hockings”
”) in new stack
– Executing GotoIf(“Zap/2-1”, “1?report”) in new stack
– Goto (macro-outbound-callerid,s,15)
– Executing NoOp(“Zap/2-1”, “CallerID set to “M Hockings”
”) in new stack
– Executing GotoIf(“Zap/2-1”, “0?nomax”) in new stack
– Executing GotoIf(“Zap/2-1”, “0?chanfull”) in new stack
– Executing AGI(“Zap/2-1”, “fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
fixlocalprefix: Could not parse /etc/asterisk/localprefixes.conf
– AGI Script fixlocalprefix completed, returning 0
– Executing Set(“Zap/2-1”, “OUTNUM=1xxxxxxxxxx”) in new stack
– Executing Set(“Zap/2-1”, “custom=SIP/acanac”) in new stack
– Executing GotoIf(“Zap/2-1”, “0?customtrunk”) in new stack
– Executing Dial(“Zap/2-1”, “SIP/acanac/1xxxxxxxxxx|120|r”) in new
stack
– Called acanac/1xxxxxxxxxx
– SIP/acanac-aa5e is making progress passing it to Zap/2-1
– Starting simple switch on ‘Zap/1-1’
– Executing Set(“Zap/1-1”, “FROM_DID=s”) in new stack
– Executing Set(“Zap/1-1”, “FAX_RX=3999”) in new stack
– Executing Answer(“Zap/1-1”, “”) in new stack
– Executing PlayTones(“Zap/1-1”, “ring”) in new stack
== Spawn extension (from-pstn, s, 5) exited non-zero on ‘Zap/1-1’
– Hungup ‘Zap/1-1’
– Starting simple switch on ‘Zap/1-1’
– Executing Set(“Zap/1-1”, “FROM_DID=s”) in new stack
– Executing Set(“Zap/1-1”, “FAX_RX=3999”) in new stack
– Executing Answer(“Zap/1-1”, “”) in new stack
– Executing PlayTones(“Zap/1-1”, “ring”) in new stack
== Spawn extension (from-pstn, s, 5) exited non-zero on ‘Zap/1-1’
– Hungup ‘Zap/1-1’
– Starting simple switch on ‘Zap/1-1’
– Executing Set(“Zap/1-1”, “FROM_DID=s”) in new stack
– Executing Set(“Zap/1-1”, “FAX_RX=3999”) in new stack
– Executing Answer(“Zap/1-1”, “”) in new stack
– Executing PlayTones(“Zap/1-1”, “ring”) in new stack
== Spawn extension (from-pstn, s, 5) exited non-zero on ‘Zap/1-1’
– Hungup ‘Zap/1-1’
– Starting simple switch on ‘Zap/1-1’
– Executing Set(“Zap/1-1”, “FROM_DID=s”) in new stack
– Executing Set(“Zap/1-1”, “FAX_RX=3999”) in new stack
– Executing Answer(“Zap/1-1”, “”) in new stack
– Executing PlayTones(“Zap/1-1”, “ring”) in new stack
== Spawn extension (from-pstn, s, 5) exited non-zero on ‘Zap/1-1’
– Hungup ‘Zap/1-1’
– Starting simple switch on ‘Zap/1-1’
– Executing Set(“Zap/1-1”, “FROM_DID=s”) in new stack
– Executing Set(“Zap/1-1”, “FAX_RX=3999”) in new stack
– Executing Answer(“Zap/1-1”, “”) in new stack
– Executing PlayTones(“Zap/1-1”, “ring”) in new stack
== Spawn extension (from-pstn, s, 5) exited non-zero on ‘Zap/1-1’
– Hungup ‘Zap/1-1’
– Starting simple switch on ‘Zap/1-1’
– Executing Set(“Zap/1-1”, “FROM_DID=s”) in new stack
– Executing Set(“Zap/1-1”, “FAX_RX=3999”) in new stack
– Executing Answer(“Zap/1-1”, “”) in new stack
– Executing PlayTones(“Zap/1-1”, “ring”) in new stack
== Spawn extension (from-pstn, s, 5) exited non-zero on ‘Zap/1-1’
– Hungup ‘Zap/1-1’
== Spawn extension (macro-dialout-trunk, s, 16) exited non-zero on
’Zap/2-1’ in macro ‘dialout-trunk’
== Spawn extension (macro-dialout-trunk, s, 16) exited non-zero on
’Zap/2-1’
– Hungup ‘Zap/2-1’
– Starting simple switch on ‘Zap/1-1’
– Executing Set(“Zap/1-1”, “FROM_DID=s”) in new stack
– Executing Set(“Zap/1-1”, “FAX_RX=3999”) in new stack
– Executing Answer(“Zap/1-1”, “”) in new stack
– Executing PlayTones(“Zap/1-1”, “ring”) in new stack
== Spawn extension (from-pstn, s, 5) exited non-zero on ‘Zap/1-1’
– Hungup ‘Zap/1-1’
– Saved useragent “Linksys/SPA942-4.1.12” for peer 3200


–Bandwidth and Colocation provided by Easynews.com

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the chance to share your
opinions on IT & business topics through brief surveys – and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

Avi Miller wrote:

[quote] Do you have NVFaxDetect installed on your Asterisk box? It doesn’t ship
with either Asterisk or FreePBX (it has to be installed separately). If
you don’t, NVFax as the detection method will not work.

[/quote]OK, this seemed to be the key. Apparently if app_nv_faxdetect is not
installed there is no error that I could see that gets raised if the
freepbx dialplan can’t find it. In any case I was able to download,
build, install it and all is working fine now using NVFax detection.

Mike


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the chance to share your
opinions on IT & business topics through brief surveys – and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

Avi Miller wrote:

[quote] M.A. Hockings wrote:

[quote] I have the inbound routes set to “freePBX default” for fax with
detection set to “NVFax” with a 2 second wait and the general settings
have the fax extension set to 3999. Does not “system” mean that freePBX
will try to use rfax to receive the fax?

[/quote]
Do you have NVFaxDetect installed on your Asterisk box? It doesn’t ship
with either Asterisk or FreePBX (it has to be installed separately). If
you don’t, NVFax as the detection method will not work.

[quote] How exactly do I configure freePBX to support/direct the fax to the
right extension and turn on Asterisk’s detection?

[/quote]
Well, that depends on how you want it to work. If you have a fixed fax
DID, you can just use an inbound route to direct that to your iaxmodem
connected to HylaFax (which is the method I use). You could also use
Zaptel Fax Detection and redirect faxes that way (by setting a Fax
extension and the detection method to Zaptel). This is the way I think
you should be using.

Alternatively, you could get NVFaxDetect and use that instead.

cYa,
Avi
[/quote]
If I had a separate line/DID then all this would not be a problem and I
could just connect it to the fax extension. Where we are we have the
single pstn line for voice calls but my wife needs to receive some faxes
from her boss now and then. So I thought it would be a simple thing to
add fax reception to Asterisk/freePBX…

From all my experimentation today I would say that selecting Zap fax
detection does NOT work. The closest thing to working is using the
NVfax detection and setting the fax destination in the incoming route.
Then it seems to recognize the incoming fax and not ring the phones but
it fails dismally at connecting to the fax extension and instead
continues to deliver a ring to the caller. If I could figure out how to
get freePBX to do a Dail(IAX2/3999) when it detects a fax instead of
the PlayTones() business I’m sure it would be just fine.

– Starting simple switch on ‘Zap/1-1’
– Executing Set(“Zap/1-1”, “FROM_DID=s”) in new stack
– Executing Set(“Zap/1-1”, “FAX_RX=3999”) in new stack
– Executing Answer(“Zap/1-1”, “”) in new stack
– Executing PlayTones(“Zap/1-1”, “ring”) in new stack
== Spawn extension (from-pstn, s, 5) exited non-zero on ‘Zap/1-1’
– Hungup ‘Zap/1-1’

I did find this http://aussievoip.com.au/wiki/index.php?page=DM-Fax but
it seems to reference an older version of freePBX than what I have
(2.1.1) and the old/new code is considerably different.

Mike


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the chance to share your
opinions on IT & business topics through brief surveys – and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

Avi Miller wrote:

[quote] M.A. Hockings wrote:

[quote] I don’t really expect it to produce a good fax this way but I do expect
it to connect.

[/quote]
However, it may not. Fax detection/connection are very touchy. If you
are running a lossy codec across your VOIP connection (GSM, g729, Speex,
etc), the chances of a fax actually connection are pretty damn slim.

[quote] to fax back. In any case, Zap fax detection is turned off and the
asterisk/freePBX detection must be working as freePBX stuff does seem
to do something with the FAX_RX thing

[/quote]
That’s the problem: Fax detection is still working, instead of being
disabled. You don’t want Asterisk to do any fax detection, because you
probably haven’t configured FreePBX to support it. Try setting your Fax
extension in general to 3999 and fax detection to “system”.

[/quote]
I have the inbound routes set to “freePBX default” for fax with
detection set to “NVFax” with a 2 second wait and the general settings
have the fax extension set to 3999. Does not “system” mean that freePBX
will try to use rfax to receive the fax?

How exactly do I configure freePBX to support/direct the fax to the
right extension and turn on Asterisk’s detection?

Mike


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the chance to share your
opinions on IT & business topics through brief surveys – and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

M.A. Hockings wrote:

[quote] I have the inbound routes set to “freePBX default” for fax with
detection set to “NVFax” with a 2 second wait and the general settings
have the fax extension set to 3999. Does not “system” mean that freePBX
will try to use rfax to receive the fax?
[/quote]
Do you have NVFaxDetect installed on your Asterisk box? It doesn’t ship
with either Asterisk or FreePBX (it has to be installed separately). If
you don’t, NVFax as the detection method will not work.

[quote] How exactly do I configure freePBX to support/direct the fax to the
right extension and turn on Asterisk’s detection?
[/quote]
Well, that depends on how you want it to work. If you have a fixed fax
DID, you can just use an inbound route to direct that to your iaxmodem
connected to HylaFax (which is the method I use). You could also use
Zaptel Fax Detection and redirect faxes that way (by setting a Fax
extension and the detection method to Zaptel). This is the way I think
you should be using.

Alternatively, you could get NVFaxDetect and use that instead.

cYa,
Avi


National Manager - Special Projects

< Sydney / Melbourne / Canberra / Hobart / London />
2/340 Gore Street T: 1 3000 SQUIZ (77849)
Fitzroy, VIC T: +61 (0) 3 9235 5400
3065 F: +61 (0) 3 9235 5444
W: http://www.squiz.net/

…>> Open Source - Own it - Squiz.net …/>


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the chance to share your
opinions on IT & business topics through brief surveys – and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

M.A. Hockings wrote:

[quote] extension? In the console output below I am calling out from a FXS port
(Zap/2-1) via the VOIP line back to the FXO port (Zap/1-1) and
presumably to the fax device. But the fax device (IAX2/3999) never gets
called.
[/quote]
Firstly, you should turn off all fax detection in Zap (zapata.conf,
faxdetect=none) so that Asterisk doesn’t do any internal fax redirection
itself. This is because you’re hard coding the fax extension and don’t
need detection.

Also, remember that any lossy VOIP codec will totally destroy a fax
(GSM/g729). In fact, even lossless (ulaw/alaw) codecs aren’t that great
either. It might just be that the connection via the VOIP line isn’t
good enough to complete fax transmission (particularly if Asterisk is
still doing fax detection for you – it may not even see the call as a
fax call).

cYa,
Avi


National Manager - Special Projects

< Sydney / Melbourne / Canberra / Hobart / London />
2/340 Gore Street T: 1 3000 SQUIZ (77849)
Fitzroy, VIC T: +61 (0) 3 9235 5400
3065 F: +61 (0) 3 9235 5444
W: http://www.squiz.net/

…>> Open Source - Own it - Squiz.net …/>


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the chance to share your
opinions on IT & business topics through brief surveys – and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

Avi Miller wrote:

[quote] M.A. Hockings wrote:

[quote] extension? In the console output below I am calling out from a FXS port
(Zap/2-1) via the VOIP line back to the FXO port (Zap/1-1) and
presumably to the fax device. But the fax device (IAX2/3999) never gets
called.

[/quote]
Firstly, you should turn off all fax detection in Zap (zapata.conf,
faxdetect=none) so that Asterisk doesn’t do any internal fax redirection
itself. This is because you’re hard coding the fax extension and don’t
need detection.

Also, remember that any lossy VOIP codec will totally destroy a fax
(GSM/g729). In fact, even lossless (ulaw/alaw) codecs aren’t that great
either. It might just be that the connection via the VOIP line isn’t
good enough to complete fax transmission (particularly if Asterisk is
still doing fax detection for you – it may not even see the call as a
fax call).

cYa,
Avi

[/quote]I don’t really expect it to produce a good fax this way but I do expect
it to connect. It is certainly easier than driving to another location
to fax back. In any case, Zap fax detection is turned off and the
asterisk/freePBX detection must be working as freePBX stuff does seem
to do something with the FAX_RX thing but what I don’t understand is why
it does not do a dial to the IAX2/3999 extension instead of this playing
"ring" business?

– Starting simple switch on ‘Zap/1-1’
– Executing Set(“Zap/1-1”, “FROM_DID=s”) in new stack
– Executing Set(“Zap/1-1”, “FAX_RX=3999”) in new stack
– Executing Answer(“Zap/1-1”, “”) in new stack
– Executing PlayTones(“Zap/1-1”, “ring”) in new stack
== Spawn extension (from-pstn, s, 5) exited non-zero on ‘Zap/1-1’
– Hungup ‘Zap/1-1’

Mike


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the chance to share your
opinions on IT & business topics through brief surveys – and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

M.A. Hockings wrote:

[quote] I don’t really expect it to produce a good fax this way but I do expect
it to connect.
[/quote]
However, it may not. Fax detection/connection are very touchy. If you
are running a lossy codec across your VOIP connection (GSM, g729, Speex,
etc), the chances of a fax actually connection are pretty damn slim.

[quote] to fax back. In any case, Zap fax detection is turned off and the
asterisk/freePBX detection must be working as freePBX stuff does seem
to do something with the FAX_RX thing
[/quote]
That’s the problem: Fax detection is still working, instead of being
disabled. You don’t want Asterisk to do any fax detection, because you
probably haven’t configured FreePBX to support it. Try setting your Fax
extension in general to 3999 and fax detection to “system”.


National Manager - Special Projects

< Sydney / Melbourne / Canberra / Hobart / London />
2/340 Gore Street T: 1 3000 SQUIZ (77849)
Fitzroy, VIC T: +61 (0) 3 9235 5400
3065 F: +61 (0) 3 9235 5444
W: http://www.squiz.net/

…>> Open Source - Own it - Squiz.net …/>


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the chance to share your
opinions on IT & business topics through brief surveys – and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

I know that the message is too old, but you can get some app that does not come with asterisk from http://sourceforge.net/projects/agx-ast-addons/

Regards,