[posted by Jill Rouleau on chromis blog] It is well documented how to configure hardware independent faxing using HylaFAX and IAXModem with Asterisk and trixbox, but not for Switchvox. So I created a Switchvox-specific walkthrough. This configuration was tested on a Shuttle PC, then implemented on a Xen virtual machine. It should work with any Linux distribution and hardware that support Hylafax. Source code is available at: http://sourceforge.net/projects/iaxmodem/ and http://www.hylafax.org/content/Download. If you compile from source, you will need to create a few directories manually, such as /etc/iaxmodem/ and /var/log/iaxmodem/ with files /var/log/iaxmodem/iaxmodem and /var/log/iaxmodem/ttyIAX0.
IAXmodem: apt-get install iaxmodem touch /etc/iaxmodem/ttyIAX0
Then edit like such. If you want more than one IAXmodem create a section for each, using /dev/ttyIAX1, /dev/ttyIAX2, etc:
device /dev/ttyIAX0 [device name]
owner uucp:uucp [device owner:group]
mode 660 [permissions given to any files created by the modem; ie faxes]
port 4570 [port to listen on; generally 4570. if you have multiple IAXmodems create the next port as 4571, etc. Switchvox will listen on 4569]
refresh 50 [refresh interval]
server 192.168.1.250 [IP of the Switchvox server]
peername iaxmodem [pick a name to be used for registration with the Switchvox]
secret password [pick a password to be exchanged with the Switchvox]
codec alaw [specify the codecs supported]
codec ulaw [specify the codecs supported]
Add the new tty to init, so that it will be started automatically on boot: echo "IA00:23:respawn:/usr/bin/iaxmodem ttyIAX0" >> /etc/inittab
If you have more that one IAXmodem, add them as well (as ttyIAX1, etc).
Make sure a getty is listening for ttyIAX0: echo "mo00:23:respawn:/usr/sbin/faxgetty ttyIAX0" >> /etc/inittab
Again, if you have more than one IAXmodem add as appropriate. It’s generally helpful to do a reboot now to make sure everything starts up correctly .
Hylafax: apt-get install hylafax-server
Run faxsetup, answering as appropriate (In the interest of brevity I will assume you are familiar with the Hylafax set-up process. If not, detailed Hylafax instructions are widely available on the web. Just make sure to use /dev/ttyIAX0 instead of an actual serial port or modem port).
There are sometimes bad references to fonts directories in hyla.conf on Debian based distros. If so you will see an error "hylafax textfmt: No font metric information found for "Courier-Bold"” when trying to fax using sendfax. Your situation may vary, but in my case it was fixed by changing FontMap and FontPath in /etc/hylafax/hyla.conf to:
FontMap:/usr/share/ghostscript/8.62/lib
FontPath: /usr/share/fonts/type1/gsfonts
Switchvox:
Under VOIP Providers:
Add New: IAX Provider
IAX Provider Name can be anything
IAX Provider label is from your ttyIAX0 file
Account ID is same
Password: the password from your ttyIAX0 file
Hostname or IP: the Hylafax box
Advanced Settings:
Registration Type is Client
Host is Switchvox and Treat User as Local are both No
Jabber hostname blank
Save, and verify registration under Diagnostics – System Status.
Make sure you have an SRV record for Switchvox in your DNS. This may impede IAX registration otherwise.
Bind example: _iax._udp SRV 10 10 4569 iax.domain.net
Where iax.domain.net points to your Switchvox IP
Example, if iax.domain.net = 192.168.1.251 then in domain.net.zone you would enter:
_iax._udp SRV 10 10 4569 iax.domain.net
iax IN A 192.168.1.251
If your Switchvox uses a ‘dial 9 to get out’ or similar rule, you will need to either: modify your Hylafax to prepend the 9 (or whatever number you use), add an outgoing call rule in Switchvox to not use the 9 on Hylafax calls (then reference said rules in the VOIP Provider/IAX config), or just remember to dial the 9 when faxing through Hylafax.
Now, test faxing.
sendfax -d -n 4805551212 /path/to/test/fax.txt
Additional Information
IAXmodem: http://iaxmodem.sourceforge.net/
Hylafax: http://www.hylafax.org/content/Main_Page
Digium Switchvox Admin Manual: http://docs.digium…admin_manual.pdf
Debian: http://www.debian.org/
|
||||
Since the launch of VoIP Today, we had a special interviews done with the VoIP masters in the world. |