Koozali.org: home of the SME Server

Help with SAIL and FAX please

Offline billym

  • 16
  • +0/-0
Help with SAIL and FAX please
« on: June 10, 2008, 06:16:34 PM »
I have read multiple posts in the forum and apparently still dont get it so I am asking for help on configuring a clean box to handle faxing with hylafax, sail, and iaxmodem (no physical modems, need to use sip trunk). For some reason I was under the impression that a large amount of this is already setup in the latest versions of sail. I am not sure if this is a installation sequence thing, a - I am a moron and its right in front of me thing or what, but could use any help that can be provided. This is what I have.

I installed in this order

A clean install of 7.3 in Server-Gateway mode with all updates.

putty'd into server and executed these commands:

1) install smeserver-hylafax w/ hylafax-4.4.4-1 rpm (using instuctions from - http://wiki.contribs.org/HylaFax) - (when completed run - signal-event post-upgrade; signal-event reboot)
2) wget http://selintra.co.uk/sail/sail-2.2.1/sail-2.2.1-631.noarch.rpm
3) yum localinstall sail-2.2.1-631.noarch.rpm --enablerepo=base (when completed run - signal-event post-upgrade; signal-event reboot)

* Although (http://www.selintra.com/docs/cgi-bin/view/Main/DocChapter03b) states that it will add a repo to yum, it did not in my case

4) Manually add [atrpms] repo listed at the above url to your /etc/yum.conf
5) yum install zaptel --enablerepo=atrpms
6) yum install libpri  --enablerepo=atrpms
7) yum install asterisk --enablerepo=atrpms
8) yum install zaptel-kmdl-`uname -r` --enablerepo=atrpms
9) yum install asterisk-addons  --enablerepo=atrpms (when completed run - signal-event post-upgrade; signal-event reboot)

* Note: I did not install IAXModem - I read in a recent post that it was integrated into the sail install

10) Log into server-manager and configure globals with:
                Autosense FAX Extension = 5000
                FAX Detect Delay = 2
11) Configure trunk (my provider is telasip) with:
                Open Inbound Route = 5000
12) Create Extension with:
                Device = IAXModem
                User to receive voicemail notifications = admin@emailaddress.com
13) attempt to send a fax to the DID that is assigned to the trunk.

Result is that the call is treated like a regular extension and does nothing but route to voicemail after no pickup.

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Help with SAIL and FAX please
« Reply #1 on: June 10, 2008, 11:21:04 PM »
Hello Billym,

IAXmodem is not delivered as part of sail.  It was included in a couple of releases specifically for beta testing by some interested third parties.  It's not in -631.

Without going too heavily into the reasons, IAXmodem & Hylafax simply make SME/SAIL/Asterisk too big to fit on a 2Gb chip.  Turns out that this is important to several of our commercial consumers.  That said, you can install IAXmodem and you should be good to go.  We have an experimental rpm if you'd like to give it a go.  I've just installed it on a spare box and it registered fine with SAIL/Asterisk.

As installed it wants to come up as extn 2000.  You'll need to make a couple of changes to the generated iax entry...  It should look like this when you've done

Code: [Select]
[2000]
type=friend
username=iaxm
secret=asterisk
host=dynamic
qualify=3000
context=internal
callerid="iaxm" <2000>
disallow=all
allow=slin

The IAXmodem config (/etc/iaxmodem/ttyIAX0) looks like this (you should change it for your callerid etc).

Code: [Select]
# cat /etc/iaxmodem/ttyIAX0
device          /dev/ttyIAX
owner           uucp:uucp
mode            660
port            4570
refresh         60
server          127.0.0.1
peername        2000
secret          asterisk
cidname         Selintra
cidnumber       01924489620
codec           slinear

Here's what happens when you fire it up...

Code: [Select]
]# iaxmodem -F ttyIAX0
[2008-06-10 22:10:10] Modem started
[2008-06-10 22:10:10] Setting device = '/dev/ttyIAX'
[2008-06-10 22:10:10] Setting owner = 'uucp:uucp'
[2008-06-10 22:10:10] Setting mode = '660'
[2008-06-10 22:10:10] Setting port = 4570
[2008-06-10 22:10:10] Setting refresh = 60
[2008-06-10 22:10:10] Setting server = '127.0.0.1'
[2008-06-10 22:10:10] Setting peername = '2000'
[2008-06-10 22:10:10] Setting secret = 'asterisk'
[2008-06-10 22:10:10] Setting cidname = 'Selintra'
[2008-06-10 22:10:10] Setting cidnumber = '01924489620'
[2008-06-10 22:10:10] Setting codec = slinear
[2008-06-10 22:10:10] Opened pty, slave device: /dev/pts/0
[2008-06-10 22:10:10] Created /dev/ttyIAX symbolic link
[2008-06-10 22:10:10] Registration completed successfully.
   

...and here's what you see at the asterisk console...

Code: [Select]
    -- Registered IAX2 '2000' (AUTHENTICATED) at 127.0.0.1:4570   

There isn't a start-up daemon for it so you'll have to start it manually like this...

Code: [Select]
iaxmodem -F ttyIAX0
You can download the rpm here

http://www.selintra.co.uk/sail/iaxmodem


Seems all to work OK and it should save you from having to compile it yourself.

There is just one other thing (maybe two).  SAIL will not attempt to autosense FAX on a SIP trunk.  WAN SIP FAX just doesn't work reliably.  There are a few posts out there by people who claim to have done it, but we remain extremely sceptical.  If it did work, then thousands of man hours would not have been spent developing T38.  Having said that, LAN SIP FAX is usually OK, provided your LAN isn't too heavily loaded, which is the whole point of IAXmodem.  We've set SAIL up to handle commercial DiD FAX incoming over digital (PRI & BRI) lines and handing the FAX DiD directly to IAXmodem (at least that's what we're working towards).   

Hope this helps.


Kind Regards


« Last Edit: June 11, 2008, 12:06:29 AM by selintra »

Offline billym

  • 16
  • +0/-0
Re: Help with SAIL and FAX please
« Reply #2 on: June 11, 2008, 01:04:59 AM »
I followed the additional steps and have run into an issue.

When I try to start iaxmodem with: iaxmodem -F ttyIAX0
I get an empty prompt back.

/var/log/iaxmodem/iaxmodem = [2008-06-10 17:55:08] Modem started
/var/log/iaxmodem/ttyIAX0 = [2008-06-10 17:55:08] Removed old /dev/ttyIAX0
/var/log/iaxmodem/ttyIAX0 = [2008-06-10 17:55:10] Registration failed.

Asterisk in sip debug returns = [Jun 10 18:04:29] NOTICE[9226]: chan_iax2.c:5555 register_verify: Host 127.0.0.1 failed MD5 authentication for '2000' (cf19d2dd98b9e8933fb7ac02b2825ccc != f0f0ff6a3d0a6bfb3f570969c1355fa6)

Any ideas why?

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Help with SAIL and FAX please
« Reply #3 on: June 11, 2008, 01:17:13 AM »
I used a bit of poetic licence in the last post.  iaxmodem -F ttyIAX0 will return an empty prompt.  If you want to see the output ytou must run it in foreground - iaxmodem ttyIAX0.

Anyhow, the main thing is that it's failing to register...

Code: [Select]
Asterisk in sip debug returns = [Jun 10 18:04:29] NOTICE[9226]: chan_iax2.c:5555 register_verify: Host 127.0.0.1
 failed MD5 authentication for '2000' (cf19d2dd98b9e8933fb7ac02b2825ccc != f0f0ff6a3d0a6bfb3f570969c1355fa6)

...which means there is a mismatch between what's in /etc/iaxmodem/ttyIAX0 and what's in iax.conf.  Did you set the iaxmodem up as ext 2000 on sail?  Did you modify the settings in iax.conf to match the previous post?

Kind Regards

S

 
« Last Edit: June 11, 2008, 01:19:05 AM by selintra »

Offline billym

  • 16
  • +0/-0
Re: Help with SAIL and FAX please
« Reply #4 on: June 11, 2008, 01:34:20 AM »
here is my iax.conf when viewed from the Sail's "General Edit" link in SME.

;#------------------------------------------------------------
;# DO NOT MODIFY THIS FILE! It is updated automatically by the
;# SAIL & SME Server software. Instead, modify the source template in
;# an /etc/e-smith/templates-custom directory. For more
;# information, see http://www.e-smith.org/custom/
;#
;# copyright (C) 2005 Selintra Ltd. United Kingdom
;#------------------------------------------------------------

[general]
tos=0x18
maxexpirey=180
defaultexpirey=160
jitterbuffer=no
disallow=all
allow=gsm
allow=ulaw
allow=alaw



   

;
;==========================================================================
;      This is where we deal with generated IAX phones. We generate 
;      an IAX extension if iaxextn is set to Yes. 
;      Both SIP and IAX will have the same extension number and both
;      will ring if they are connected when a call comes in. 
;==========================================================================
;
;Internal IP phones

[2000]
type=friend

username=iaxm
secret=asterisk
host=dynamic
qualify=3000
context=internal
callerid="iaxm" <2000>
disallow=all

allow=slin


;External IAX2 lines
;
;==========================================================================
;      This is where we deal with IAX2 trunks (if any).
;      We generate 2 entries (peer and user) for each. 
;==========================================================================
;

;


Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Help with SAIL and FAX please
« Reply #5 on: June 12, 2008, 09:40:27 PM »
well...

It looks the same as ours but ours works so I'm stumped.  I can only suggest you try adding auth=md5 to the iax stanza.

Best

S

Offline gippsweb

  • ****
  • 232
  • +0/-0
    • Wots I.T.?
Re: Help with SAIL and FAX please
« Reply #6 on: June 13, 2008, 02:44:45 AM »
doesn't the username need to be the extension instead of the cid name??

Offline apmuthu

  • *
  • 244
  • +0/-0
Re: Help with SAIL and FAX please
« Reply #7 on: December 13, 2009, 03:06:30 PM »
Any Updates for FAX in SARK in the lastest SAIL?
Is IAXModem integrated into the latest SAIL (v2.3.2-19 or v2.4.1-2 beta)?
Elastix has HylaFAX builtin and so has PiaF.

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Help with SAIL and FAX please
« Reply #8 on: December 13, 2009, 08:49:15 PM »
There are no recent updates to SAIL FAX processing (except a small bugfix which was put into the trunk a few days ago).
We have no plans to integrate IAXmodem, or HylafAX, into SAIL.  That doesn't mean that you can't run IAXmodem and Hylafax under SME, you'll just need to install them separately if you want them.

Kind Regards

S

Offline apmuthu

  • *
  • 244
  • +0/-0
Re: Help with SAIL and FAX please
« Reply #9 on: December 14, 2009, 02:58:08 AM »
Thanks for the info. The SAIL trunk for IAXModem  (is it elsewhere?) shows the following files:
Quote
iaxmodem-1.0.0-1.noarch.rpm 14-Jun-2008 14:41   190k 
iaxmodem-1.0.0-1.src.rpm      13-Dec-2009 15:51   372k
Can the second file be used directly instead of the first?
If so, should the second file be compiled before using it?

The second file (src.rpm) has an earlier dated (by a few days in May 2008) /usr/sbin/local/iaxmodem binary that is twice the size (because of src in it) of the corresponding file in the first (noarch.rpm) file. Hence where is the bugfix of a few days ago (Dec 2009)?

The SourceForge Project Page for IAXModem states that the last version released is iaxmodem v1.2.0 (3.1 MB) in Feb 2009.

After the SAIL IAXModem May 2008 release referred here, the SourceForge Project Page lists 2 BugFix Patches:

Fix libiax2 unaligned errors : 2008-07-02 16:00

Answer before Hangup (IAX) : 2009-11-20 09:12




« Last Edit: December 14, 2009, 03:42:41 AM by apmuthu »

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Help with SAIL and FAX please
« Reply #10 on: December 14, 2009, 04:34:08 PM »
Can the second file be used directly instead of the first?
If so, should the second file be compiled before using it?


I think you may want to familiarize yourself with rpm and the difference between src and object rpms.  There is lots of good info on the web. 

Our IAXmodem rpms were/are purely experimental.  We don't intend to maintain them, however you are free to do what you like with the source rpm, so you can update it to the current version of IAXmodem if you wish.

Kind Regards

S