HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

[hylafax-users] Hylafax and Asterisk - Configuration report



I recently decided to run all our fax traffic through an asterisk server
so that I could use the trunk lines for other things as well as Fax
(like voice stuff!).  I made absolutely no changes to Hylafax server
software or configuration.  After the changes with asterisk, I can still
fax out and receive faxes (using DID routing) just as before.

Before

    Telco --- T1 with DID --- Hylafax

After

    Telco --- T1 with DID - Asterisk --- PRI --- Hylafax


Here is a report on how I did it.  I figured out how to do this using
the free resources of the asterisk community (wiki and maillist) and a
few others.  I thought it was only just that I make a report back to the
(hylafax) community on how to do it should anyone here be so inclined to
do the same (vs. maillist'ing that I know how to do it and then
suggesting to sell the information when asked about it).  So below are
all the details I think might be useful.  If I missed some things or
need to clarify, let me know and I will repost.

In the lab I have a T1 with E&M wink (just DID digits) coming from the
telco with 6 channels leased.  It previously was plugged directly into
the Fax board (Digi Datafire/Patton 2977) with hylafax cvs head.

I installed asterisk by following more or less
http://www.automated.it/guidetoasterisk.htm#_Toc49248760 except I was
working with the wct4xxp module and the the fxo/fxs stuff.

So I installed a Digium TE405P board in another server (low end POS).  I
then configured one of the Digium ports to be PRI(Net) and connected it
to the Fax board.  I reconfigured the Fax board to do PRI(CPE)  (this
was actually the hardest part).  The fax board was configured to be
pri-cpe and the Digium to be pri-net.  I left the T1 framing and coding
as it was on the fax board when connected to the telco (ESF-B8ZS).  The
fax board from digi/patton had to be configured with the command line
utility (vs the gui tool) for proper setup with T1 and it was not
intuitive (but had good support from patton).

Then I configured one of the Digium ports to connect to the T1.
currently, I only get the DID digits from the telco.

I am going to change from just DID on the telco T1 to CallerID+ DID.  My
telco is going to be sending this information after the wink in the
format *CID10digits*DIDdigits* .  so to do that, I will have to change
the signaling in the /etc/asterisk/zapta.conf for the T1 interface from
"em_w" to "featd"

I also now have a few SIP phones attached to the network and using
asterisk and the previous-only-fax-trunks for direct dial to the desk
(VOIP) and outbound calling as well from the same SIP phones.  I am just
using some cheap (<$75US) phones from grandstream.  But I am going to
try some better phones in a few weeks (splurging another $170 on a multi
line desk phone).

Here are the relevant files from asterisk that should let anyone get it
going quick with similar equipment.

I am be curious if others have tried this or are thinking about it?


----------------------------------------------------------------

#/etc/zaptel.conf
# T1 to telco
# take clocking from the telco network
span=1,1,0,esf,b8zs
e&m=1-6

# PRI to Fax server
# give out clocking to the fax server
span=2,0,0,esf,b8zs
bchan=25-47
dchan=48

loadzone=us
defaultzone=us
-----------------------------------------------------------------

;/etc/asterisk/Zapata.conf
[channels]

context=default
language=en

;====================

context=Telco
faxdetect=incoming
language=en
immediate=no
signalling=em_w
; change signalling to featd when telco sends callerid and DID after
wink group=1 channel => 1-6

faxdetect=off
;====================

context=FaxServer
switchtype=national
signalling=pri_net
group=2
overlapdial=yes
channel => 25-47
------------------------------------------------------------------------
-

;#/etc/asterisk/extension.conf

[Telco]
exten => _X.,1,Goto(FAXonlyDID,${EXTEN},1)
exten => 3329000,1,Goto(VMonlyDID,${EXTEN},1)
exten => 8423721,1,Goto(PhoneAndFaxDID,${EXTEN},1)
exten => 8423737,1,Goto(PhoneAndFaxDID,${EXTEN},1)
exten => 8424400,1,Dial(SIP/phone2,20,tr)
exten => t,1,congestion
;exten => fax,1,NoOp() ; don't use-causes a phone hangup after xfer to
faxserver

[FAXonlyDID]
exten => _X.,1,Dial(Zap/g2/${EXTEN})
exten => _X.,2,Hangup
exten => t,1,Hangup

[VMonlyDID]
exten => _X.,1,Answer
exten => _X.,2,Ringing()
exten => _X.,3,Wait(1)
exten => _X.,4,SetVar(DID=${EXTEN})
exten => _X.,5,VoiceMail(u${EXTEN})
exten => _X.,6,Hangup
exten => t,1,Hangup
exten => a,1,VoicemailMain(${DID}) ; press * in VM

[VMandFaxDID]
exten => _X.,1,Answer
exten => _X.,2,Ringing()
exten => _X.,3,Wait(3)
exten => _X.,4,SetVar(DID=${EXTEN})
exten => _X.,5,VoiceMail(u${EXTEN})
exten => _X.,6,Hangup
exten => t,1,Hangup
exten => a,1,VoicemailMain(${DID}) ; press * in VM
exten => fax,1,Dial(Zap/g2/${DID}) ; if we hear CNG

[PhoneAndFaxDID]
exten => _X.,1,Answer
exten => _X.,2,Ringing()
exten => _X.,3,Wait(3)
exten => _X.,4,SetVar(DID=${EXTEN})
exten => _X.,5,Dial(sip/${EXTEN},20,tr)
exten => _X.,6,VoiceMail(u${EXTEN})
exten => _X.,7,Hangup
exten => _X.,106,VoiceMail(b${EXTEN})
exten => _X.,107,Hangup
exten => t,1,Hangup
exten => a,1,VoicemailMain(${DID}) ; press * in VM
exten => fax,1,Dial(Zap/g2/${DID}) ; if we hear CNG

[FaxServer]
exten => s,1,Answer
exten => _X.,1,Dial(Zap/g1/${EXTEN})
;;;exten => 101,1,Dial(SIP/phone1,20,tr)





____________________ HylaFAX(tm) Users Mailing List _______________________
  To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
 On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
  *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




Project hosted by iFAX Solutions