PDA

Voir la version complète : Installation Hylafax sous Debian.



Ricou76
03/04/2011, 23h08
Salut tout le monde,

j'essaye de mettre en oeuvre la solution IAXModem + Hylafax sous Debian Squeeze.

J'ai pu recouper ce que j'ai réussi à faire jusqu'ici avec un tuto réalisé sur l'ancien forum (http://www.asterisk-france.net/showthread.php?t=8216) pour la mise en place de cette même solution, mais sous Ubuntu.

Premier souci que j'ai rencontré : un mauvais chemin vers les modules nécessaires à l'exécution durant la compilation des sources Hylafax (en supprimant "local" de chaque chemin /usr/local/sbin que le prompt demande de valider lors du ./configure).
Par contre, second souci qui aura sûrement conséquences par la suite, lorsque je souhaite exécuter la configuration d'HylaFax (via la commande faxsetup), j'ai les alertes suivantes :



Setup program for HylaFAX (tm) 5.4.0.

Created for x86_64-unknown-linux-gnu on Sun Apr 3 20:45:19 CEST 2011.

Found encoder: /usr/bin/base64
Looks like /usr/bin/base64 supports base64 encoding.
Checking system for proper client configuration.
Checking system for proper server configuration.


Warning: /bin/vgetty does not exist or is not an executable program!

The file:

/bin/vgetty

does not exist or this file is not an executable program. The
HylaFAX software optionally uses this program and the fact that
it does not exist on the system is not a fatal error. If the
program resides in a different location and you do not want to
install a symbolic link for /bin/vgetty that points to your program
then you must reconfigure and rebuild HylaFAX from source code.


Warning: /bin/egetty does not exist or is not an executable program!

The file:

/bin/egetty

does not exist or this file is not an executable program. The
HylaFAX software optionally uses this program and the fact that
it does not exist on the system is not a fatal error. If the
program resides in a different location and you do not want to
install a symbolic link for /bin/egetty that points to your program
then you must reconfigure and rebuild HylaFAX from source code.

Created our own Fontmap file in /var/spool/hylafax/etc.


Setting Ghostscript font path in /usr/lib/fax/hyla.conf.



Warning: /usr/share/ghostscript/fonts does not exist or is not a directory!

The directory /usr/share/ghostscript/fonts does not exist or this file is not a directory.
This is the directory where the HylaFAX client applications expect to
locate font metric information to use in formatting ASCII text for
submission as facsimile. Without this information HylaFAX may generate
illegible facsimile from ASCII text.



Warning: /usr/share/cups/fonts does not exist or is not a directory!

The directory /usr/share/cups/fonts does not exist or this file is not a directory.
This is the directory where the HylaFAX client applications expect to
locate font metric information to use in formatting ASCII text for
submission as facsimile. Without this information HylaFAX may generate
illegible facsimile from ASCII text.



Warning: /usr/share/ghostscript/fonts does not exist or is not a directory!

The directory /usr/share/ghostscript/fonts does not exist or this file is not a directory.
This is the directory where the HylaFAX client applications expect to
locate font metric information to use in formatting ASCII text for
submission as facsimile. Without this information HylaFAX may generate
illegible facsimile from ASCII text.



Warning: /usr/local/lib/ghostscript/fonts does not exist or is not a directory!

The directory /usr/local/lib/ghostscript/fonts does not exist or this file is not a directory.
This is the directory where the HylaFAX client applications expect to
locate font metric information to use in formatting ASCII text for
submission as facsimile. Without this information HylaFAX may generate
illegible facsimile from ASCII text.



Warning: /usr/share/ghostscript/fonts does not exist or is not a directory!

The directory /usr/share/ghostscript/fonts does not exist or this file is not a directory.
This is the directory where the HylaFAX client applications expect to
locate font metric information to use in formatting ASCII text for
submission as facsimile. Without this information HylaFAX may generate
illegible facsimile from ASCII text.



Warning: /usr/share/cups/fonts does not exist or is not a directory!

The directory /usr/share/cups/fonts does not exist or this file is not a directory.
This is the directory where the HylaFAX client applications expect to
locate font metric information to use in formatting ASCII text for
submission as facsimile. Without this information HylaFAX may generate
illegible facsimile from ASCII text.



Warning: /usr/share/ghostscript/fonts does not exist or is not a directory!

The directory /usr/share/ghostscript/fonts does not exist or this file is not a directory.
This is the directory where the HylaFAX client applications expect to
locate font metric information to use in formatting ASCII text for
submission as facsimile. Without this information HylaFAX may generate
illegible facsimile from ASCII text.



Warning: /usr/local/lib/ghostscript/fonts does not exist or is not a directory!

The directory /usr/local/lib/ghostscript/fonts does not exist or this file is not a directory.
This is the directory where the HylaFAX client applications expect to
locate font metric information to use in formatting ASCII text for
submission as facsimile. Without this information HylaFAX may generate
illegible facsimile from ASCII text.



Warning: Font metric information files were not found!

The font metric information file for the Courier font was not found in
the /usr/share/ghostscript/8.71/Resource/Init:/usr/share/ghostscript/8.71/lib:/usr/share/ghostscript/8.71/Resource/Font:/usr/share/ghostscript/fonts:/var/lib/ghostscript/fonts:/usr/share/cups/fonts:/usr/share/ghostscript/fonts:/usr/local/lib/ghostscript/fonts:/usr/share/fonts:/usr/share/ghostscript/8.71/Resource/Init:/usr/share/ghostscript/8.71/lib:/usr/share/ghostscript/8.71/Resource/Font:/usr/share/ghostscript/fonts:/var/lib/ghostscript/fonts:/usr/share/cups/fonts:/usr/share/ghostscript/fonts:/usr/local/lib/ghostscript/fonts:/usr/share/fonts path. This means that client HylaFAX applications
that use this information to format ASCII text for submission as fax will
use incorrect information and generate potentially illegible facsimile.

If font metric information is present on your system in a directory other
than /usr/share/ghostscript/8.71/Resource/Init:/usr/share/ghostscript/8.71/lib:/usr/share/ghostscript/8.71/Resource/Font:/usr/share/ghostscript/fonts:/var/lib/ghostscript/fonts:/usr/share/cups/fonts:/usr/share/ghostscript/fonts:/usr/local/lib/ghostscript/fonts:/usr/share/fonts:/usr/share/ghostscript/8.71/Resource/Init:/usr/share/ghostscript/8.71/lib:/usr/share/ghostscript/8.71/Resource/Font:/usr/share/ghostscript/fonts:/var/lib/ghostscript/fonts:/usr/share/cups/fonts:/usr/share/ghostscript/fonts:/usr/local/lib/ghostscript/fonts:/usr/share/fonts then you can setup a symbolic link to the appropriate
directory or you can specify the appropriate pathname in the configuration
file /usr/lib/fax/hyla.conf with a line of the form:

FontPath: someplace_unexpected

If you do not have the font metric information files loaded on your system
system you can obtain them by public FTP from the place where you obtained
the HylaFAX software or from the master FTP site at ftp.sgi.com.

Make /var/spool/hylafax/bin/ps2fax a link to /var/spool/hylafax/bin/ps2fax.gs.


Make /var/spool/hylafax/bin/pdf2fax a link to /var/spool/hylafax/bin/pdf2fax.gs.

Update /var/spool/hylafax/status/any.info.

HylaFAX configuration parameters are:

[1] Init script starts faxq: yes
[2] Init script starts hfaxd yes
[3] Start paging protocol: no
Are these ok [yes]?


Dans tout ce blabla, il semblerait donc manquer plusieurs références vers "font", d'autres vers "egetty" et "vgetty", du coup je n'ose pas aller plus loin (j'ai testé un peu plus loin 2 fois auparavant, je n'arrivais même pas à avoir mes FAX listés via "faxstat -s -a").

Avez-vous des retours ? Merci de votre retour.

Emeric.

Ricou76
04/04/2011, 00h40
Re,

je fais suite à mon précédent post. Suite à ma dernière tentative, j'ai enfin l'état normal de la commande faxstat :



root@IPBX1:~# faxstat -s -a
HylaFAX scheduler on IPBX1.****.com: Running
Modem ttyIAX0 (1000): Running and idle



J'ai donc continué sur la commande suivante, en mettant mon numéro GSM pour voir au moins si "ca sort" :


sendfax -n -d 068342XXXX /CV_Toto_2.pdf


Mais évidemment, rien ne se passe. Niveau Verbose Asterisk, je ne vois rien défiler, tandis que le Syslog remonte les informations suivantes :


Apr 4 00:19:05 IPBX1 HylaFAX[2267]: Parsing hostPort(): "EPRT"
Apr 4 00:19:05 IPBX1 HylaFAX[2267]: Parsing "|1|127.0.0.1|53470|"
Apr 4 00:19:05 IPBX1 HylaFAX[2267]: `-> s.length() = 19
Apr 4 00:19:05 IPBX1 HylaFAX[2267]: `-> s[0] = '|'
Apr 4 00:19:05 IPBX1 HylaFAX[2267]: `-> s[2] = '|'
Apr 4 00:19:05 IPBX1 HylaFAX[2267]: `-> s[18] = '|'
Apr 4 00:19:05 IPBX1 HylaFAX[2267]: Looks like extended syntax: "|1|127.0.0.1|53470|" [7C: |]
Apr 4 00:19:05 IPBX1 HylaFAX[2267]: `-> Got a: 127.0.0.1[13]
Apr 4 00:19:05 IPBX1 HylaFAX[2267]: `-> Got a: 53470[19]
Apr 4 00:19:05 IPBX1 HylaFAX[2267]: Parsed: Family 1 Address 127.0.0.1 Port 53470
Apr 4 00:19:05 IPBX1 HylaFAX[2267]: Filesystem has SysV-style file creation semantics.
Apr 4 00:19:05 IPBX1 FaxQueuer[1933]: SUBMIT JOB 1
Apr 4 00:19:06 IPBX1 FaxGetty[2206]: LOCKWAIT
Apr 4 00:19:15 IPBX1 FaxSend[2277]: MODEM WWW.SOFT-SWITCH.ORG spandsp/
Apr 4 00:19:15 IPBX1 FaxSend[2277]: SEND FAX: JOB 1 DEST 0683428861 COMMID 000000001 DEVICE '/dev/ttyIAX0' FROM 'root <root@IPBX1.arsoema.com>' USER root
Apr 4 00:20:00 IPBX1 FaxSend[2277]: SEND FAILED: JOB 1 DEST 068342XXXX ERR No answer from remote {E003}


Et bien sûr, resultats suivants à nouveau dans le "faxstat" :


root@IPBX1:~# faxstat -s -a
HylaFAX scheduler on IPBX1.****.com: Running
Modem ttyIAX0 (1000): Waiting for modem to come ready

JID Pri S Owner Number Pages Dials TTS Status
1 125 S root 068342XXXX 0:2 2:12 22:30 No answer from remote



Ma config iaxmodem ne sort pas de l'ordinaire :


root@IPBX1:~# cat /etc/iaxmodem/ttyIAX0

device /dev/ttyIAX0
owner uucp:uucp
mode 660
port 4570
refresh 60
server 127.0.0.1
peername IAXFAX0
secret i@X0faX
codec alaw


Et enfin, niveau Asterisk :


root@IPBX1:~# cat /etc/asterisk/iax.conf
[general]
bindport=4569
bindaddr=127.0.0.1
calltokenoptional = 0.0.0.0/0.0.0.0
maxcallnumbers = 16382
language=fr
bandwidth=high
disallow=all
allow=alaw
autokill=yes

[IAXFAX0]
type=friend
secret=i@X0faX
port=4570
host=dynamic
context=Interne-FAX
requirecalltoken=no
qualify=yes


Et au niveau de mon extensions.conf, j'appelle une macro eprouvée :
[Interne-FAX]
exten => _X.,1,Macro(NumeroExterne,235ABCDEF,${EXTEN},0)


Au niveau Asterisk, je ne vois donc même pas l'appel être émis, et j'ai bien mon peer IAX2 présent :


Connected to Asterisk 1.6.2.14 currently running on IPBX1 (pid = 1484)
Verbosity is at least 4
IPBX1*CLI> iax2 show peers
Name/Username Host Mask Port Status
IAXFAX1 (Unspecified) (D) 255.255.255.255 0 UNKNOWN
IAXFAX0 127.0.0.1 (D) 255.255.255.255 4570 OK (3 ms)
IAXFAX2 (Unspecified) (D) 255.255.255.255 0 UNKNOWN
3 iax2 peers [1 online, 2 offline, 0 unmonitored]

IPBX1*CLI> core show channels
Channel Location State Application(Data)
0 active channels
0 active calls
0 calls processed



Si vous avez des idées... :whistle: Merci !

Reaper
04/04/2011, 02h29
Active debug iax pendant l'envoie, est ce que tu vois une tentative ?

Ricou76
04/04/2011, 11h19
Salut,

Ca n'a pas l'air probant, je suppose que les seuls messages que je vois apparaitre sont ceux de la supervision :



IPBX1*CLI> iax2 set debug on
IAX2 Debugging Enabled
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX Subclass: POKE
Timestamp: 00009ms SCall: 01902 DCall: 00000 [127.0.0.1:4570]

Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX Subclass: ACK
Timestamp: 00009ms SCall: 04828 DCall: 01902 [127.0.0.1:4570]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX Subclass: PONG
Timestamp: 00009ms SCall: 04828 DCall: 01902 [127.0.0.1:4570]
RR_JITTER : 0
RR_LOSS : 0
RR_PKTS : 1
RR_DELAY : 40
RR_DROPPED : 0
RR_OUTOFORDER : 0

Tx-Frame Retry[-01] -- OSeqno: 001 ISeqno: 001 Type: IAX Subclass: ACK
Timestamp: 00009ms SCall: 01902 DCall: 04828 [127.0.0.1:4570]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 000 Type: IAX Subclass: REGREQ
Timestamp: 00003ms SCall: 04829 DCall: 00000 [127.0.0.1:4570]
USERNAME : IAXFAX0
REFRESH : 60

Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 001 Type: IAX Subclass: REGAUTH
Timestamp: 00003ms SCall: 03545 DCall: 04829 [127.0.0.1:4570]
AUTHMETHODS : 3
CHALLENGE : \x31\x37\x33\x35\x37\x36\x32\x37\x39
USERNAME : IAXFAX0

Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 001 Type: IAX Subclass: REGREQ
Timestamp: 00003ms SCall: 04829 DCall: 03545 [127.0.0.1:4570]
USERNAME : IAXFAX0
MD5 RESULT : 80c7e196b51e431606f1c9332273867a
REFRESH : 60

Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 002 Type: IAX Subclass: REGACK
Timestamp: 00006ms SCall: 03545 DCall: 04829 [127.0.0.1:4570]
USERNAME : IAXFAX0
DATE TIME : 2011-04-04 11:30:22
REFRESH : 60
APPARENT ADDRES : IPV4 127.0.0.1:4570

Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 002 Type: IAX Subclass: ACK
Timestamp: 00006ms SCall: 04829 DCall: 03545 [127.0.0.1:4570]
IPBX1*CLI> iax2 set debug off
IAX2 Debugging Disabled

Reaper
04/04/2011, 11h27
Dans ce cas je te conseille de télécharger iaxmodem sources et le compiler avec static modules.

J'ai du a l’époque avoir quelque chose dans le même genre, mais je me rappelle pas exactement.

Ce qui est certain, il est enregistré, possible un souci banal des droits.

Ricou76
05/04/2011, 10h13
Désolé de la réponse tardive, mais j'essaye en fait maintenant de contourner le duo IAXmodem/HylaFAX à l'aide de scripts trouvés.

J'arrive à faire du Fax2Mail, mais le Mail2Fax semble un peu plus dur (gestion d'un serveur de messagerie, alors que j'y suis novice).