Asterisk T.38 Support by Version
|
Asterisk 15
|
Asterisk 14
|
Asterisk 13
|
Asterisk 12
|
Asterisk 11
|
Asterisk 10
|
Asterisk 1.8
|
Asterisk 1.6
|
Asterisk 1.4
|
Asterisk 1.2
|
|
|---|---|---|---|---|---|---|---|---|---|---|
| Supported Methods | ||||||||||
| T.38 Passthrough | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✘ |
| T.38 Termination | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✘ | ✘ |
| Supported SIP Stacks | ||||||||||
| Chan_SIP | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| Chan_PJSIP | ✔ | ✔ | ✔ | ✔ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ |
Before continuing with this guide, please review our Asterisk Design Guide for considerations that affect all Asterisk-based deployments.
Asterisk 15
This version supports both T.38 passthrough and T.38 termination. We have configuration instructions for both chan_sip and chan_pjsip, be sure that you're using the right configuration!
Chan_SIP
T.38 Passthrough Support
To integrate T38Fax.com with Asterisk to connect a fax machine to a T.38 capable ATA. This will allow a fax machine to send and receive calls via T38Fax.com with Asterisk in the middle.
- Sign up for a free trial here: Free Trial Signup
-
Check astmoddir (
/usr/lib/asterisk/modules) for two standard modules:chan_sip.soandres_rtp_asterisk.so.If you do not have both modules, you must recompile asterisk:
# Asterisk-13 cd /usr/src curl -L -o asterisk-13.cur.tar.gz https://hubs.ly/H097_fC0 tar xvfz asterisk-13.cur.tar.gz rm -rf asterisk-13.cur.tar.gz cd asterisk-13.* ./configure --libdir=/usr/lib64 make menuselect # Ensure that the following modules are enabled [*] # Channel Drivers/chan_sip # Resource Modules/res_rtp_asterisk make && make install
-
Modify your sip.conf file (
/etc/asterisk/sip.conf):; sip.conf [general] directmedia=no t38pt_udptl=yes,redundancy register=SIP_USERNAME:SIP_PASSWORD@sip.t38fax.com/SIP_USERNAME
Please Note: ReplaceSIP_USERNAMEandSIP_PASSWORDwith your T38Fax account credentials.[t38fax] type=peer context=inboundT38Fax port=5080 qualify=yes qualifyfreq=30 defaultexpiry=300 insecure=port,invite host=sip.t38fax.com realm=sip.t38fax.com secret=SIP_PASSWORD defaultuser=SIP_USERNAME
Please Note: ReplaceSIP_USERNAMEandSIP_PASSWORDwith your T38Fax account credentials.[ATA_SIP_USERNAME] type=friend context=outboundT38Fax qualify=yes qualifyfreq=30 host=dynamic defaultexpiry=300 secret=ATA_SIP_PASSWORD defaultuser=ATA_SIP_USERNAME callerid="John Doe" <"CALLERID-NUMBER">
Please Note: ReplaceSIP_USERNAME,SIP_PASSWORD,ATA_SIP_USERNAME, andATA_SIP_PASSWORDwith your account information. You may need to addnat=yesdepending on your network topology. -
Add the following to your udptl.conf file (
/etc/asterisk/udptl.conf):; udptl.conf udptlstart=10000 udptlend=10999 T38FaxUdpEC=t38UDPRedundancy
-
Modify/Create your extensions.conf file (
/etc/asterisk/extensions.conf):[default] ; This ensures we reply 200 OK to OPTIONS messages. exten => s,1,NoOp( got in default/S ) [inboundT38Fax] exten => DIDX1,1,Dial(SIP/DIDX1) exten => DIDX2,1,Dial(SIP/DIDX2) [outboundT38Fax] exten => _1NXXNXXXXXX!,1,NoOp(caught 11 digits ${EXTEN}) exten => _1NXXNXXXXXX!,n,Dial(SIP/${EXTEN}@t38fax)Please Note: ReplaceDIDX1andDIDX2with your T38Fax DID numbers. -
Configure your ATA to connect to Asterisk.
As an example, to configure a Cisco ATA191:
- Follow the steps found here: Cisco ATA191-MPP - Cisco ATA 191 Multiplatform
- Navigate to "Voice → Line 1".
- Enter your Asterisk Server's address/hostname in the "Proxy" field.
- Enter the context you created in Step 2 in the "Display Name" and "User ID" fields.
- Enter the password for the context you created in Step 3 in the "Password" field.
- Click Submit, and the device should reload its configuration.
- In the Asterisk CLI (
asterisk -r), enter:sip show peer SIP_USERNAME— look for "Status: OK" and "Addr → IP".
T.38 Termination Support
Coming soon!
Chan_PJSIP
T.38 Passthrough Support
To integrate T38Fax with Asterisk to connect a fax machine to a T.38 capable ATA. This will allow a fax machine to send and receive calls via T38Fax.com with Asterisk in the middle.
- Sign up for a free trial here: Free Trial Signup
-
Check astmoddir for
chan_pjsip.soandres_pjsip.so. If missing, download and compile pjproject, then recompile Asterisk.Download & Compile pjproject:
# PJProject cd /usr/src curl -L -o pjproject-2.4.tar.bz2 http://www.pjsip.org/release/2.4/pjproject-2.4.tar.bz2 tar -xjvf pjproject-2.4.tar.bz2 rm -rf pjproject-2.4.tar.bz2 cd pjproject-2.* ./configure CFLAGS="-DNDEBUG" --prefix=/usr --libdir=/usr/lib64 --enable-shared make dep make make install ldconfig ldconfig -p | grep pj
Then recompile Asterisk:
# Asterisk-13 cd /usr/src curl -L -o asterisk-13.cur.tar.gz https://hubs.ly/H097_fC0 tar xvfz asterisk-13.cur.tar.gz rm -rf asterisk-13.cur.tar.gz cd asterisk-13.* ./contrib/scripts/install_prereq install ./configure --libdir=/usr/lib64 make menuselect # Ensure that the following modules are enabled [*] # Channel Drivers/chan_pjsip # Resource Modules/res_pjsip make && make install
-
Modify your pjsip.conf file (
/etc/asterisk/pjsip.conf):; === Transports [system-udp] type=transport protocol=udp bind=0.0.0.0:5080 local_net=172.31.25.0/20 local_net=127.0.0.1/32 external_media_address=52.70.17.6 ; Public IP external_signaling_address=52.70.17.6 allow_reload=yes ; === Trunks [t38fax] type=registration transport=SIP_TRANSPORT outbound_auth=t38fax server_uri=sip:sip.t38fax.com:5080 client_uri=sip:SIP_USERNAME@sip.t38fax.com:5080 retry_interval=60 contact_user=SIP_USERNAME [t38fax] type=auth auth_type=userpass password=SIP_PASSWORD username=SIP_USERNAME [t38fax] type=aor contact=sip:SIP_USERNAME@sip.t38fax.com:5080 [t38fax] type=endpoint context=inboundT38Fax disallow=all allow=ulaw outbound_auth=t38fax aors=t38fax direct_media=no t38_udptl=yes t38_udptl_maxdatagram=400 t38_udptl_ec=redundancy t38_udptl_nat=yes from_domain=sip.t38fax.com [t38fax] type=identify endpoint=t38fax match=sip.t38fax.com
Please Note: ReplaceSIP_USERNAME,SIP_PASSWORD, andSIP_TRANSPORTwith your T38Fax account information.; === Devices [ATA_SIP_USERNAME] type=endpoint transport=SIP_TRANSPORT context=outboundT38Fax force_rport=yes rtp_symmetric=yes direct_media=no aors=ATA_SIP_USERNAME auth=ATA_SIP_USERNAME callerid="T38Fax CallerID" disallow=all allow=ulaw t38_udptl=yes t38_udptl_ec=redundancy t38_udptl_nat=yes [ATA_SIP_USERNAME] type=aor max_contacts=2 remove_existing=yes [ATA_SIP_USERNAME] type=auth auth_type=userpass username=ATA_SIP_USERNAME password=ATA_SIP_PASSWORD
Please Note: ReplaceATA_SIP_USERNAME,ATA_SIP_PASSWORD, andSIP_TRANSPORTwith your account information. -
Modify/Create your extensions.conf file (
/etc/asterisk/extensions.conf):[default] exten => s,1,NoOp( got in default/S ) [inboundT38Fax] exten => DIDX1,1,Dial(PJSIP/DIDX1) exten => DIDX2,1,Dial(PJSIP/DIDX2) [outboundT38Fax] exten => _1NXXNXXXXXX!,1,Set(CALLERID(all)="T38Fax" ) same => n,NoOp(caught 11 digits ${EXTEN}) same => n,Dial(PJSIP/${EXTEN}@t38fax)Please Note: ReplaceDIDX1andDIDX2with your T38Fax DID numbers. -
Add the following to udptl.conf (
/etc/asterisk/udptl.conf):; udptl.conf [general] udptlstart=10000 udptlend=10999 T38FaxUdpEC=t38UDPRedundancy
-
Configure your ATA to connect to Asterisk.
You should now be able to register your ATA to Asterisk and make/receive fax calls using T.38! If you have any trouble, please open a ticket and one of our Support Engineers will assist you.
T.38 Termination Support
Coming Soon!
Asterisk 14
This version supports both T.38 passthrough and T.38 termination. Configuration is identical to Asterisk 15 above for both Chan_SIP and Chan_PJSIP, with the exception that the ATA example references a Cisco SPA-112 instead of the ATA191.
T.38 Termination Support
Coming soon!
Asterisk 13 (LTS)
This version supports both T.38 passthrough and T.38 termination. Configuration is identical to Asterisk 15 above for both Chan_SIP and Chan_PJSIP.
T.38 Termination Support
Coming soon!
Asterisk 12 (STD)
In Asterisk 12, a new SIP channel driver (chan_pjsip) was introduced.
Asterisk 11 (LTS)
This version supports both T.38 passthrough and T.38 termination.
T.38 Passthrough Support
- Sign up for a free trial here: Free Trial Signup
-
Check astmoddir for
chan_sip.soandres_rtp_asterisk.so. If missing:# Asterisk 11 cd /usr/local/src wget -O asterisk-11.cur.tar.gz https://hubs.ly/H0981kw0 tar xvfz asterisk-11.cur.tar.gz rm -rf asterisk-11.cur.tar.gz cd asterisk-11.* ./configure make menuselect # Ensure that the following modules are enabled [*] # Channel Drivers/chan_sip # Resource Modules/res_rtp_asterisk make install
-
Modify your sip.conf file (
/etc/asterisk/sip.conf):; sip.conf directmedia=no t38pt_udptl=yes,redundancy register=SIP_USERNAME:SIP_PASSWORD@sip.t38fax.com/SIP_USERNAME
Please Note: ReplaceSIP_USERNAMEandSIP_PASSWORDwith your T38Fax account credentials.[t38fax] type=peer context=inboundT38Fax qualify=yes qualifyfreq=30 defaultexpiry=300 insecure=port,invite host=sip.t38fax.com realm=sip.t38fax.com defaultuser=SIP_USERNAME secret=SIP_PASSWORD
Please Note: ReplaceSIP_USERNAMEandSIP_PASSWORDwith your T38Fax account credentials.[SIP_USERNAME] type=friend context=outboundT38Fax qualify=yes qualifyfreq=30 host=dynamic defaultexpiry=300 defaultuser=SIP_USERNAME callerid="John Doe" secret=YOUR_ATA_PWORD
Please Note: Replace all placeholder values. You may need to addnat=yesdepending on your network topology.Add the following to udptl.conf (
/etc/asterisk/udptl.conf):; udptl.conf udptlstart=10000 udptlend=10999 T38FaxUdpEC=t38UDPRedundancy
-
Modify/Create your extensions.conf file (
/etc/asterisk/extensions.conf):[default] exten => s,1,NoOp( got in default/S ) [inboundT38Fax] exten => DIDX1,1,Dial(SIP/DIDX1) exten => DIDX2,1,Dial(SIP/DIDX2) [outboundT38Fax] exten => _1NXXNXXXXXX!,1,NoOp(caught 11 digits ${EXTEN}) exten => _1NXXNXXXXXX!,n,Dial(SIP/${EXTEN}@t38fax)Please Note: ReplaceDIDX1andDIDX2with your T38Fax DID numbers. -
Configure your ATA (e.g. Cisco SPA-112):
- Follow the steps found here: Cisco SPA-112 Configuration Guide
- Navigate to "Voice → Line 1".
- Enter your Asterisk Server's address/hostname in the "Proxy" field.
- Enter the context in "Display Name" and "User ID" fields.
- Enter the password in the "Password" field and click Submit.
- In Asterisk CLI:
sip show peer SIP_USERNAME
T.38 Termination Support
- Sign up for a free trial here: Free Trial Signup
-
Prepare your system:
# CentOS 7.x/6.x yum -y install perl cpan libyaml perl-YAML perl-Time-HiRes libwww-perl # CentOS 7.x yum -y install libtiff-tools # CentOS 6.x yum -y install libtiff libtiff-devel
-
Install mime-construct support tools:
PERL_MM_USE_DEFAULT=1 perl -MCPAN -e "install Proc::WaitStat" PERL_MM_USE_DEFAULT=1 perl -MCPAN -e "install MIME::Types"
-
Install mime-construct:
cd /usr/local/src wget http://search.cpan.org/CPAN/authors/id/R/RO/ROSCH/mime-construct-1.11.tar.gz tar xvfz mime-construct-1.11.tar.gz rm -rf mime-construct-1.11.tar.gz cd mime-construct-1.11 perl Makefile.PL make install
-
Install spandsp:
# Inst. SpanDSP cd /usr/local/src wget http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.6.tar.gz tar xvfz spandsp-0.0.6.tar.gz rm -rf spandsp-0.0.6.tar.gz cd spandsp-0.0.6 ./configure --prefix=/usr make make install
-
Check astmoddir for four modules:
chan_sip.so,res_rtp_asterisk.so,res_fax.so,res_fax_spandsp.so. If missing:# Asterisk 11 cd /usr/local/src wget -O asterisk-11.cur.tar.gz https://hubs.ly/H0981kw0 tar xvfz asterisk-11.cur.tar.gz rm -rf asterisk-11.cur.tar.gz cd asterisk-11.* ./configure make menuselect # ensure the following four modules are enabled [*] # Channel Drivers/chan_sip # Resource Modules/res_rtp_asterisk # Resource Modules/res_fax # Resource Modules/res_fax_spandsp make install
-
Modify your sip.conf file (
/etc/asterisk/sip.conf):; sip.conf t38pt_udptl=yes,redundancy register=SIP_USERNAME:SIP_PASSWORD@sip.t38fax.com/SIP_USERNAME
Please Note: ReplaceSIP_USERNAMEandSIP_PASSWORDwith your T38Fax.com account credentials.[t38fax] type=peer context=inboundT38Fax qualify=yes qualifyfreq=300 defaultexpiry=600 insecure=port,invite host=sip.t38fax.com realm=sip.t38fax.com defaultuser=SIP_USERNAME secret=SIP_PASSWORD
Please Note: ReplaceSIP_USERNAMEandSIP_PASSWORDwith your T38Fax.com account credentials. -
Modify/Create your extensions.conf file (
/etc/asterisk/extensions.conf):[globals] VSA=/var/spool/asterisk FAXRCPT=YOUR_ADDR@EXAMPLE.COM [default] exten => s,1,NoOp( got in default/S ) [inboundT38Fax] exten => s,n,Goto(fax,rx,1) [fax] exten => rx,1,NoOp( ** RECEIVING FAX ** ) exten => rx,n,Answer exten => rx,n,StopPlaytones exten => rx,n,Set(FAXFILEBASE=${VSA}/fax/${CALLERID(num)}-${EPOCH}) exten => rx,n,Set(FAXFILE=${FAXFILEBASE}.tif) exten => rx,n,Wait(1) exten => rx,n,ReceiveFAX(${FAXFILE}) exten => tx,1,NoOp( ** SENDING FAX ** ) exten => tx,n,Wait(6) exten => tx,n,Set(FAXOPT(localstationid)=SIP_USERNAME) exten => tx,n,SendFAX(${VSA}/fax/channel-001.tiff,dfz) exten => h,1,Noop(FAX ${FAXOPT(status)} from ${CALLERID(all)}: ${FAXOPT(error)}) exten => h,n,System(/usr/local/script/fax2mail -p --cid-name ${CALLERID(name)} --cid-number ${CALLERID(num)} --dest-exten ${DNID} --dest-email ${FAXRCPT} -f ${FAXFILEBASE}) exten => h,n,NoOp(FAXOPT(ecm) : ${FAXOPT(ecm)}) exten => h,n,NoOp(FAXOPT(filename) : ${FAXOPT(filename)}) exten => h,n,NoOp(FAXOPT(headerinfo) : ${FAXOPT(headerinfo)}) exten => h,n,NoOp(FAXOPT(localstationid) : ${FAXOPT(localstationid)}) exten => h,n,NoOp(FAXOPT(maxrate) : ${FAXOPT(maxrate)}) exten => h,n,NoOp(FAXOPT(minrate) : ${FAXOPT(minrate)}) exten => h,n,NoOp(FAXOPT(pages) : ${FAXOPT(pages)}) exten => h,n,NoOp(FAXOPT(rate) : ${FAXOPT(rate)}) exten => h,n,NoOp(FAXOPT(remotestationid) : ${FAXOPT(remotestationid)}) exten => h,n,NoOp(FAXOPT(resolution) : ${FAXOPT(resolution)}) exten => h,n,NoOp(FAXOPT(status) : ${FAXOPT(status)}) exten => h,n,NoOp(FAXOPT(statusstr) : ${FAXOPT(statusstr)}) exten => h,n,NoOp(FAXOPT(error) : ${FAXOPT(error)}) exten => _[it],1,Hangup()Please Note: ReplaceSIP_USERNAMEandSIP_PASSWORDwith your T38Fax.com account credentials. -
Install fax2mail script:
mkdir -p /usr/local/script cd /usr/local/script wget -O fax2mail https://bitbucket.org/T38Guru/fax2mail/raw/78ea18ee5b1f9273e4062010750c8e08bd20770a/fax2mail chmod ugo+x fax2mail
-
Make the fax directory:
mkdir /var/spool/asterisk/fax
Please Note: TIFF files will accumulate in/var/spool/asterisk/fax. Use cron or another method to periodically remove them.
Asterisk 10 (Standard)
This was the first release that included T.38 Fax Gateway Support.
Asterisk 1.8
T.38 Passthrough Support
- Sign up for a free trial here: Free Trial Signup
-
Check astmoddir for
chan_sip.soandres_rtp_asterisk.so. If missing:# Asterisk 1.8 cd /usr/src wget -O asterisk-1.8.cur.tar.gz https://hubs.ly/H0981pZ0 tar xvfz asterisk-1.8.cur.tar.gz rm -rf asterisk-1.8.cur.tar.gz cd asterisk-1.8.* ./configure make menuselect # Ensure that the following two modules are enabled [*] # Channel Drivers/chan_sip # Resource Modules/res_rtp_asterisk make install
-
Modify your sip.conf file (
/etc/asterisk/sip.conf):; sip.conf directmedia=no t38pt_udptl=yes,redundancy register=SIP_USERNAME:SIP_PASSWORD@sip.t38fax.com/SIP_USERNAME
Please Note: ReplaceSIP_USERNAMEandSIP_PASSWORDwith your T38Fax.com account credentials.[t38fax] type=peer context=inboundT38Fax qualify=yes defaultexpiry=600 insecure=port,invite host=sip.t38fax.com realm=sip.t38fax.com defaultuser=SIP_USERNAME secret=SIP_PASSWORD
Please Note: ReplaceSIP_USERNAMEandSIP_PASSWORDwith your T38Fax.com account credentials.[SIP_USERNAME] type=friend context=outboundT38Fax qualify=yes qualifyfreq=600 host=dynamic defaultexpiry=600 defaultuser=SIP_USERNAME callerid="John Doe" secret=ATA_SIP_PASSWORD
Please Note: Replace all placeholder values. You may need to addnat=yesdepending on your network topology.Add the following to udptl.conf (
/etc/asterisk/udptl.conf):; udptl.conf udptlstart=10000 udptlend=10999 T38FaxUdpEC=t38UDPRedundancy
-
Modify/Create your extensions.conf file (
/etc/asterisk/extensions.conf):[default] exten => s,1,NoOp( got in default/S ) [inboundT38Fax] exten => DIDX1,1,Dial(SIP/DIDX1) exten => DIDX2,1,Dial(SIP/DIDX2) [outboundT38Fax] exten => _1NXXNXXXXXX!,1,NoOp(caught 11 digits ${EXTEN}) exten => _1NXXNXXXXXX!,n,Dial(SIP/${EXTEN}@t38fax)Please Note: ReplaceDIDX1andDIDX2with your T38Fax.com DID numbers. -
Configure your ATA (e.g. Cisco SPA-112):
- Follow the steps found here: Cisco SPA-112 Configuration Guide
- Navigate to "Voice → Line 1".
- Enter your Asterisk Server's address/hostname in the "Proxy" field.
- Enter the context in "Display Name" and "User ID" fields.
- Enter the password in the "Password" field and click Submit.
- In Asterisk CLI:
sip show peer SIP_USERNAME
T.38 Termination Support
- Sign up for a free trial here: Free Trial Signup
-
Prepare your system:
# CentOS 7.x/6.x yum -y install perl cpan libyaml perl-YAML perl-Time-HiRes libwww-perl # CentOS 7.x yum -y install libtiff-tools # CentOS 6.x yum -y install libtiff
-
Install mime-construct support tools:
PERL_MM_USE_DEFAULT=1 perl -MCPAN -e "install Proc::WaitStat" PERL_MM_USE_DEFAULT=1 perl -MCPAN -e "install MIME::Types"
-
Install mime-construct:
cd /usr/local/src wget http://search.cpan.org/CPAN/authors/id/R/RO/ROSCH/mime-construct-1.11.tar.gz tar xvfz mime-construct-1.11.tar.gz rm -rf mime-construct-1.11.tar.gz cd mime-construct-1.11 perl Makefile.PL make install
-
Install spandsp:
# SpanDSP cd /usr/src wget http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.6.tar.gz tar xvfz spandsp-0.0.6.tar.gz rm -rf spandsp-0.0.6.tar.gz cd spandsp-0.0.6 ./configure --prefix=/usr make make install
-
Check astmoddir for four modules:
chan_sip.so,res_rtp_asterisk.so,res_fax.so,res_fax_spandsp.so. If missing:# Asterisk 1.8 cd /usr/src wget -O asterisk-1.8.cur.tar.gz https://hubs.ly/H0981pZ0 tar xvfz asterisk-1.8.cur.tar.gz rm -rf asterisk-1.8.cur.tar.gz cd asterisk-1.8.* ./configure make menuselect # Ensure the following four modules are enabled [*] # Channel Drivers/chan_sip # Resource Modules/res_rtp_asterisk # Resource Modules/res_fax # Resource Modules/res_fax_spandsp make install
-
Modify your sip.conf file (
/etc/asterisk/sip.conf):; sip.conf t38pt_udptl=yes,redundancy register=SIP_USERNAME:SIP_PASSWORD@sip.t38fax.com/SIP_USERNAME
Please Note: ReplaceSIP_USERNAMEandSIP_PASSWORDwith your T38Fax.com account credentials.[t38fax] type=peer context=inboundT38Fax qualify=yes qualifyfreq=30 insecure=port,invite defaultexpiry=300 host=sip.t38fax.com realm=sip.t38fax.com defaultuser=SIP_USERNAME secret=SIP_PASSWORD
Please Note: ReplaceSIP_USERNAMEandSIP_PASSWORDwith your T38Fax.com account credentials. -
Modify/Create your extensions.conf file (
/etc/asterisk/extensions.conf):[globals] VSA=/var/spool/asterisk FAXRCPT=YOUR_EMAIL@EXAMPLE.COM [default] exten => s,1,NoOp( got in default/S ) [inboundT38Fax] exten => s,n,Goto(fax,rx,1) [fax] exten => rx,1,NoOp( ** RECEIVING FAX ** ) exten => rx,n,Answer exten => rx,n,StopPlaytones exten => rx,n,Set(FAXFILEBASE=${VSA}/fax/${CALLERID(num)}-${EPOCH}) exten => rx,n,Set(FAXFILE=${FAXFILEBASE}.tif) exten => rx,n,Wait(1) exten => rx,n,ReceiveFAX(${FAXFILE}) exten => tx,1,NoOp( ** SENDING FAX ** ) exten => tx,n,Wait(6) exten => tx,n,Set(FAXOPT(localstationid)=SIP_USERNAME) exten => tx,n,SendFAX(${VSA}/fax/channel-001.tiff,dfz) exten => h,1,Noop(FAX ${FAXOPT(status)} from ${CALLERID(all)}: ${FAXOPT(error)}) exten => h,n,System(/usr/local/script/fax2mail -p --cid-name ${CALLERID(name)} --cid-number ${CALLERID(num)} --dest-exten ${DNID} --dest-email ${FAXRCPT} -f ${FAXFILEBASE}) exten => h,n,NoOp(FAXOPT(ecm) : ${FAXOPT(ecm)}) exten => h,n,NoOp(FAXOPT(filename) : ${FAXOPT(filename)}) exten => h,n,NoOp(FAXOPT(headerinfo) : ${FAXOPT(headerinfo)}) exten => h,n,NoOp(FAXOPT(localstationid) : ${FAXOPT(localstationid)}) exten => h,n,NoOp(FAXOPT(maxrate) : ${FAXOPT(maxrate)}) exten => h,n,NoOp(FAXOPT(minrate) : ${FAXOPT(minrate)}) exten => h,n,NoOp(FAXOPT(pages) : ${FAXOPT(pages)}) exten => h,n,NoOp(FAXOPT(rate) : ${FAXOPT(rate)}) exten => h,n,NoOp(FAXOPT(remotestationid) : ${FAXOPT(remotestationid)}) exten => h,n,NoOp(FAXOPT(resolution) : ${FAXOPT(resolution)}) exten => h,n,NoOp(FAXOPT(status) : ${FAXOPT(status)}) exten => h,n,NoOp(FAXOPT(statusstr) : ${FAXOPT(statusstr)}) exten => h,n,NoOp(FAXOPT(error) : ${FAXOPT(error)}) exten => _[it],1,Hangup()Please Note: ReplaceSIP_USERNAMEandSIP_PASSWORDwith your T38Fax.com account credentials. -
Install fax2mail script:
mkdir -p /usr/local/script cd /usr/local/script wget -O fax2mail https://bitbucket.org/T38Guru/fax2mail/raw/78ea18ee5b1f9273e4062010750c8e08bd20770a/fax2mail chmod ugo+x fax2mail
-
Make the fax directory:
mkdir /var/spool/asterisk/fax
Please Note: TIFF files will accumulate in/var/spool/asterisk/fax. Use cron or another method to periodically remove them.
Asterisk 1.6
T.38 Passthrough & T.38 Termination (receives faxes via ReceiveFax)
Asterisk 1.4
T.38 Passthrough Only. T.38 Passthrough allows Asterisk to carry T.38 UDPTL from one T.38-speaking endpoint to another T.38-speaking endpoint. Asterisk does not modify the media.
Asterisk 1.2
No T.38 capability at all.
Comments
0 comments
Please sign in to leave a comment.