Topic: How to install and use Digium Fax for Asterisk [Comments: 69]
eeman
Wed, 12/30/2009 - 22:50 | How to install and use Digium Fax for Asterisk
Here is how you go about installing digium's fax for asterisk onto your system and how to use the tools.
- get rid of ALL span-dsp fax modules already on your system (app_txfax.so, app_rxfax.so for 1.4 and app_fax.so for 1.6). They are NOT COMPATIBLE with FFA.
- Download the appropriate res_fax and res_fax_digium modules from downloads.digium.com. Also download the register utility if you do not already have that. Do not attempt to use the fax benchmark tool to pick the best CPU build as it locks up all the time. One method is to use the same build that the g729 benchmark tool identified when picking the best build for the g729 codec. Another option is to pick a conservative guess like pentium4 even though you're running a xeon processor
- install the modules into /usr/lib/asterisk/modules/
- make register utility executable (chmod 755 register) and run it ./register
- go to www.digium.com and purchase concurrent licenses from their store. Do not forget to register/buy the free one. You always get one free license and pay for the concurrent ones.
- enter the key that is emailed to you and fill out appropriate questions
- load the modules from CLI (module load res_fax.so, module load res_fax_digium.so). You should see remarks about the license key loading and how many
- copy the files from /usr/libexec/webmin/asterisk/configs/local-sbin/ into your /usr/local/sbin directory. (install -c -m 755 /usr/libexec/webmin/asterisk/configs/local-sbin/fax2pdf.sh /usr/local/sbin )
for inbound fax-to-email change the script for your feature extension to use the new tl-stdexten-fax-forasterisk and then you point the inbound route go to that feature extension just as before.
to send a fax simply log into your user portal as the end user and select the Send Fax menu item. Make sure to use unabreviated 10 digit numbering (ex 5025551212) for Station ID. Similarly your destination number should be unabreviated as you would dial it from a phone.





Thu, 12/31/2009 - 07:10 | Very nice. I want to get
Very nice. I want to get this going soon.
Thank you for putting this together.
-Matt
Mon, 01/04/2010 - 16:26 | if i install only the free
if i install only the free license, will the faxes queue up or will it just disregard it
Mon, 01/04/2010 - 19:13 | not sure what your question
not sure what your question is
Erik Smith
CTO
BluegrassNet Voice
dCAP
Mon, 01/04/2010 - 20:23 | question is if i send more
question is if i send more than 1 fax at the same time, will the other faxes queue up or will it be discarded
Mon, 01/04/2010 - 20:28 | theres no way to queue up,
theres no way to queue up, that would involve concurrent faxing... those calls will basically fail. The sending fax machine will then retry based on however it is configured for number of retries and duration between attempts.
Erik Smith
CTO
BluegrassNet Voice
dCAP
Mon, 01/04/2010 - 21:26 | I think he means if his
I think he means if his Asterisk box has only one fax license and 10 faxes get submitted...will one succeed and nine fail, or will all 10 be sent out one after the other.
Mon, 01/04/2010 - 21:32 | thank you - that is what i am
thank you - that is what i am asking
Mon, 01/04/2010 - 21:42 | the outbound job that gets
the outbound job that gets created also has some retries associated with it. It creates a callfile with several retries 60 seconds apart.
Erik Smith
CTO
BluegrassNet Voice
dCAP
Tue, 01/05/2010 - 05:55 | upgrading Asterisk 1.6.0.6 to 1.6.1.12
I saw a notice on Dec 18th that Asterisk 1..1.12 is available along with the following comment
"This release also contains significant improvements to T.38 support. Anyone who has tried T.38 faxing in the past should try again as most problems should now be resolved."
Do you recommend upgrading to 1.6.1.12? How difficult is that from a build 2 (asterisk 1.6.0.6) iso install?
Wayne
Tue, 01/05/2010 - 09:24 | deciding to switch off of 1.4
deciding to switch off of 1.4 is a matter of accepting the things that no longer work in the 1.6 branches both by design and by bug. The things that do not work in 1.6.0.6 also still do not work in 1.6.1.x branch so the change would be minimal.
Erik Smith
CTO
BluegrassNet Voice
dCAP
Tue, 01/05/2010 - 14:27 | I need to add two fax
I need to add two fax machines to send and receive over the PI connected to Asterisk. I currently have Asterisk 1.4.18 but was considering upgrading to 1.6.1.12. I'm just interested in the adding the most reliable faxing and looking for some advice.
Customer has a PRI, about 30 Polycom ip330s, an ip650, and simple pbx functionality.
Thanks
Wayne
Tue, 01/05/2010 - 16:39 | if the customer has a pri why
if the customer has a pri why on earth would you use the PI to send/receive faxes?
Erik Smith
CTO
BluegrassNet Voice
dCAP
Tue, 01/05/2010 - 17:58 | the pri goes into the
the pri goes into the Asterisk server. What is the best way to add two fax machines?
Tue, 01/05/2010 - 20:01 | the _best_ way to do it
the _best_ way to do it (completely issue free) is to get a multiport card (you want good echo can anyway) .. on the second t1 port connect up a channel bank like the rhino 24fxs channelbank. Once the circuit is connected asterisk will natively bridge the 2 ports right on the card and timing will never cause you an issue. This method is so solid-state that it also works for modems and alarm panels.
now if a $1200 channel bank is out of the question, then your left with using an ATA for each fax machine using g711 setting buffers high and dumbing the speed down to 9600 baud (possibly 14400 but no faster). Xorcom sells a usb based channelbank but I do not now if its any cheaper. I do know I see a fair share of patch notes referencing the xorcom drivers so it must not be without problems.
T38 will do nothing for you nor will versions >1.6.1.12 since T38 does not occur on the PSTN (instead T30 is used) and asterisk does not 'gateway' between T38 and T30 natively. There are 3rd party software companies that sell modules to gateway between T30 and T38 but they do not work with every ATA so mileage may vary.
Erik Smith
CTO
BluegrassNet Voice
dCAP
Wed, 01/06/2010 - 04:02 | so I can use g.711 and an ATA
so I can use g.711 and an ATA to connect the two remote faxes (in diffrent buildings connected by fiber) across the network. If I use the xorcom Astribank, can I connect the PRI into the channel bank along with a local fax to an FXSport? then use the ATA for the other fax?
I read about lots of issues faing and I'm wondering if it's all worth the effort vs potential issues. So if I understand correctly the version of Asterisk really doesn't matter if I'm using PSTN into te server?
Thanks for all your help.
Wayne
Wed, 01/06/2010 - 04:21 | If I use the xorcom
If I use the xorcom Astribank, can I connect the PRI into the channel bank along with a local fax to an FXSport?
not physically. channel banks do not do pri signaling. They just mux channels into TDM.
So if I understand correctly the version of Asterisk really doesn't matter if I'm using PSTN into te server?
correct, the fax improvements mentioned are referring to T38 interoperability with various T38 gateway vendors. The only 'exception' to this was the addition of the Fax For Asterisk module, which has nothing to do with physical fax machines but rather a fax engine that translates to/from images directly on the pbx as a software machine to collect faxes and email pdf images and upload pdf images for sending as a fax.
Erik Smith
CTO
BluegrassNet Voice
dCAP
Thu, 01/14/2010 - 03:47 | installing fax for asterisk
Erik
forgive my ignorance...when you said "get rid of ALL span-dsp fax modules already on your system (app_txfax.so, app_rxfax.so for 1.4 and app_fax.so for 1.6). They are NOT COMPATIBLE with FFA."
where and how do i remove these modules?
Wayne
Fri, 01/15/2010 - 01:38 | rm
rm /usr/lib/asterisk/modules/app_txfax.so
rm /usr/lib/asterisk/modules/app_rxfax.so
rm /usr/lib/asterisk/modules/app_fax.so
Erik Smith
CTO
BluegrassNet Voice
dCAP
Thu, 01/21/2010 - 20:27 | I have done all of the steps
I have done all of the steps here and according to digiums guide however, the Send Fax function in the user portal is not working for me. Neither is setting up an inbound route to go to Feature Extension for Fax For Asterisk.
When I try to send a fax to the inbound route I setup to receive faxes, I get an error 43 on a regular fax machine.
When I try to send a pdf as fax, it gives no error but it just reloads the Send Fax page.
Fri, 02/12/2010 - 01:37 | some prerequisites to be
some prerequisites to be aware of:
make sure you have ghostscript installed
asterisk must be at or above the following versions:
1.4 branch 1.4.22+
1.6.0 branch 1.6.0.14+
1.6.1 branch 1.6.1.5+
1.6.2 branch 1.6.2.0+
Erik Smith
CTO
BluegrassNet Voice
dCAP
Tue, 02/09/2010 - 13:42 | Voicedata; Are you sure
Voicedata;
Are you sure that the FFA modules are loaded? To check, at the Asterisk CLI do a "module show like res_fax". You should see two modules loaded. If they are not loaded, check the logs in /var/log/asterisk.
Regards;
Frank
Tue, 02/09/2010 - 17:06 | Yes I am 100% sure!!! I
Yes I am 100% sure!!! I installed the modules myself and confirmed that they were loaded with the "fax show stats" command.
We have been using FFA to receive Fax to Email and its working great.
Tue, 02/09/2010 - 20:47 | so your application is
so your application is working ok... so its just sending and its somewhere before the callfile is created.
what do you have in /var/spool/asterisk/outgoing?
Erik Smith
CTO
BluegrassNet Voice
dCAP
Tue, 02/09/2010 - 21:15 | Various callfiles that are
Various callfiles that are created when I attempt to send the fax via user portal. for some reason, they never get processed.
FSD was helping me here http://www.thirdlane.com/forum/fax-for-asterisk-integration#comment-3920
He said it must be because of the owner of the files is incorrect.
Tue, 02/09/2010 - 21:39 | yes that's a known bug at the
yes that's a known bug at the moment that will require you to either wait for the fix or run asterisk as a root user.
Erik Smith
CTO
BluegrassNet Voice
dCAP
Wed, 02/10/2010 - 17:46 | ok...thanks Erik. I will
ok...thanks Erik. I will keep a lookout for the bug fix. If you dont mind posting a reply in this thread when its out, I'd really appreciate it and I think it would help others that are having issues as well.
Thu, 02/11/2010 - 13:54 | Voicedata; When you get a
Voicedata;
When you get a chance, shoot me an email at fsd (at) voipbusiness (dot) us.
Thanks;
Frank
Tue, 03/16/2010 - 22:05 | I see that the new Thirdlane
I see that the new Thirdlane came update out. I'm sure the Send Fax bug has been fixed but unfortunately for me, my update contract ran out a couple weeks before the update. Now, I'm stuck with having to shell out a grand if I want to get the update.
Is there any way that I can manually fix the configuration so that the User Portal Send Fax will work??
Wed, 03/17/2010 - 18:43 | I think you have two options
I think you have two options here. The first is to run everything as root. Its not difficult to do and its the route that Eric takes. The other option is to replace the user portal Send Fax page with your own version. Thats not difficult to do either. You can create an identical web page and a small .cgi that creates the callfile with the proper permissions. Really straightforward. I've already done that a while back before Alex added the feature. I can look around for it if you want.
Regards;
Frank
Thu, 03/18/2010 - 15:48 | How to install and use Digium Fax for Asterisk
I would like to learn more about this option.
If you locate the information or sample you can send me the info at denis (at) abptech.com
Since we are on a thread that is about installing the T.38 FAX for Asterisk I have just installed the new FAX for Asterisk free channel license and everything seems to be in place, modules loaded, FAX Show Status showing everything but I am having getting the T.38 exchange to work correctly. There are some setting files that are not in the standard configuration file directory. The document says if they are not there default values are used. I am wondering if I may need to modify some of the default paramaters to work with my SIP trunk provider and where should I make the changes?
If anyone has this working on > 1.6.1.15,,, I need this branch of 1.6 to make Parking work on MT... some pointers would be great. Everything as far as installation looks ok, and I get no big errors when I get a fax other than the fax fails. Looking at Wireshark, it is a problem with the T.38 negotiation. On one of my sip trunks that say they support T.38 I get a 488 not applicable here response to my T.38 reinvite. On the other SIP trunk from Broadvox the reply with SD T.38 opitons to my Re-Invite but my asterisk never responds to the ced and other messages sent by Broadvox to Asterisk and the call fail after some timeout.
I am using PBX manager 6.0.1.79 and am currently at 1.6.1.18 but have tried asterisk version 1.6.0.5 - 1.6.0.15 and 1.6.1.11 - 1.6.1.18 and are still having problems getting the T.38 to work correctly using the FAX For Asterisk to Email script.
What can I look at next. Thanks
Thu, 03/18/2010 - 16:07 | Denis; Honestly, my
Denis;
Honestly, my experience with the Digium FFA modules has not been good, but the marketplace is not exactly overflowing with alternatives. Whenever I've had a problem, I've made Digium earn their money. I would open up a trouble ticket with them and make it their problem.
Frank
Thu, 03/18/2010 - 16:14 | receiving faxes right? do you
receiving faxes right? do you have t.38 enabled on your sip channel that the application will be receiving on?
Erik Smith
CTO
BluegrassNet Voice
dCAP
Thu, 03/18/2010 - 16:52 | How to install and use Digium Fax for Asterisk
Yes, recieving Faxes is where I am starting. I did try using the user portal to send a fax but that failed also. I loaded with ISO so I was not sure if some of the reported root permissions was the problem and decided to move on to getting inbound to work first. I have two different SIP trunk providers that propose to do T.38 so I can compare problems between the two providers. They are both failing for different reasons, both look like T.38 negotiation issues from the SIP traces I have done with Wireshark. I can send you the pcap files and CLI traces if you need to see them. I will probably have to work directly with the SIP Trunk providers and go through the ... I did this and you did this but after I get this you did not do this.... type of thing.
On my Broadvox trunk I do see my my system send the Re-Invite with T.38 and the SIP trunk provider does ack and return SD with T.38 and then starts to send the T.38 packets but Asterisk doesn't respond the the T.38 packets with anything until the call fails. My other SIP trunk just replys with 488 Not avaliable here and the call imediatly fails to connect.
Thanks for your help. Probably I should just get Digium to make it work for me. Thats what they are supposed to do for this application. I really wish fax would just go away, but not going to happen today or anytime soon.
Denis
Thu, 03/18/2010 - 17:09 | Frank, If you could send me
Frank,
If you could send me that script or inform me how to change the permissions that would be great!
My email is matt at ablegroups.com
Thanks alot man!
Thu, 03/18/2010 - 17:44 | paste the content of your: 1)
paste the content of your:
1) entire udptl.conf
2) [General] section of your sip.conf and the Broadvox trunk section.
I think theres some missing stuff
Erik Smith
CTO
BluegrassNet Voice
dCAP
Thu, 03/18/2010 - 18:31 | udptl.conf contents: { ; ;
sorry for my confusion
if anyone has a solution to fix the Send Fax page, please let me know
Thanks
Thu, 03/18/2010 - 18:17 | lol that was meant for
lol that was meant for Denis
but your sip.conf needs some cleanup too unless you're running your phone system out of moscow.
I happen to know how broadvox peering works so I was looking for how his trunks were set up and if he has enabled t38 at all in sip.conf.
Erik Smith
CTO
BluegrassNet Voice
dCAP
Fri, 03/19/2010 - 00:53 | How to install and use Digium Fax for Asterisk
Thanks Erik,
Here is my information.
sip.conf
[general]
port=5060
bindaddr=0.0.0.0
disallow=all
allow=ulaw
allow=alaw
allow=gsm
callerid=unknown
context=from-outside ; Default context for incoming calls
allowsubscribe=yes
notifyhold=yes
notifyringing=yes
limitonpeer=yes
videosupport=yes
t38pt_udptl=yes ; Default false
;t38pt_usertpsource=yes ; someone said to try this but it did not help
register => 479202xxxx:xxxxxxxxxxxx@209.249.x.x ;
*************************************************************
udptl.conf ; DC have not changed anything here yet
;
; UDPTL Configuration (UDPTL is one of the transports for T.38)
;
[general]
;
; UDPTL start and UDPTL end configure start and end addresses
;
udptlstart=4000
udptlend=4999
;
; Whether to enable or disable UDP checksums on UDPTL traffic
;
;udptlchecksums=no
;
; The error correction type to be sent
;
T38FaxUdpEC = t38UDPFEC
;T38FaxUdpEC = t38UDPRedundancy
;
; The maximum length of a UDPTL packet
;
T38FaxMaxDatagram = 400
;
; The number of error correction entries in a UDPTL packet
;
udptlfecentries = 3
;
; The span over which parity is calculated for FEC in a UDPTL packet
;
udptlfecspan = 3
************************************************************
[BroadvoxDenisTest]
qualify=no
nat=no
;=description=Broadvox 479202xxxx Test T38
host=209.249.x.xx
dtmfmode=rfc2833
context=from-outside
type=friend
insecure=very
canreinvite=yes
disallow=all
allow=ulaw
Fri, 03/19/2010 - 00:49 | How to install and use Digium Fax for Asterisk
Dangit. Showed more info than I wanted.
Please don't abuse the info guys.
Yes, never noticed the edit option.
I guess I should now go back and fix all my typos I have posted in the past.
Naaa
Thu, 03/18/2010 - 18:52 | I had a similiar problem
I had a similiar problem running Asterisk 1.6.0.24. According to Digium, I needed to set
t38pt_udptl=no in sip.conf since the system was terminating inbound faxes and not using pass-thru.
Once I did it, the problem disappeared.
FSd
Thu, 03/18/2010 - 19:19 | should not be able to because
should not be able to because broadvox is bound to source/destination addresses
here are some changes I want you to make
sip.conf
[general]
- allow=alaw
- allow=gsm
+ allowguest=no
[BroadvoxDenisTest]
+ username=BroadvoxDenisTest
- type=friend
+ type = peer
+ t38pt_udptl=yes
- insecure = very
+ insecure = port,invite
************************************
udptl.conf
- T38FaxUdpEC = t38UDPFEC
- ;T38FaxUdpEC = t38UDPRedundancy
+ ;T38FaxUdpEC = t38UDPFEC
+ T38FaxUdpEC = t38UDPRedundancy
Erik Smith
CTO
BluegrassNet Voice
dCAP
Thu, 03/18/2010 - 18:59 | if my config doesnt work for
if my config doesnt work for you then do what frank reccomended about the t38_udptl settings but keep the other changes I made, you'll thank me later for them. If you disable t38_udptl then also turn off your reinvites.
Erik Smith
CTO
BluegrassNet Voice
dCAP
Thu, 03/18/2010 - 19:15 | Dennis, You can edit your
Dennis,
You can edit your posts...best to delete the info before google stores it.
-Matt
Thu, 03/18/2010 - 19:19 | thank god for the edit button
thank god for the edit button :-)
Erik Smith
CTO
BluegrassNet Voice
dCAP
Thu, 03/18/2010 - 22:17 | How to install and use Digium Fax for Asterisk
Tried setting options as directed. No Joy :-(
No change except for if I turn re-invites off on the trunk it never even tries T.38 and fax still fails.
Tried Franks t38_udptl=no . I was really hoping for that to work. Seems just like the kind of setting that would be the opposite of what you would expect. No Joy :-(
Nothing I have tried, except turning re-invites off, is changing the T.38 negotiation problem I am seeing. After asterisk sends the T.38 re-invite and Broadvox responds with 200OK and SD with T.38 I then see T.38 packets from Broadvox.
I get a bunch of T.38 packets of ceds, v21-preambles, CSI number unknown, and others comming from Broadvox but never acknoledged by Asterisk.
Asterisk does send another Re-Invite with G711 and then sends a BYE shortly afterword.
I know we will get this working with your help and enough effort. I am not ready to throw in the towel yet, but I should get digium to look at it before bothering the Thirdlane forum. The problem has nothing to do with TL.
Denis
Thu, 03/18/2010 - 22:41 | yea once ReceiveFax starts
yea once ReceiveFax starts running its no longer about the dialplan until after ReceiveFax completes its task, which is where you are experiencing your issues.
Erik Smith
CTO
BluegrassNet Voice
dCAP
Thu, 04/01/2010 - 11:21 | How to use TXFAX?
I really hate the fact Thirdlane needs the closed Asterisk solution. So this is my solution.
(Thirdlane stop requiring the closed source fax solution from Digium! this is unwanted, and stupid.)
The problem is that the tiff genarated by thirdlane is not compatible with standard faxtiff format. So the only thing i need to do is rewrite the tiff image to something usable for txfax.
This is the solution for the dialplan (Europe, netherlands):
[tl-faxsend]
exten => s,1,Answer()
exten => s,n,System(tiff2ps ${FILENAME} | gs -dNOPAUSE -dBATCH -dSAFER -sDEVICE=tiffg4 -sPAPERSIZE=a4 -r204 -sOutputFile=${FILENAME} -f -)
exten => s,n,Set(FAXOPT(localstationid)=${STATIONID})
exten => s,n,Set(FAXOPT(ecm)=yes)
exten => s,n,TxFAX(${FILENAME},ecm,log=/var/log/asterisk/txfaxlog)
Thu, 04/01/2010 - 13:19 | TXFAX is an asterisk 1.2 3rd
TXFAX is an asterisk 1.2 3rd party app that is NO LONGER MAINTAINED. So no, it will not be supported any longer. If you do not like the format of the tiff generated by the user portal, this not thirdlane but a tool called ghostscript. This only occurs on PDF to TIFF conversions. It appears your only complaint is the A4 paper size but we are North American Letter not A4. I am glad you figured out how to alter the code, as this is thirdlane's strength, but that is one of those changes that is region specific much like PSTN settings. As the majority of thirdlane customers are in north america, those are the pre-set defaults of the system.
I really think you should have done your research about res_fax before spouting off about a no-longer-existing app_txfax. Using res_fax is the only solution going forward, and had you researched a bit more, you would have realized that SpanDSP was working its way back into res_fax as res_fax_spandsp . The command structure comes from res_fax, the actual engine is in res_fax_digium (closed source, licensed) and res_fax_spandsp (open source version). This allows for a uniform method of sending and receiving faxes.
Thirdlane has made the decision that they are not going to make themselves dependent on independant 3rd party tools because time and time again those are not open to community involvement and stop being maintained (app_fax, app_valetparking, etc, etc). This puts thirdlane in an impossible position. The hope is that a digium sponsored application will remain supported as asterisk evolves (such as g729, HPEC, etc).
Erik Smith
CTO
BluegrassNet Voice
dCAP
Thu, 04/01/2010 - 14:15 | Eric; This is really
Eric;
This is really invaluable info. I'm working on a fax project now where the customer will start with two full pri's and work their way up to 8, so saving the expense of the FFA modules would be non-trivial. My testing with spandsp using app_fax.so under 1.6 and even txfax/rxfax under 1.4 have actually been very good so far. I've had cases where I just could not get FFA to work reliably and Digium was of no use (sound familiar?) but txfax/rxfax worked well. The documentation for txfax, rxfax, and spandsp on voip-info.org definitely states that the applications are compatible with Asterisk 1.4. I have not seen anything to the contrary and have not come across anything that says that they are no longer maintained, although that doesn't mean anything. I could of simply missed it. In your opinion, is there anything out there that is open source and actually works? Attrafax claims to have something, but who wants to be constantly patching Asterisk? I know I don't.
FSD
Thu, 04/01/2010 - 15:37 | App_fax was a thought before
App_fax was a thought before they came out with re_fax. The plan is to only have res_fax and let the different libraries use res_fax command structure. 1.6 seems to have been a huge mistake for trying to program around. Now there's going to be a 1.8 afterall. TL verywell might find itself supporting 1.4 and 1.8 and not trying to deal with the idiosyncracies that every branch of 1.6 brings.
You can fetch the res_fax_spandsp test branch. I think this is important to stick with one commmand syntax from a dialplan developer standpoint.
Have you looked at hylafax+iaxmodem. It isn't gray with sip trunks but works spot on for PRI. It does a lot of scheduling already.
Erik Smith
CTO
BluegrassNet Voice
dCAP