返回列表 發帖

IAXmodem and Asterisk

先來一個帖子關於

來源: http://wiki.sangoma.com/wanpipe-linux-asterisk-faxing

Faxing using Asterisk-IAXmodem-HylaFax

Robust and reliable faxing can be achieved by using HylaFax. Iaxmodem is used to interface Asterisk with HylaFax.

PSTN <-> Sangoma Card <-> Zaptel <-> Asterisk <-> IAXmodem  

IAXmodem website: http://iaxmodem.sourceforge.net/
Softwitch (Spandsp) website: http://www.soft-switch.org/
HylaFax website: http://www.hylafax.org/

Please note that this is a quickstart guide, for more detailed configuration check the respective product websites and READMEs.

1. Package requirements

    libtiff
    libtiff-devel

2. Installing IAXmodem
    Untar your IAXmodem tarball (/usr/src/)
    #> cd /usr/src/
    #> tar xvfz iaxmodem-0.1.14.tar.gz
    Install libiax2:

    The libiax2 source is included with IAXmodem
    #> cd /usr/src/iaxmodem-0.1.14/lib/libiax2
    #> ./configure
    #> make; make  install

    Install spandsp:

    The spandsp source is included with IAXmodem
    #> cd /usr/src/iaxmodem-0.1.14/lib/spandsp
    #> ./configure
    #> make; make  install

    Install IAXmodem and create a symbolic link for IAXmodem in /usr/sbin

    #> cd /usr/src/iaxmodem-0.1.14/
    #> ./build
    #> ln -s /usr/sbin/iaxmodem iaxmodem

3. Running IAXmodem

    IAXmodem can be run in daemon and non-daemon mode, it is recommended to run IAXmodem in non-daemon mode during the installation/configuration for easier debugging and then run it in daemon mode once all configuration is working.

    Create the /etc/iaxmodem/ directory to store your  IAXmodem configuration files:
    #> mkdir /etc/iaxmodem

    You will need a separate configuration file for each fax line. Configuration for each fax line are  stored in /etc/iaxmodem/<name of fax device>.

    Create a configuration file for a fax device called ttyIAX1
    #> vi /etc/iaxmodem/ttyIAX1
    ---begin here---
    device          /dev/ttyIAX1
    uucp:uucp
    mode            660
    port            4571 ; you will need a different port for each device
    refresh         60
    server          127.0.0.1
    peername        iaxmodem1
    secret          password
    cidname         John Doe
    cidnumber       8005551212
    codec           ulaw
    ---end here---

    For more details about parameter options, see /usr/src/iaxmodem/README

    Add an IAX account for this modem in Asterisk:
    #> vi /etc/asterisk/iax.conf
    ---begin here---
    [iaxmodem1]
    type=friend
    secret=password
    host=dynamic
    port=4671
    context=outgoingfax
    allow=all
    ---end here---

    type "reload" in the Asterisk CLI to apply changes.

    Start IAXmodem for ttyIAX1
    #> iaxmodem ttyIAX1

    Start hylafax for ttyIAX1

我現在的setup 是

asterisk + IAXModem (裝咗4個 ports,如果你有多個一條line, 我估可以同發。
Frontend 就用 avantfax

Fax out 絕對冇問題,fax in 未試,因為現時的dialing rule 去咗其他地方,未有時間攪。

TOP

Thanks! 呢個帖好有用,要慢慢研究學習。

而且最近新出很多Multi-function 的打印機似乎又開始捨棄了FAX功能,只剩下Print + Scan + Copy 的用途。  Faxing using Asterisk-IAXmodem-HylaFax 真的非常實用。

TOP

For frontend, try to install avantfax

http://www.avantfax.com/

Installation below

http://www.avantfax.com/install.php

screenshot.03-03-2011 22.30.01.jpg (71.99 KB)

screenshot.03-03-2011 22.30.01.jpg

TOP

my setup for iaxmodem
/etc/iaxmodem/ttyIAX0

device          /dev/ttyIAX0
owner           uucp:uucp
mode            660
port            4570
refresh         300
server          192.168.1xx.xx
peername        iax-fax0
secret          iaxmodemfax0
codec           alaw
cidname          someone Fax #0
cidnumber       some number

iax.conf at /etc/asterisk

[iax-fax0]
type=friend
host= 192.168.1xx.xx
port=4570
context=fax-out
requirecalltoken=no
disallow=all
allow=alaw
jitterbuffer=no
qualify=yes
secret=iaxmodemfax0
calltokenoptional = 0.0.0.0/0.0.0.0

[iax-fax1]
type=friend
host= 192.168.1xx.xx
port=4571
context=fax-out
requirecalltoken=no
disallow=all
allow=alaw
jitterbuffer=no
qualify=yes
secret=iaxmodemfax1
calltokenoptional = 0.0.0.0/0.0.0.0

[iax-fax2]
type=friend
host= 192.168.1xx.xx
port=4572
context=fax-out
requirecalltoken=no
disallow=all
allow=alaw
jitterbuffer=no
qualify=yes
secret=iaxmodemfax2
calltokenoptional = 0.0.0.0/0.0.0.0

[iax-fax3]
type=friend
host=192.168.1xx.xx
port=4573
context=fax-out
requirecalltoken=no
disallow=all
allow=alaw
jitterbuffer=no
qualify=yes
secret=iaxmodemfax3
calltokenoptional = 0.0.0.0/0.0.0.0

TOP

I have installed IAXmodem (not install HylaFax and AvanFAX at this moment).  When I try to confirm whether IAXmodem is properly installed. I got the following.  What does it imply?

#> /etc/iaxmodem/ttyIAX0
iaxmodem.png

TOP

回復 6# bubblestar


    You need hylafax as backend

TOP

IAXmodem and HylaFax installed successfully.  

Going to see how to install AvanFax.  Seems a bit difficult.

TOP

回復 8# bubblestar


    Can you fax out?

TOP

Some more screenshot using Avantfax.

screenshot.11-03-2011 06.47.23.jpg

I use HKBN 2b account to fax in and out. 100% software based
Avantfax allows me to send / receive faxes via web gui. Then forward via email.

I have installed an OCR for fax but not tested.

TOP

If you use trixbox, follow this guide to setup

http://fonality.com/trixbox/foru ... ms/help/hylafax-how

TOP

For general purpose outbound fax,
雯雯介紹的
www.outfax.com

唔錯。

TOP

回復 5# ckleea


除了早幾天安裝了的 iaxModem + HylaFAX,昨晚終於也裝好 frontend 的 AvantFax 了。
   
至於Asterisk 連接三者方面,可否POST 你的 fax extension.conf 是如何實現 fax-in 和 fax-out,看了一些寫法,但 IN、OUT 寫的都各有差異,似是一樣但卻又不同,愈看得多,愈覺得不太明白他們的寫法,最後混亂了,要暫停一下。

TOP

in Extensions.conf

fax in,
I use 2b

exten => hkbn2b,n,Dial(IAX2/iax-fax2/${CALLERID(number)},20,d)


[fax-out]
exten => _X.,1,Dial(SIP/hkbn2b/${EXTEN})

TOP

Callerid not working at the moment

TOP

返回列表