Asterisk FAX con IAXmodem e Hylafax - Distribuzione Centos

Versione adatta alla stampa

Alcuni giorni fa un visitante di questo sito cercava una guida per l’installazione di IAXmodem e Hylafax per Asterisk. Risposi dicendogli che c’è n’erano un paio buone: una presa dal libro Practical Asterisk e un’altra di un blog spagnolo. Purtroppo nessuna delle due gli funzionava o sicuramente, come ho scritto nel blog proprio ieri, erano abbastanza datate.

Facendo un po’ di ricerche su internet, mi sono accorto che era un tema molto trattato in siti, forum e blog. Così ho deciso di provare questa soluzione e vi annuncio fin da adesso che mi ha funzionato. Spero che la guida sia il più chiara possibile, se non lo fosse  potete sempre lasciare un commento. Solo una raccomandazione: indicate sempre la distribuzione linux che state usando e le versioni di Asterisk, IAXmodem e Hylafax che avete installato.

Premetto che la libreria SpanDSP giá l’avevo installata al momento della compilazione di Asterisk. Per quelli che hanno seguito la guida che ho scritto sull’installazione di Asterisk su Centos, non dovrebbero avere problemi. Per gli altri leggete bene il README presente con i sorgenti di IAXmodem.

Iniziamo con l’installazione di alcuni pacchetti necessari:

yum install libtiff libtiff-devel libtool

 

 

IAXmodem

 

IAXmodem è un modem software, scritto in C che usa un canale IAX (uno dei protocolli usati da Asterisk) a posto di una linea telefonica e usa un DSP software a posto di un chip DSP  (Digital Signal Processing). Scarichiamo i sorgenti di iaxmodem:

cd /usr/src

wget http://switch.dl.sourceforge.net/sourceforge/iaxmodem/iaxmodem-1.2.0.tar.gz

li scompattiamo

tar -xf iaxmodem-1.2.0.tar.gz

entriamo nella cartella:

cd iaxmodem-1.2.0

e compiliamo:

./configure
make

Copiamol’eseguibile in un’altra cartella:

cp iaxmodem /usr/local/sbin

Creiamo alcune cartelle e files indispensabili per il buon funzionamento di IAXmodem:

mkdir /etc/iaxmodem
mkdir /var/log/iaxmodem
touch /var/log/iaxmodem/ttyIAX
touch /var/log/iaxmodem/iaxmodem

Modifichiamo il file di configurazione predefinito presente con i sorgenti:

nano iaxmodem-cfg.ttyIAX

Questa è la mia configurazione che vi consiglio di lasciare così (tranne peer e password che sono quelle che andrete a configurare sul file IAX.conf di Asterisk):

device          /dev/ttyIAX
owner           uucp:uucp
mode            660
port            4570
refresh         300
server          127.0.0.1
peername        iaxmodem
secret          password
cidname         Asterisk-it
cidnumber       XXXXXXXXXX
codec           ulaw

Questa configurazione è valida se avete installato IAXmodem sulla stessa macchina dove è presente Asterisk. Nel caso di due macchine diverse dovrete indicare in server l’indirizzo IP della macchina dov’è installato Asterisk. In cidnumber indicate il numero di telefono della linea dove andrete a ricevere i FAX. Chiaramente possiamo creare un file di configurazione per ogni fax software che vogliamo installare. Li potremmo chiamare ttyIAX2 ttyIAX3, ecc.

Salviamo le modifiche e continuiamo copiando il file nella cartella /etc/iaxmodem che abbiamo creato

cp iaxmodem-cfg.ttyIAX /etc/iaxmodem/ttyIAX

A questo punto configuriamo IAX.conf per inserire la troncale iaxmodem:

nano /etc/asterisk/iax.conf

[general]
disallow=all
allow=ulaw
allow=g729
allow=gsm
bindport=4569
bindaddr=0.0.0.0
language=es
srvlookup=yes

[iaxmodem]
type=friend
context=fax
disallow=all
allow=ulaw
username=iaxmodem
secret=password
qualify=yes
notransfer=yes
host=dynamic
callerid="Fax" <XXXXXXXXXX>

Questo è tutto quello che ho nel file iax.conf. L’ho copiato intero per quanti non abbiano dimestichezza con la configurazione della parte generale.

Salviamo le modifiche e attualizziamo la configurazione di IAX in Asterisk. Entriamo nella console:

asterisk –rvvvvvvvvvvvvvvvvvvv

e scriviamo:

CLI> iax2 relaod
CLI> quit

Adesso possiamo fare una prima prova per vedere se il collegamento tra IAXmodem e Asterisk funziona.

cd /usr/local/sbin

./iaxmodem ttyIAX

dovrebbe apparire:

[2009-06-08 12:03:39] Modem started
[2009-06-08 12:03:39] Setting device = '/dev/ttyIAX'
[2009-06-08 12:03:39] Setting owner = 'uucp:uucp'
[2009-06-08 12:03:39] Setting mode = '660'
[2009-06-08 12:03:39] Setting port = 4570
[2009-06-08 12:03:39] Setting refresh = 300
[2009-06-08 12:03:39] Setting server = '127.0.0.1'
[2009-06-08 12:03:39] Setting peername = 'iaxmodem'
[2009-06-08 12:03:39] Setting secret = 'password'
[2009-06-08 12:03:39] Setting cidname = 'Asterisk-it'
[2009-06-08 12:03:39] Setting cidnumber = 'XXXXXXXXX'
[2009-06-08 12:03:39] Setting codec = ulaw
[2009-06-08 12:03:39] Opened pty, slave device: /dev/pts/4
[2009-06-08 12:03:39] Created /dev/ttyIAX symbolic link

Per fermarlo premiamo CTRL-C

[2009-06-08 12:03:45] Terminating on signal 2...

Prima di farlo controllliamo che nella console di asterisk avvenga la registrazione di IAXmodem (in un’altra finestra di terminale):

Dovrebbe apparire:

hylafax3

Bene. Abbiamo risolto già una parte del “problema”.

Adesso installiamo lo script presente nella cartella dei sorgenti di IAXmodem per fare in modo che si inizi automaticamente al boot di Linux:

cd /usr/src/iaxmodem-1.2.0

mv iaxmodem.init.fedora /etc/init.d/iaxmodem

lo rendiamo eseguibile:
chmod +x /etc/init.d/iaxmodem

e lo configuriamo per l’inizio automatico:

chkconfig --add iaxmodem
chkconfig iaxmodem on

e lo facciamo partire:

/etc/init.d/iaxmodem start

 

Hylafax

Iniziamo con Hylafax

Prima di tutto installiamo alcuni pacchetti necessari per il buon funzionamento di Hylafax:

yum install ghostscript ghostscript-devel sharutils ghostscript-fonts

Nella pagina di Hylafax sono i pacchetti per diverse distribuzioni:

Scarichiamo quello per Centos:

cd /usr/src

wget http://yum.trixbox.org/centos/5/RPMS/hylafax-4.4.4-1rhel5.i386.rpm

Lo installiamo:

rpm -iv hylafax-4.4.4-1rhel5.i386.rpm

Aggiungiamo faxgetty al inittab (faxgetty è il programma che permette di rispondere alle chiamate dirette a IAXmodem per poi passarle a Hylafax)

nano /etc/inittab

aggiungiamo questa linea:

7:2345:respawn:/usr/sbin/faxgetty ttyIAX

Salviamo e reiniziamo inittab

init q

Adesso possiamo iniziare con la configurazione di Hylafax (un po’ tediosa ma necessaria). Prestate attenzione alle parti in neretto:

faxsetup

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 old protocol:                 no
        [4] Start paging protocol:              no
Are these ok [yes]?

Rispondiamo yes

Modem support functions written to /var/spool/hylafax/etc/setup.modem.
Configuration parameters written to /var/spool/hylafax/etc/setup.cache.

No scheduler config file exists, creating one from scratch.
Country code [1]? 39
Area code []? 02
Long distance dialing prefix [1]? 0
International dialing prefix [011]? 00
Dial string rules file (relative to /var/spool/hylafax) ["etc/dialrules"]?
Tracing during normal server operation [1]?
Default tracing during send and receive sessions [0xffffffff]?
Continuation cover page (relative to /var/spool/hylafax) []?
Timeout when converting PostScript documents (secs) [180]?
Maximum number of concurrent jobs to a destination [1]?
Define a group of modems []?
Time of day restrictions for outbound jobs ["Any"]?
Pathname of destination controls file (relative to /var/spool/hylafax) []?
Timeout before purging a stale UUCP lock file (secs) [30]?
Max number of pages to permit in an outbound job [0xffffffff]?
Syslog facility name for ServerTracing messages [daemon]?

The non-default scheduler parameters are:

CountryCode:            39
AreaCode:               02
LongDistancePrefix:     0
InternationalPrefix:    00

Are these ok [yes]? yes

Creating new configuration file /var/spool/hylafax/etc/config...

Restarting HylaFAX server processes.
Should I restart the HylaFAX server processes [yes]?

/etc/rc.d/init.d/hylafax start
Starting HylaFAX queue manager (faxq):                     [  OK  ]
Starting HylaFAX server (hfaxd):                           [  OK  ]
Restarting HylaFAX modem manager (faxgetty):               [  OK  ]

Do you want to run faxaddmodem to configure a modem [yes]?
Serial port that modem is connected to []? ttyIAX

Ok, time to setup a configuration file for the modem.  The manual
page config(5F) may be useful during this process.  Also be aware
that at any time you can safely interrupt this procedure.

Reading scheduler config file /var/spool/hylafax/etc/config.

No existing configuration, let's do this from scratch.

Country code [1]? 39
Area code [415]? 02
Phone number of fax modem [+1.999.555.1212]? +3902XXXXXXXX
Local identification string (for TSI/CIG) ["NothingSetup"]?
Long distance dialing prefix [1]? 0
International dialing prefix [011]? 00
Dial string rules file (relative to /var/spool/hylafax) [etc/dialrules]?
Tracing during normal server operation [1]?
Tracing during send and receive sessions [11]?
Protection mode for received facsimile [0600]?
Protection mode for session logs [0600]?
Protection mode for ttyIAX [0600]?
Rings to wait before answering [1]? 2
Modem speaker volume [off]?
Command line arguments to getty program ["-h %l dx_%s"]?
Pathname of TSI access control list file (relative to /var/spool/hylafax) [""]?
Pathname of Caller-ID access control list file (relative to /var/spool/hylafax) [""]?
Tag line font file (relative to /var/spool/hylafax) [etc/lutRS18.pcf]?
Tag line format string ["From %%l|%c|Page %%P of %%T"]?
Time before purging a stale UUCP lock file (secs) [30]?
Hold UUCP lockfile during inbound data calls [Yes]?
Hold UUCP lockfile during inbound voice calls [Yes]?
Percent good lines to accept during copy quality checking [95]?
Max consecutive bad lines to accept during copy quality checking [5]?
Max number of pages to accept in a received facsimile [25]?
Syslog facility name for ServerTracing messages [daemon]?
Set UID to 0 to manipulate CLOCAL [""]?
Use available priority job scheduling mechanism [""]?

CountryCode:            39
AreaCode:               02
FAXNumber:              +3902XXXXXXXX
LongDistancePrefix:     0
InternationalPrefix:    00
DialStringRules:        etc/dialrules
SessionTracing:         11
RingsBeforeAnswer:      2
SpeakerVolume:          off
GettyArgs:              "-h %l dx_%s"
LocalIdentifier:        "NothingSetup"
TagLineFont:            etc/lutRS18.pcf
TagLineFormat:          "From %%l|%c|Page %%P of %%T"
MaxRecvPages:           25

Are these ok [yes]?

Now we are going to probe the tty port to figure out the type
of modem that is attached.  This takes a few seconds, so be patient.
Note that if you do not have the modem cabled to the port, or the
modem is turned off, this may hang (just go and cable up the modem
or turn it on, or whatever).

Probing for best speed to talk to modem: 38400 OK.

About fax classes:

The difference between fax classes has to do with how HylaFAX interacts
with the modem and the fax protocol features that are used when sending
or receiving faxes.  One class isn't inherently better than another;
however, one probably will suit a user's needs better than others.

Class 1 relies on HylaFAX to perform the bulk of the fax protocol.
Class 2 relies on the modem to perform the bulk of the fax protocol.
Class 2.0 is similar to Class 2 but may include more features.
Class 1.0 is similar to Class 1 but may add V.34-fax capability.
Class 2.1 is similar to Class 2.0 but adds V.34-fax capability.

HylaFAX generally will have more features when using Class 1/1.0 than
when using most modems' Class 2 or Class 2.0 implementations.  Generally
any problems encountered in Class 1/1.0 can be resolved by modifications
to HylaFAX, but usually any problems encountered in Class 2/2.0/2.1 will
require the modem manufacturer to resolve it.

Use Class 1 unless you have a good reason not to.

This modem looks to have support for Class 1 and 1.0.
How should it be configured [1]?

Hmm, this looks like a Class 1 modem.
Product code (ATI0) is "spandsp".
Other information (ATI3) is "www.soft-switch.org".
DTE-DCE flow control scheme [default]?
Modem manufacturer is "spandsp".
Modem model is "IAXmodem".

Using prototype configuration file iaxmodem...

The modem configuration parameters are:

ModemResetCmds:         "ATH1\nAT+VCID=1"

Are these ok [yes]?

Creating new configuration file /var/spool/hylafax/etc/config.ttyIAX...
Done setting up the modem configuration.

Checking /var/spool/hylafax/etc/config for consistency...
...some parameters are different.

The non-default scheduler parameters are:

CountryCode:            39
AreaCode:               02
LongDistancePrefix:     0
InternationalPrefix:    00
DialStringRules:        etc/dialrules

Are these ok [yes]?

Creating new configuration file /var/spool/hylafax/etc/config...
...saving current file as /var/spool/hylafax/etc/config.sav.

Don't forget to run faxmodem(8C) (if you have a send-only environment)
or configure init to run faxgetty on ttyIAX.
Do you want to run faxaddmodem to configure another modem [yes]? no

Looks like you have some faxgetty processes running (PIDs are):

    13236

It is usually a good idea to restart these processes after running
faxsetup; especially if have just installed new software.  If these
processes are being started by init(8C) then sending each of them a
QUIT message with the faxquit command should cause them to be restarted.
Is it ok to send a QUIT command to each process [yes]?
/usr/sbin/faxquit ttyIAX

Adesso facciamo ripartire hylafax

/etc/init.d/hylafax restart

Shutting down HylaFAX queue manager (faxq):                [  OK  ]
Shutting down HylaFAX server (hfaxd):                      [  OK  ]
Starting HylaFAX queue manager (faxq):                     [  OK  ]
Starting HylaFAX server (hfaxd):                           [  OK  ]
Restarting HylaFAX modem manager (faxgetty):               [  OK  ]

Tutti i files di configurazione appena creati li troveremo nella cartella /var/spool/hylafax/etc. Quindi in qualsiasi momemto li possiamo modificare a nostro piacimento.

 

Prova su Strada

Iniziamo con le prove.

Ho un numero geografico di EuteliaVoIP e la possibilità di inviare fax con  Cheapnet.

Il trunk Eutelia per le chiamate in entrata è configurato con il contesto from-eutelia

Nel file di configurazione extensions.conf ho aggiunto le seguenti linee:

[from-eutelia]
exten => s,1,NoOp( Call from Eutelia )
exten => s,n,Dial(IAX2/iaxmodem)
exten => s,n,Hangup

Secondo Julian J. Menéndez (l’autore del post in spagnolo) è possibile scrivere la parte dell’extensions.conf in questo modo:

[from-pstn]
exten => s,1,Answer
exten => s,n,Wait(3)
exten => s,n,Dial(SIP/101)
exten => fax,1,Dial(IAX/300)

Se Asterisk riconosce che dall’altro lato c’è un fax va all’estensione fax altrimenti chiama l’interno SIP/101. Non l’ho provato però se qualcuno vuole farlo “deve” raccontarci l’esito.

Ho salvato le modifiche e riavviato asterisk

/etc/init.d/asterisk restart

Dalla pagina per l’invio di fax di cheapnet mi sono inviato un pdf al numero di Eutelia. Non sempre funziona al primo colpo. Forse perche passa per il server PBX di Eutelia e poi per il mio Asterisk. Sarebbe buona cosa fare delle prove direttamente con una linea PSTN connessa a Asterisk (io non ce l’ho). Questo è il risultato della prova:

Lato Asterisk:

hylafax1

e-Mail ricevuto:

hylafax2

Si, lo so, ho l’Outlook Express in spagnolo :)

FaxMaster è l’utente predefinito al quale Hylafax invia il fax. Se volete cambiarlo dovete modificare il file FaxDispatch che trovate nella cartella /var/spool/hylafax/etc

Se volete ricevere il messaggio con il testo in italiano sempre nel file FaxDispatch aggiungete la seguente linea:

TEMPLATE=it

E salvate le modifiche.

Per l’invio dei fax:

  • creare in extension.conf un contesto [fax] (quello che abbiamo configurato in iax.conf per iaxmodem e inserire queste linee:

[fax]
exten => _X.,1,Dial(SIP/Provider/${EXTEN})
exten => _X.,n,Hangup

Attualizzare il dialplan:

/etc/init.d/asterisk reload

e da una finestra terminale scrivere:

sendfax -n -d <faxnumber> <file.txt>

Esempio:

sendfax –n –d 02XXXXXXXX /tmp/pippo.pdf

Mi sembra che sia tutto.

Commenti

Numero di fax per fare prove.

Se volete fare prove e/o testare la percentuale dei fax andati a buon fine, potete usare questo numero Eutelia che ho destinato a linea fax: 07331875163

Fatemi sapere.

Failure to receive silence

Se vi capita di avere problemi quando ricevete un fax e nel log vi appare questo errore (i log li trovate in /var/spool/hylafax/log - uno per ogni invio/ricezione):

Jun 17 15:30:47.03: [ 5511]: Failure to receive silence (synchronization failure).
Jun 17 15:30:47.03: [ 5511]: RECV FAX: Failure to receive silence (synchronization failure).
Jun 17 15:30:47.03: [ 5511]: RECV FAX: end
Jun 17 15:30:47.03: [ 5511]: Failure to receive silence (synchronization failure).
Jun 17 15:30:47.03: [ 5511]: SESSION END

Potete risolvere aggiungendo questa linea nel file di configurazione del fax (es: config.ttyIAX) che trovate nella cartella /var/spool/hylafax/etc:

Class1SwitchingCmd: "delay:7"

Mettete delay:7 fra il segno minore < e il segno maggiore >

Salvate e fate ripartire hylafax

Digium Fax

Re: Digium fax

Grazie per il collegamtento.

Personalmente già conoscevo l'offerta di digium però è a pagamento e il costo dipende dai canali che uno acquista. C'è anche la possibilità di avere gratis il modulo però utilizzabile solamente per un canale (si può ricevere o inviare un fax alla volta).

Credo che la scelta IAXmodem-Hylafax oltre ad essere completamente gratuita, sia più completa.

A ognuno la sua scelta :)

Chiarimento

Ciao un chiarimento per 'invio del fax nel file configuration.conf

[fax]
exten => _X.,1,Dial(SIP/Provider/${EXTEN})
exten => _X.,n,Hangup

 

I parametri SIP e provider che rappresentano? 

Ciao e grazie

Re: Chiarimento

Il file è extensions.conf ed è dove si definisce il dialplan (il piano delle chiamate) in Asterisk.

SIP è il tipo di protocollo usato per fare la chiamata e Provider è con chi hai un contratto per fare chiamate VoIP (con protocollo SIP)

Un esempio può essere Eutelia.

Mi registro nel sito Eutelia, faccio una ricarica, configuro in asterisk il parametro che Eutelia mi passa per collegarmi al loro server e da quel momento posso fare chiamate VoIP e posso usare lo stesso provider anche per mandare i FAX.

Spero di essermi spiegato :)

Test Julian J. Menéndez

Ciao,
premetto che ho installato solo iaxmodem e non Hilafax in quanto la mia necessità al momento era solo quella di sapere se quando faccio una chiamata (via cmd originate) dall'altra parte c'è un fax ed ho provato il dial plan suggerito da Secondo Julian J. Menéndez ed il risultato non è quello sperato :(
Qualche suggerimento ?
 
Grazie in advance
 
[checkfax]
exten => s,1,Answer
exten => s,n,Wait(10)
exten => s,n,Dial(SIP/6000)
exten => fax,1,Hangup
------------------------------------------------------
    -- Executing Answer("Local/3001@zombielocal-063c;2", "")
    -- Executing Dial("Local/3001@zombielocal-063c;1", "SIP/0293650188@0240043067,60")
  == Using SIP RTP CoS mark 5
  == Using UDPTL CoS mark 5
    -- Called 0293650188@0240043067
    -- Executing Wait("Local/3001@zombielocal-063c;2", "60")
    -- SIP/0240043067-082ef7a0 is making progress passing it to Local/3001@zombielocal-063c;1
    -- SIP/0240043067-082ef7a0 answered Local/3001@zombielocal-063c;1
  == Starting SIP/0240043067-082ef7a0 at checkfax,iaxmodem,1 failed so falling back to exten 's'
    -- Executing [s@checkfax:1] Answer("SIP/0240043067-082ef7a0", "") in new stack
    -- Executing [s@checkfax:2] Wait("SIP/0240043067-082ef7a0", "10") in new stack
  == Spawn extension (dafuori, 0293650188, 1) exited non-zero on 'Local/3001@zombielocal-063c;1'
  == Spawn extension (zombielocal, 3001, 2) exited non-zero on 'Local/3001@zombielocal-063c;2'
    -- Executing [s@checkfax:3] Dial("SIP/0240043067-082ef7a0", "SIP/6000") in new stack
  == Using SIP RTP CoS mark 5
  == Using UDPTL CoS mark 5
    -- Called 6000
    -- SIP/6000-085bff70 is ringing ... peccato
 

 
 

fax detect

Forse non ho capito bene il problema. Vuoi sapere se quando chiami un numero questo è un fax o no.

Se così fosse, sapendo a quale parte del post di Julian fai riferimento posso provare a darti una risposta.

Ciao e a presto.

fax detect 2

Forse ho capito (i miei tempi sono lunghi).

Quando chiami un numero vuoi sapere se il numero chiamato è un fax o no.

Usando un provider SIP non è possibile.

Se per le chiamate in uscita usi una scheda FXS nella configurazione della scheda (con DAHDI o Zaptel) devi indicare il seguente parametro:

faxdetect=outgoing

Se invece vuoi che quando ricevi una chiamata ti riconosca se è da un fax:

faxdetect=incoming

Non invio nè ricevo.

Ciao a tutti,

ho installato trixbox 2.6, hylafax + iaxmodem;

mi succede questo quando ricevo un fax :

-- Executing [in_fax@ext-fax:2] GotoIf("SIP/08311815678-082467b0", "1?3:analog_fax|1") in new stack
-- Goto (ext-fax,in_fax,3)
-- Executing [in_fax@ext-fax:3] Macro("SIP/08311815678-082467b0", "faxreceive") in new stack
-- Executing [s@macro-faxreceive:1] Set("SIP/08311815678-082467b0", "FAXFILE=/var/spool/asterisk/fax/1252069739.13.tif") in new stack
-- Executing [s@macro-faxreceive:2] Set("SIP/08311815678-082467b0", "EMAILADDR=itmobile@perauto.com") in new stack
-- Executing [s@macro-faxreceive:3] RxFAX("SIP/08311815678-082467b0", "/var/spool/asterisk/fax/1252069739.13.tif") in new stack
-- Executing [h@ext-fax:1] System("SIP/08311815678-082467b0", "/var/lib/asterisk/bin/fax-process.pl --to itmobile@perauto.com --from itmobile@perauto.com --dest "s" --subject "Fax from 0831517004 0831517004" --attachment fax_0831517004.pdf --type application/pdf --file /var/spool/asterisk/fax/1252069739.13.tif") in new stack
-- Executing [h@ext-fax:2] Hangup("SIP/08311815678-082467b0", "") in new stack
== Spawn extension (ext-fax, h, 2) exited non-zero on 'SIP/08311815678-082467b0'

qualche suggerimento ?
Grazie infinite.

Re: non invio né ricevo

Sinceramente non uso e non conosco Trixbox però per il poco che posso capire non stai utilizzando iaxmodem per ricevere i fax.

Se osservi bene le linee del dialplan in nessuna appare il canale iax (come da configurazione di iaxmodem).

Nonostaste ciò a me sembra che il fax arrivi, hai controllato la cartella /var/spool/asterisk/fax per vedere se ci sono files .tif?

Ciao

hai ragione, ora ho messo

hai ragione, ora ho messo l'utilizzo di iaxmodem ed il risultato è questo :

-- Goto (ext-fax,analog_fax,2)
-- Executing [analog_fax@ext-fax:2] Set("SIP/08311815678-082725e0", "DIAL=IAX2/1100") in new stack
-- Executing [analog_fax@ext-fax:3] Dial("SIP/08311815678-082725e0", "IAX2/1100/0831517004|20|d") in new stack
-- Called 1100/0831517004
-- Call accepted by 127.0.0.1 (format ulaw)
-- Format for call is ulaw
-- IAX2/1100-9176 is ringing
-- IAX2/1100-9176 answered SIP/08311815678-082725e0
-- Hungup 'IAX2/1100-9176'
== Spawn extension (ext-fax, analog_fax, 3) exited non-zero on 'SIP/08311815678-082725e0'
-- Executing [h@ext-fax:1] System("SIP/08311815678-082725e0", "/var/lib/asterisk/bin/fax-process.pl --to --from itmobile@perauto.com --dest "s" --subject "Fax from 0831517004 0831517004" --attachment fax_0831517004.pdf --type application/pdf --file ") in new stack
-- Executing [h@ext-fax:2] Hangup("SIP/08311815678-082725e0", "") in new stack
== Spawn extension (ext-fax, h, 2) exited non-zero on 'SIP/08311815678-082725e0'

Logs Hylafax

Se non funziona dovresti controllare la cartella con i log di hylafax e vedere che tipo di problema hai.

Li trovi nella cartella:

/var/spool/hylafax/log

un file per ogni invio/ricezione

Ciao

errore invio fax : Exec_sendfax error: 460 Failed to submit job

ciao, ho seguito quest' ottima guida installando Asterisk FAX con IAXmodem e Hylafax su centos 5.3 (premetto non sono una cima dell' ambiente).
Quando prova ad inviare un fax trovo nei log il seguente messaggio di errore :
Exec_sendfax error: 460 Failed to submit job 5: Unspecified reason (scheduler NAK'd request).
Se vado a controllare nei log sotto /var/spool/hylafax/log trovo il seguente messaggio di errore
SEND FAILED: JOB 5 DEST 07331875163 ERR [4] No local dialtone

qualcuno l' ha gia incontrato come errore?

grazie inanticipo per qualsiasi aiuto :)
e complimenti ancora per gli articoli trattati su questo sito!

ciao
andrea

No local dialtone

Ciao,
sembrerebbe un problema nella configurazione del fax.
Quando cerca di inviare un fax e apre la linea non riceve il tono della linea stessa.

Hai problemi anche per ricevere fax? Copia e incolla la configurazione del fax che trovi in /var/spool/hylafax/etc
Ciao

No local dialtone - config e config.ttyIAX

ciao, grazie mille per la pronta risposta,

di seguito trovi il file di configurazione config :

LogFacility: daemon
CountryCode: 39
AreaCode: 02
LongDistancePrefix: 0
InternationalPrefix: 00
DialStringRules: etc/dialrules
ServerTracing: 1
#
## AvantFAX configuration
#
NotifyCmd: bin/notify.php

ed il seguente e' il file di configurazione config.ttyIAX :

# $Id: iaxmodem,v 1.1 2006/04/02 23:18:30 darren Exp $
#
# prototype config for the IAXmodem softmodem which uses
# the spandsp soft-DSP library
#
#
CountryCode: 39
AreaCode: 02
FAXNumber: +3902XXXXXXXX
LongDistancePrefix: 0
InternationalPrefix: 00
DialStringRules: etc/dialrules
ServerTracing: 1
SessionTracing: 11
RecvFileMode: 0600
LogFileMode: 0600
DeviceMode: 0600
RingsBeforeAnswer: 2
SpeakerVolume: off
GettyArgs: "-h %l dx_%s"
LocalIdentifier: "NothingSetup"
TagLineFont: etc/lutRS18.pcf
TagLineFormat: "From %%l|%c|Page %%P of %%T"
MaxRecvPages: 25
#
#
#
# Modem-related stuff: should reflect modem command interface
# and hardware connection/cabling (e.g. flow control).
#
ModemType: Class1 # use this to supply a hint
#
# The modem is taken off-hook during initialization, and then
# placed back on-hook when done to prevent glare.
#
ModemResetCmds: "ATH1\nAT+VCID=1" # enables CallID display
ModemReadyCmds: ATH0
Class1AdaptRecvCmd: AT+FAR=1
Class1TMConnectDelay: 400 # counteract quick CONNECT response
Class1RMQueryCmd: "!24,48,72,96" # V.17 fast-train recv doesn't work well
CallIDPattern: "NMBR="
CallIDPattern: "NAME="
CallIDPattern: "ANID="
CallIDPattern: "NDID="
# Uncomment these if you really want them, but you probably don't.
#CallIDPattern: "DATE="
#CallIDPattern: "TIME="
#
## AvantFAX configuration
#
FaxrcvdCmd: /var/spool/hylafax/bin/faxrcvd.php
DynamicConfig: /var/spool/hylafax/bin/dynconf.php
UseJobTSI: true

grazie 1000
andrea

Comando ATX3

Prova a modificare questa linea nel file di configurazione del mode:

ModemReadyCmds: ATH0X3

Fammi sapere
Ciao

ciao anche dopo aver

ciao anche dopo aver modificato il file di configurazione continua a darmi l'errore ERR [4] No local dialtone

sendfax -n -d 07331875163 /root/Desktop/prova-fax.pdf

di seguito trovi il log sotto /var/log/messages :

Sep 9 22:47:28 localhost FaxQueuer[3876]: SUBMIT JOB 10
Sep 9 22:47:51 localhost FaxGetty[3886]: LOCKWAIT
Sep 9 22:48:00 localhost FaxSend[5639]: MODEM WWW.SOFT-SWITCH.ORG spandsp/
Sep 9 22:48:00 localhost FaxSend[5639]: SEND FAX: JOB 8 DEST 07331875163 COMMID 000000017 DEVICE '/dev/ttyIAX' FROM 'root ' USER root
Sep 9 22:48:00 localhost FaxSend[5639]: SEND FAILED: JOB 8 DEST 07331875163 ERR [4] No local dialtone
Sep 9 22:48:01 localhost FaxQueuer[3876]: BATCH to +397331875163 done after 3 jobs
Sep 9 22:48:28 localhost FaxGetty[3886]: MODEM WWW.SOFT-SWITCH.ORG spandsp/
Sep 9 22:48:29 localhost FaxGetty[3886]: LOCKWAIT

cosa sbaglio?

grazie mille
andrea

Log di hylafax

Prova a postare il log completo che hylafax crea per ogni invio/ricezione del fax.

Lo trovi nella cartella /var/spool/hylafax/log

Scartato il modem deve essere un problema di configurazione di hylafax.

Con il log vediamo che succede quando provi a inviare il fax.

Ciao

log hylafax

Sep 10 07:54:21.30: [ 6646]: SESSION BEGIN 000000054 397331875163
Sep 10 07:54:21.30: [ 6646]: HylaFAX (tm) Version 4.4.4
Sep 10 07:54:21.30: [ 6646]: SEND FAX: JOB 15 DEST 07331875163 COMMID 000000054 DEVICE '/dev/ttyIAX' FROM 'root ' USER root
Sep 10 07:54:21.30: [ 6646]: <-- [12:AT+FCLASS=1\r]
Sep 10 07:54:21.30: [ 6646]: --> [2:OK]
Sep 10 07:54:21.30: [ 6646]: DIAL 07331875163
Sep 10 07:54:21.30: [ 6646]: <-- [16:ATDT07331875163\r]
Sep 10 07:54:21.31: [ 6646]: --> [11:NO DIALTONE]
Sep 10 07:54:21.31: [ 6646]: SEND FAILED: JOB 15 DEST 07331875163 ERR [4] No local dialtone
Sep 10 07:54:22.31: [ 6646]: <-- [5:ATH0\r]
Sep 10 07:54:22.31: [ 6646]: --> [2:OK]
Sep 10 07:54:22.31: [ 6646]: SESSION END

grazie 1000
andrea

No local dialtone

la configurazione di hylafax sembra a posto.
Proviamo a vedere se dipende da Asterisk.
Incolla il log della console di asterisk quando cerchi di inviare un fax.
l'errore deve essere lì.
Ciao

ciao di seguito trovi una

ciao di seguito trovi una parte del log presente in /var/log/asterisk/messages quando viene startato asterisk :

[Sep 12 11:31:51] NOTICE[3895] chan_iax2.c: Restricting registration for peer 'iaxmodem' to 60 seconds (requested 300)
[Sep 12 11:31:51] NOTICE[3770] pbx_ael.c: Starting AEL load process.
[Sep 12 11:31:51] NOTICE[3770] pbx_ael.c: AEL load process: parsed config file name '/etc/asterisk/extensions.ael'.
[Sep 12 11:31:51] NOTICE[3770] pbx_ael.c: AEL load process: checked config file name '/etc/asterisk/extensions.ael'.
[Sep 12 11:31:51] NOTICE[3770] pbx_ael.c: AEL load process: compiled config file name '/etc/asterisk/extensions.ael'.
[Sep 12 11:31:51] NOTICE[3770] pbx_ael.c: AEL load process: merged config file name '/etc/asterisk/extensions.ael'.
[Sep 12 11:31:51] NOTICE[3770] pbx_ael.c: AEL load process: verified config file name '/etc/asterisk/extensions.ael'.
[Sep 12 11:31:51] WARNING[3770] translate.c: plc_samples 160 format f
[Sep 12 11:31:51] WARNING[3770] res_config_mysql.c: MySQL RealTime: No database user found, using 'asterisk' as default.
[Sep 12 11:31:51] WARNING[3770] res_config_mysql.c: MySQL RealTime: No database password found, using 'asterisk' as default.
[Sep 12 11:31:51] WARNING[3770] res_config_mysql.c: MySQL RealTime: No database host found, using localhost via socket.
[Sep 12 11:31:51] WARNING[3770] res_config_mysql.c: MySQL RealTime: No database name found, using 'asterisk' as default.
[Sep 12 11:31:51] WARNING[3770] res_config_mysql.c: MySQL RealTime: No database port found, using 3306 as default.
[Sep 12 11:31:51] WARNING[3770] res_config_mysql.c: MySQL RealTime: No database socket found, using '/var/lib/mysql/mysql.sock' as default.
[Sep 12 11:31:51] WARNING[3770] res_config_mysql.c: MySQL RealTime: No database socket found (and unable to detect a suitable path).
[Sep 12 11:31:51] NOTICE[3770] config.c: Registered Config Engine mysql
[Sep 12 11:32:46] NOTICE[3894] chan_iax2.c: Restricting registration for peer 'iaxmodem' to 60 seconds (requested 300)

sembra non avere configurato correttamente i parametri di connessione a db presenti nel file /etc/asterisk/res_mysql.conf , ma sono corretti, da linea di comando mysql mi connetto :
[general]
dbhost = 127.0.0.1
dbname = asteriskcdr
dbuser = root
dbpass = rootpwd
dbport = 3306
dbsock = /var/lib/mysql/mysql.sock
requirements=warn ; or createclose or createchar

mentre il log sotto /var/log/messages da questo errore :

Sep 12 11:50:59 localhost FaxQueuer[3873]: SUBMIT JOB 17
Sep 12 11:51:00 localhost FaxGetty[3885]: LOCKWAIT
Sep 12 11:51:01 localhost FaxSend[5460]: /dev/ttyIAX: Can not open modem (No such file or directory)
Sep 12 11:52:01 localhost last message repeated 2 times
Sep 12 11:52:01 localhost FaxSend[5460]: Unable to setup modem on /dev/ttyIAX; giving up after 2 attempts
Sep 12 11:52:01 localhost FaxQueuer[3873]: MODEM /dev/ttyIAX appears to be wedged
Sep 12 11:52:01 localhost FaxQueuer[3873]: MODEM WEDGED: bin/wedged "ttyIAX" "/dev/ttyIAX"
Sep 12 11:52:02 localhost FaxQueuer[3873]: NOTIFY exit status: 0 (5465)
Sep 12 11:52:30 localhost FaxGetty[3885]: /dev/ttyIAX: Can not open modem (No such file or directory)

mentre da questo log sembra non trovare il device...

devo provare a reinstallare tutto?
grazie
andrea

Mysql e iaxmodem

Per mysql il problema è il database, lo hai configurato nel file sbagliato.
Devi settare gli stessi parametri in cdr_mysql.conf
res_mysql.conf è per il realtime.

Per quanto riguarda iaxmodem si connetta correttamente a Asterisk però non riesce ad aprire il modem. Como dici sembra non trovare il device.

Prova a installare tutto un'altra volta e vediamo che succede.

Comunque se mi dai accesso al server gli posso dare un'occhiata.

Ciao

ciao, ho reinstallato tutto

ciao, ho reinstallato tutto ma mi da sempre lo stesso errore...
mi sorge qualche dubbio, l'invio fax e la ricezione funziona tutto tramite software con connessione adsl , vero?
sei molto gentile ma putroppo non ho una macchina a cui darti un' accesso se non il mio portatile...
grazie
andrea

RE: reinstallato tutto

Ciao,

l'invio e la ricezione funziona con Asterisk installato e successivamente con l'installazione di iaxmodem (che simula il modem) e hylafax che è il server fax.

In ubuntu ho notato che la parte di configurazione di hylafax relativa a inittab si gestisce con upstart. Per configurare faxgetty e iaxmodem devi creare due nuovi file nella cartella /etc/event.d

sudo nano iaxmodem

e mettere:

# IAXModem
#

start on stopped rc2
start on stopped rc3
start on stopped rc4
start on stopped rc5

stop on runlevel 0
stop on runlevel 1
stop on runlevel 6

respawn
exec /usr/local/sbin/iaxmodem ttyIAX0

Un altro per faxgetty:
nano ttyIAX

# ttyIAX - faxgetty
#

start on stopped rc2
start on stopped rc3
start on stopped rc4
start on stopped rc5

stop on runlevel 0
stop on runlevel 1
stop on runlevel 6

respawn
exec /usr/local/sbin/faxgetty ttyIAX0

Per provarli:
sudo start iaxmodem
sudo status iaxmodem
sudo start ttyIAX
sudo status ttyIAX

Ho fatto la prova e la ricezione dei fax funziona. Non ho potuto provare l'invio perchè non ho un provider Voip configurato.

Fammi sapere
Ciao

ciao, per cortesia, puoi

ciao, per cortesia, puoi contattarmi all' indirizzo email che ho inserito nella registrazione?

grazie
andrea

ciao, sono entrato in

ciao, sono entrato in asterisk in modalità debug
asterisk –vvvvr
poi ho lanciato da prompt il comando sendfax con parametro -vv
sendfax -vv -n -d 07331875163 /root/Desktop/prova-fax.pdf
ed il log mi sembra corretto
Trying localhost (127.0.0.1) at port 4559...
Connected to localhost.localdomain.
220 localhost.localdomain server (HylaFAX (tm) Version 4.4.4) ready.
-> USER root
230 User root logged in.
match against (..., 512)
rule: offset 0 string = "%!" -- failed (comparison)
rule: offset 0 long = 0x4d4d -- failed (comparison)
rule: offset 0 long = 0x4949 -- failed (comparison)
rule: offset 0 long = 0x1da -- failed (comparison)
rule: offset 0 long = 0x1f1e -- failed (comparison)
rule: offset 0 long = 0x1f9d -- failed (comparison)
rule: offset 0 long = 0x506 -- failed (comparison)
rule: offset 0 long = 0x5343 -- failed (comparison)
rule: offset 0 long = 0xf702 -- failed (comparison)
rule: offset 0 string = "GIF" -- failed (comparison)
rule: offset 0 tiff = 0x59a66a95 -- failed (comparison)
rule: offset 0 string = "%PDF" -- success (result pdf, rule "")
Apply DisplayNumber rules to "07331875163"
--> return result "07331875163"
-> FORM PDF
200 Format set to PDF.
-> TYPE I
200 Type set to Image.
SEND data, 10611 bytes
-> PORT 127,0,0,1,146,128
200 PORT command successful.
-> STOT
150 FILE: /tmp/doc31.pdf (Opening new data connection).
226 Transfer complete (FILE: /tmp/doc31.pdf).
-> JNEW
200 New job created: jobid: 24 groupid: 24.
-> JPARM FROMUSER "root"
213 FROMUSER set to "root".
-> JPARM LASTTIME 000259
213 LASTTIME set to 000259.
-> JPARM MAXDIALS 12
213 MAXDIALS set to 12.
-> JPARM MAXTRIES 3
213 MAXTRIES set to 3.
-> JPARM SCHEDPRI 127
213 SCHEDPRI set to 127.
-> JPARM DIALSTRING "07331875163"
213 DIALSTRING set to "07331875163".
-> JPARM NOTIFYADDR "root@localhost.localdomain"
213 NOTIFYADDR set to "root@localhost.localdomain".
-> JPARM VRES 196
213 VRES set to 196.
-> JPARM PAGEWIDTH 209
213 PAGEWIDTH set to 209.
-> JPARM PAGELENGTH 296
213 PAGELENGTH set to 296.
-> JPARM NOTIFY "none"
213 NOTIFY set to "none".
-> JPARM PAGECHOP "default"
213 PAGECHOP set to "default".
-> JPARM CHOPTHRESHOLD 3
213 CHOPTHRESHOLD set to 3.
-> JPARM DOCUMENT /tmp/doc31.pdf
200 Added document /tmp/doc31.pdf as docq/doc31.pdf.24.
-> JSUBM
200 Job 24 submitted.
request id is 24 (group id 24) for host localhost (1 file)

sotto /var/log/messages mi da il solito triste messaggio di errore :
localhost FaxSend[5838]: SEND FAILED: JOB 23 DEST 07331875163 ERR [4] No local dialtone

ma nella console asterisk mi da il seguente messaggio :
NOTICE[5564]: chan_iax2.c:9305 socket_process: Rejected connect attempt from 127.0.0.1, request '07331875163@fax' does not exist

devo configurare qualcos' altro?

grazie 1000
andrea

problem asterisk-iaxmodem-hylafax-adsl line

ciao

innanzitutto grazie,

ho seguito la tua guida fino alla fine ma non ottengo i risultato dovuti, nel senso che quando provo a lanciare il comando per vedere se la comunicazione tra iaxmodem e asterisk funziona ottego che la registazione falllisce. Perchè??

Io ho una Ubuntu 8.04 e asterisk 1.6.1.6

ciao, che comando

ciao, che comando lanci?

ciao
andrea

il comendo è sudo iaxmodem

il comendo è

sudo iaxmodem ttyIAX

 

prova con il comando: sudo

prova con il comando:

sudo ./iaxmodem ttyIAX

Se non ci riesci vedi direttamente en la console di Asterisk se iaxmodem è connesso:

sudo asterisk -rvvvvvvvvvvvvvvv

iax2 show peers

Ciao

 

 

il risultato che ottengo

il risultato che ottengo dalla cli è

iaxmodem/iaxmod  (Unspecified)   (D)  255.255.255.255  0         (E) Unmonitored

 

Re: il risultato...

Va bene così. Significa che iaxmodem è connesso as Asterisk.

Ti consiglio (come indicato nella guida) di aggiungere il parametro:

qualify=yes

nella configurazione del peer iaxmodem in iax.conf

Puoi procedere con il resto della guida e vedere se tutto funziona a dovere.
Ciao

niente ho provato ad

niente ho provato ad installare anche libpri e dahdi ma i pacchetti non influenzano iaxmodem mi continua a dare

[2009-09-12 13:20:04] Modem started
[2009-09-12 13:20:04] Setting device = '/dev/ttyIAX0'
[2009-09-12 13:20:04] Setting owner = 'uucp:uucp'
[2009-09-12 13:20:04] Setting mode = '660'
[2009-09-12 13:20:04] Setting port = 4570
[2009-09-12 13:20:04] Setting refresh = 50
[2009-09-12 13:20:04] Setting server = '127.0.0.1'
[2009-09-12 13:20:04] Setting peername = 'iaxmodem'
[2009-09-12 13:20:04] Setting secret = 'iaxmodem'
[2009-09-12 13:20:04] Setting cidname = 'IdeaNet Fax'
[2009-09-12 13:20:04] Setting cidnumber = '08631xxxxxx'
[2009-09-12 13:20:04] Setting codec = alaw
[2009-09-12 13:20:04] Opened pty, slave device: /dev/pts/2
[2009-09-12 13:20:04] Removed old /dev/ttyIAX0
[2009-09-12 13:20:04] Created /dev/ttyIAX0 symbolic link
[2009-09-12 13:20:04] Registration failed.
 

su ttyIAX0 ho

device          /dev/ttyIAX0
owner           uucp:uucp
mode            660
port            4570
refresh         50
server          127.0.0.1
peername        iaxmodem
secret          iaxmodem
cidname         IdeaNet Fax
cidnumber       08631xxxxxx
codec           alaw
 

mentre su iax.conf

[iaxmodem]
type=friend
context=fax
disallow=all
allow=ulaw
username=iaxmodem
secret=iaxmodem
qualify=yes
notransfer=yes
host=dynamic
callerid= "IdeaNet Fax Service" <08631xxxxx>
 

il tutto senza fare modifiche su asterisk. Premetto ho fatto la stessa procedura su una virtual machine e la registrazione va a buon fine, stessa conf su server reale ma niente. non vorrei che sia l'hardware che virtualbox lo emula e sul server non è presente bhoooo!!!!Non credo che sia vero mah......

Prova ad aggiungere questo

Prova ad aggiungere questo parametro requirecalltoken=no in fondo alla configurazione dell'utente iaxmodem

[iaxmodem]
type=friend
context=fax
disallow=all
allow=ulaw
username=iaxmodem
secret=iaxmodem
qualify=yes
notransfer=yes
host=dynamic
callerid= "IdeaNet Fax Service" <08631xxxxx>
requirecalltoken=no

Purtroppo la configurazione di iax.conf cambia continuamente e adesso mi sono accorto che avevo lo stesso problema con una nuova installazione di IAXmodem.

Un altro consiglio. Apri due finestre teminale. In una lanci la console di asterisk e nell'altra esegui il comando:

./iaxmodem ttyIAX

Se ricevi ancora un errore controlla cosa ti compare nella console di asterisk (dovrebbe apparire una descrizione dell'errore di connessione per l'utente iaxmodem).

Se risolvi fammi sapere.
Ciao

ottengo questo ERROR[4439]:

ottengo questo

ERROR[4439]: chan_iax2.c:4529 handle_call_token: Call rejected, CallToken Support required. If unexpected, resolve by placing address 127.0.0.1 in the calltokenignore list or setting user iaxmodem requirecalltoken=no

 

scusami precedentemente non

scusami precedentemente non ho fatto il reload di iax2 e sip, una volta fatto

CLI> sip relaod

CLI> iax2 reload

e rilanciando il comando

sudo iaxmodem ttyIAX0

ottengo

[2009-09-14 00:29:43] Modem started
[2009-09-14 00:29:43] Setting device = '/dev/ttyIAX0'
[2009-09-14 00:29:43] Setting owner = 'uucp:uucp'
[2009-09-14 00:29:43] Setting mode = '660'
[2009-09-14 00:29:43] Setting port = 4570
[2009-09-14 00:29:43] Setting refresh = 50
[2009-09-14 00:29:43] Setting server = '127.0.0.1'
[2009-09-14 00:29:43] Setting peername = 'iaxmodem'
[2009-09-14 00:29:43] Setting secret = 'iaxmodem'
[2009-09-14 00:29:43] Setting cidname = 'IdeaNet Fax'
[2009-09-14 00:29:43] Setting cidnumber = '08631856171'
[2009-09-14 00:29:43] Setting codec = alaw
[2009-09-14 00:29:43] Opened pty, slave device: /dev/pts/3
[2009-09-14 00:29:43] Created /dev/ttyIAX0 symbolic link
Ignoring unknown information element 'Unknown IE' (54) of length 0
[2009-09-14 00:29:43] Registration completed successfully.

la voce

Ignoring unknown information element 'Unknown IE' (54) of length 0

che vuol dire????

Ignoring....

Sinceramente non ho idea di cosa significhi, però compariva anche a me nell'ultima installazione.

Non preoccuparti della voce e continua con l'installazione di hylafax.

Io l'ho conclusa e tutto ha funzionato a dovere.

Fammi sapere.

Ciao

ciao ho concluso la conf ma

ciao ho concluso la conf ma nei log di hylafax (/var/spool/hylafax/log/c000000001)

ottengo

Sep 15 19:28:50.76: [ 5866]: SEND FAX: JOB 1 DEST 08631856171 COMMID 000000001 DEVICE '/dev/ttyIAX0' FROM 'richardsith <magrini_riccardo@yahoo.it>' USER richardsith
Sep 15 19:28:50.76: [ 5866]: <-- [12:AT+FCLASS=1\r]
Sep 15 19:28:50.76: [ 5866]: --> [2:OK]
Sep 15 19:28:50.82: [ 5866]: DIAL 08631856171
Sep 15 19:28:50.82: [ 5866]: <-- [16:ATDT08631856171\r]
Sep 15 19:28:58.66: [ 5866]: --> [4:BUSY]
Sep 15 19:28:58.66: [ 5866]: SEND FAILED: JOB 1 DEST 08631856171 ERR [1] Busy signal detected
Sep 15 19:28:59.66: [ 5866]: <-- [5:ATH0\r]
Sep 15 19:28:59.66: [ 5866]: --> [2:OK]
Sep 15 19:28:59.66: [ 5866]: SESSION END
 

sto praticamente provando a inviare un fax a me stesso. Da i log di iaxmodem è tutto ok come per asterisk il prb penso sia su hylafax.

inoltre controllando i log di

inoltre controllando i log di asterisk trovo

[Sep 15 22:52:02] NOTICE[5772] chan_iax2.c: Restricting registration for peer 'iaxmodem' to 60 seconds (requested 500)
[Sep 15 22:52:35] NOTICE[5770] chan_iax2.c: Still have a callno...
[Sep 15 22:52:35] NOTICE[5768] chan_iax2.c: Peer 'iaxmodem' is now REACHABLE! Time: 1
[Sep 15 22:52:44] NOTICE[5773] chan_iax2.c: Peer 'iaxmodem' is now UNREACHABLE! Time: 1
[Sep 15 22:52:54] NOTICE[5767] chan_iax2.c: Peer 'iaxmodem' is now REACHABLE! Time: 3
[Sep 15 22:52:57] NOTICE[5770] chan_iax2.c: Restricting registration for peer 'iaxmodem' to 60 seconds (requested 500)

prima è raggiungibile successivamente no cosa vuol dire?

Logs

Che passi da reachable a unreachable non è un problema per l'invio o la ricezione dei fax (a me succede lo stesso e nonostante ció tutto funziona a dovere).

Se vuoi che questa linea:

[Sep 15 22:52:57] NOTICE[5770] chan_iax2.c: Restricting registration for peer 'iaxmodem' to 60 seconds (requested 500)

scompaia nella configurazione di iaxmodem cambia questo parametro:

refresh 500

con

refresh 60

Fammi sapere
Ciao

Busy signal detected

Forse è perché stai usando lo stesso canale iaxmodem per inviare e ricevere. Dovresti fare prove con un un altro numero.

Io ho lasciato un numero pubblico per le prove.

Se vuoi usarlo è 07331875163

Ciao

stai parlando del

stai parlando del cidnumber?

ma sono necessari 2 numeri, 1 che riceve ed uno per spedire, ho capito bene? Perchè io sto utilizzando 1 numero per le chiamate voip ed un altro per il faxVoIP.

provando il comando sudo

provando il comando sudo sendfax -n -d +3908631856171 /etc/issue.net ottengo queste righe

textfmt: No font metric information found for "Courier-Bold".
Usage: textfmt [-1] [-2] [-B] [-c] [-D] [-f fontname] [-F fontdir(s)] [-m N] [-o #] [-p #] [-r] [-U] [-Ml=#,r=#,t=#,b=#] [-V #] files... >out.ps
Default options: -f Courier -1 -p 11bp -o 0
Error converting document; command was "textfmt -B -f Courier-Bold    -Ml=0.4in -p 11 -s default >'/tmp//sndfaxao0S1E' <'/usr/share/doc/apt-utils/examples/apt-ftparchive.conf'"
 

ci manca qualcosa font Courier-Bold?????

ciao ho seguito la vostra

ciao ho seguito la vostra config, io continuo a ricevere

Opened pty, slave device: /dev/pts/3
[2009-10-17 01:05:44] Created /dev/ttyIAX0 symbolic link
[2009-10-17 01:05:44] Registration failed.
 

e nei log si asterisk ottengo

[Oct 17 01:05:44] ERROR[5460]: chan_iax2.c:4529 handle_call_token: Call rejected, CallToken Support required. If unexpected, resolve by placing address 127.0.0.1 in the calltokenignore list or setting user iaxmodem requirecalltoken=no
 

premetto che nel file iax.conf nei parametri ho già aggiunto requirecalltoken=no ma niente.  Questo tipo di errore lho trovato subito dopo aver lanciato faxadduser prima eliminano config.ttyIAX0.

puoi darmi una mano? grazie.

requirecalltoken=no

Normalmente mettendo questa linea nel blocco di configurazione dell'utente iaxmodem nel file iax.conf il problema si risolve.

Controlla bene se hai scritto correttamente la linea in questo modo:

[iaxmodem]
type=friend
context=fax
disallow=all
allow=ulaw
username=iaxmodem
secret=password
qualify=yes
notransfer=yes
host=dynamic
callerid="Fax"
requirecalltoken=no

Se tutto è ok prova a ricaricare la configurazione del canale IAX2

asterisk -rvvvvvvvvvvvvvvvvv

CLI> iax2 reload

A questo punto riprova a lanciare iaxmodem

cd /usr/local/sbin

./iaxmodem ttyIAX

e controlla nella console di Asterisk che tutto sia ok.

Fammi sapere
Ciao

ciao ho trovato e corretto

ciao ho trovato e corretto l'errore ti ho mandato un fax potresti contollare se ti è arrivato il num di provenienza è 08631856171 ed il file è issue.net

grazie a presto.

Il fax non è arrivato

Ciao,

il tuo fax non è arrivato. Puoi controllare nella cartella del log di Hylafax per vedere che è successo?

Potresti dirmi dov'era il problema (la curiosità mi potrebbe distruggere) :)
Ciao

ciao ho controllato il log ed

ciao ho controllato il log ed ottengo

sudo tail -f /var/spool/hylafax/log/c000000062
[sudo] password for ric:
Oct 19 21:52:32.68: [ 4683]: SEND FAX (000000062): FROM ric@asterisk TO 07331875163 (page 1 of 1 sent in 0:00:29)
Oct 19 21:52:32.68: [ 4683]: SEND FAX (000000062): FROM ric@asterisk TO 07331875163 (docq/doc19.ps;f0 sent in 0:00:29)
Oct 19 21:52:32.68: [ 4683]: <-- [9:AT+FTH=3\r]
Oct 19 21:52:32.70: [ 4683]: --> [7:CONNECT]
Oct 19 21:52:32.70: [ 4683]: <-- data [3]
Oct 19 21:52:32.70: [ 4683]: <-- data [2]
Oct 19 21:52:33.73: [ 4683]: --> [2:OK]
Oct 19 21:52:34.74: [ 4683]: <-- [5:ATH0\r]
Oct 19 21:52:34.85: [ 4683]: --> [2:OK]
Oct 19 21:52:34.85: [ 4683]: SESSION END
 

non vedo errori, mentre usando faxstat ricevo solamente

HylaFAX scheduler on asterisk: Running
Modem ttyIAX0 (+39.0863.1856171): Sending job 19
 

e successivamente

HylaFAX scheduler on asterisk: Running
Modem ttyIAX0 (+39.0863.1856171): Running and idle

da quel poco che ho capito sembra che il fax sia stato spedito.  Ho anche provato ad autoinviarlo sullo stesso numero utilizzato per inviarlo in questo caso ricevo questo errore

Oct 19 22:00:06.40: [ 5369]: <-- [14:AT+FCLASS=1.0\r]
Oct 19 22:00:06.40: [ 5369]: --> [2:OK]
Oct 19 22:00:06.40: [ 5369]: DIAL 08631856171
Oct 19 22:00:06.40: [ 5369]: <-- [16:ATDT08631856171\r]
Oct 19 22:00:36.80: [ 5369]: --> [4:BUSY]
Oct 19 22:00:36.80: [ 5369]: SEND FAILED: JOB 20 DEST 08631856171 ERR [1] Busy signal detected
Oct 19 22:00:37.80: [ 5369]: <-- [5:ATH0\r]
Oct 19 22:00:37.80: [ 5369]: --> [2:OK]
Oct 19 22:00:37.80: [ 5369]: SESSION END
 mentre con faxstat ricevo

JID  Pri S  Owner Number       Pages Dials     TTS Status
20   126 S    ric 08631856171   0:1   1:12   20:03 Busy signal detected
 

 

ho provato ad inviarti anche

ho provato ad inviarti anche un file .txt ma ricevo questo errore
Can not determine file type
 

mi sorge un dubbio io ho

mi sorge un dubbio io ho installato solamente asterisk senza libpri e dahdi, visto che non ho una linea isdn e pri, non vorrei che una delle 2 lavori con iaxmodem.......devo provare ad installarne una per volta e provare.

ciao, ho finito di

ciao,

ho finito di configurare iaxmodem,hylafax,asterisk ma non sò come testarlo potresti dargli un'occhiata per vedere se va bene!, premetto che ho 1 numero utilizzato per le chiamate, finale 0, ed un'altro vorrei utilizzarlo per il fax, finale con 1.

Di seguito ti mostro come ho settato i vari file di configurazione


::::::::::::::::::::::::::::::::::::::::::::::::
:::::::sip.conf::::::::
;----------------------------------Parameters For The VoIP Service Provider
[eutelia]
type=friend
context=fromprovider
username=08631xxxxx0
fromuser=08631xxxxx0
secret=xxxxxxxx
host=voip.eutelia.it
qualify=yes
insecure=port,invite
nat=yes
;-----------------------------------Parameters For The FoIP Service Provider
[fromiaxmodem]
type=friend
context=fromfaxprovider
username=0863xxxxx1
fromuser=0863xxxxx1
secret=xxxxxxxxxx
host=voip.eutelia.it
quality=yes
insecure=port,invite
nat=yes

:::::::iax.conf::::::::
;-----------------------------------Parameters For The FoIP Service Provider
[iaxmodem]
type=friend
context=tofaxprovider
disallow=all
allow=alaw
username=iaxmodem
secret=iaxmodem
qualify=yes
notransfer=yes
host=dynamic
callerid= "IdeaNet Fax Service" <0863xxxxxx1>
requirecalltoken=no

::::::::::extention.conf::::::::::
;-----------------------------------Parameters For The FoIP Service Provider
[fromfaxprovider]
exten => 0863xxxxx1,1,Dial(IAX2/iaxmodem)
exten => 0863xxxxx1,n,Hangup()
[tofaxprovider]
exten => _X.,1,Dial(SIP/fromiaxmodem/${EXTEN})
exten => Hangup()

::::::::::ttyIAX0:::::::::::::
device /dev/ttyIAX0
owner uucp:uucp
mode 660
port 4570
refresh 60
server 127.0.0.1
peername iaxmodem
secret iaxmodem
cidname Asterisk Fax Service
cidnumber 0863xxxxxx1
codec alaw

:::::::::::::::::::::::::::::::::::::::::::::::::::::::
la connessione tra iaxmodem e asterisk  

[2009-09-17 10:55:53] Modem started
[2009-09-17 10:55:53] Setting device = '/dev/ttyIAX0'
[2009-09-17 10:55:53] Setting owner = 'uucp:uucp'
[2009-09-17 10:55:53] Setting mode = '660'
[2009-09-17 10:55:53] Setting port = 4570
[2009-09-17 10:55:53] Setting refresh = 60
[2009-09-17 10:55:53] Setting server = '127.0.0.1'
[2009-09-17 10:55:53] Setting peername = 'iaxmodem'
[2009-09-17 10:55:53] Setting secret = 'iaxmodem'
[2009-09-17 10:55:53] Setting cidname = 'Asterisk Fax Service'
[2009-09-17 10:55:53] Setting cidnumber = '08631856171'
[2009-09-17 10:55:53] Setting codec = alaw
[2009-09-17 10:55:53] Opened pty, slave device: /dev/pts/2
[2009-09-17 10:55:53] Removed old /dev/ttyIAX0
[2009-09-17 10:55:53] Created /dev/ttyIAX0 symbolic link
Ignoring unknown information element 'Unknown IE' (54) of length 0
[2009-09-17 10:55:53] Registration completed successfully.

:::::::::config.ttyIAX0:::::::::
# $Id: iaxmodem,v 1.1 2006/04/02 23:18:30 darren Exp $

#
# prototype config for the IAXmodem softmodem which uses
# the spandsp soft-DSP library
#

#
CountryCode: 39
AreaCode: 0863
FAXNumber: +39.0863.xxxxxx1
LongDistancePrefix: 0
InternationalPrefix: 00
DialStringRules: etc/dialrules
ServerTracing: 1
SessionTracing: 11
RecvFileMode: 0600
LogFileMode: 0600
DeviceMode: 0600
RingsBeforeAnswer: 1
SpeakerVolume: off
GettyArgs: "-h %l dx_%s"
LocalIdentifier: "NothingSetup"
TagLineFont: etc/lutRS18.pcf
TagLineFormat: "From %%l|%c|Page %%P of %%T"
MaxRecvPages: 25
#

#
#
# Modem-related stuff: should reflect modem command interface
# and hardware connection/cabling (e.g. flow control).
#
ModemType: Class1 # use this to supply a hint

#
# The modem is taken off-hook during initialization, and then
# placed back on-hook when done to prevent glare.
#
ModemResetCmds: "ATH1\nAT+VCID=1" # enables CallID display
ModemReadyCmds: ATH0

Class1AdaptRecvCmd: AT+FAR=1
Class1TMConnectDelay: 400 # counteract quick CONNECT response
Class1RMQueryCmd: "!24,48,72,96" # V.17 fast-train recv doesn't work well

CallIDPattern: "NMBR="
CallIDPattern: "NAME="
CallIDPattern: "ANID="
CallIDPattern: "NDID="
# Uncomment these if you really want them, but you probably don't.
#CallIDPattern: "DATE="
#CallIDPattern: "TIME="

:::::::::::::::::::::::::::::::::::::

che ne pensi funziona? sicuramente cè qulache cosa che non va. Ah dimenticavo ho provato a testarlo lanciando da terminale il comando

sendfax -n -d 0863xxxxx1 /etc/issue.net

ma ottengo 
/etc/hylafax/typerules: Can not open type rules file.
Unable to setup file typing and conversion rules

invece se controllo lo stato del hylafax
HylaFAX scheduler on ideawebsite: Running
Modem ttyIAX0 (+39.0863.1856171): Waiting for modem to come ready

grazie di tutto 

 

configurazione e invio fax

La configurazione sembra a posto ma per fare le prove di invio dovresti usare un file texto o un file pdf.

Forse è per quello che non ti funziona.

Se vuoi puoi inviare i fax al mio numero pubblico 0733 1875163

Ciao

ciao ho provato ad inviarti

ciao ho provato ad inviarti un file txt utilizzando il comando

sudo sendfax -n -d 07331875163 /etc/issue.net

ma il risultato è questo

/etc/hylafax/typerules: Can not open type rules file.
Unable to setup file typing and conversion rules

e non ivia nulla, il risultato di sudo faxstat -s

HylaFAX scheduler on ideawebsite: Running
Modem ttyIAX0 (+39.0863.xxxxxxxx1): Running and idle

cosa manca?

Fax txt e pdf

Come ti ho scritto in un precedente messaggio dovresti fare la prova con un file testo

Se issue.net è un file testo cambiagli il nome in questo modo:

cd /etc

cp issue.net /tmp/issue.txt

vai nella cartella tmp

e prova a inviare il fax

sudo sendfax -n -d 07331875163 /tmp/issue.txt

Fammi sapere

mi continua a dare sempre la

mi continua a dare sempre la stessa risposta
/etc/hylafax/typerules: Can not open type rules file.
Unable to setup file typing and conversion rules

mi inizio ad innervosirmi!!!!!!!

Typerules

A me non compare l'errore che tu dici facendo la stessa prova.

Sei sicuro di aver installato questo pacchetto?

ghostscript-fonts

Che distribuzione linux stai usando?

Ciao

sto utilizzando ubuntu

sto utilizzando ubuntu 8.04lts server edition.
il pacchetto ghostscript-fonts non è presente in ubuntu penso sia stato sostituito con gsfonts (Fonts for the Ghostscript interpreter(s))
premetto che viene installato come dipendenza su hylafax-server.
 

Ubuntu

Per Andrea e anonimo.

Appena posso faccio la prova su Ubuntu.

Dovrei avere il server diponibile in una settimana.

Ciao

Problema di fonts

Ti confermo che è un problema di fonts.
Al momento di inviare un file di testo hylafax cerca il font predefinito per trasformare il file in pdf. Per fare questo si appoggia all'utility textfmt.

Con il comando:

man textfmt

avrai maggiori informazioni; ti dico fin da adesso che non sono riuscito a risolvere lo stesso problema in un Ubuntu 9.10 desktop.

Una soluzione è inviare il file direttamente in PDF.

Appena ho un server ubuntu a la mano ti faccio sapere se ho risolto.

Non so perché ma con CentOS funziona tutto senza problemi.

Ciao

Un passo in più è stato

Un passo in più è stato fatto.

Praticamente ho disinstallato hylafax-server come applicativo con APT ed installato hylafax da sorgente.

Facendo ciò ho notato che gli avvisi non compaiono più e che il comando faxsend non presenta errori unica cosa che il fax non viene inviato. Ho provato ad inviarti un fax al numero 0733 1875163, dimmi se lo hai ricevuto, sicuramente no. Ho provato anche ad auto inviarmi il fax ma non ricevo nulla controllo le cartelle recvq, sendq.

cosa che non riesco a trovare sono i log da leggere per capirci qualcosa, nella CLI non compare nulla.

Re: un passo in piú è stato fatto

Ieri ho ricevuto un fax pero non so se era il tuo. Diceva solamente: "Prova FAX" e il numero che appariva era un 06XXXXXX.

Come ho scritto in precedente commento, Ubuntu non si basa come CentOS en inittab. Se non configuri correttamente faxgetty nel sistema di inizio di Ubuntu (upstart) non potrai inviare fax né riceverli.

Ti lascio la pagina del progetto dove trovi un minimo di documentazione.

http://upstart.ubuntu.com/

ciao non è mio il mio

ciao non è mio il mio dovrebbe iniziare con 0863.....

comunque dando il comando

faxstat -s
HylaFAX scheduler on ideawebsite: Running

il fax non viene riconosciuto inoltre rifacendo il faxsetup mi sono accorto che durante la config del modem ricevo

Modem manufacturer is "Unknown".
Modem model is "Unknown".

mentre dovrebbe essere una cosa del genere

Modem manufacturer is "spandsp".
Modem model is "IAXmodem".
ho anche installato spandsp ma niente.

Iaxmodem Hylafax UBUNTU

Dammi qualche giorno e scrivo una guida para ubuntu desktop/server

Ciao

ciao forse ho risolto, in

ciao forse ho risolto, in parte quasi tutto...., mi manca un'ultima rogna, praticamente ora quando provo ad inviare il fax ottengo questo

faxstat -s

JID  Pri S  Owner Number       Pages Dials     TTS Status
4    126 S   root 07331875163   0:1   1:12   01:51 No local dialtone
 

mi aiuti a risolvere questo ultimo step. grazie

Re: Guida para Ubuntu 9.04

Ho quasi terminato la guida per Ubuntu 9.04 desktop. Domani sera (ora italiana) la pubblico.

Una piccola anticipazione. Perché tutto funzioni è meglio compilare Hylafax invece di installare il pacchetto precompilato.

Email to fax

 Salve io ho installato hylafax e iaxmodem. Mi servirebbe capire cosa fare per far si che il faxserver invii fax ricevendo come input un email.

Praticamente mi serve un email to fax gateway... Qualcuno sa delucidarmi sul come procedere o indirizzarmi verso un link che offra tale informazioni?!?

 

Mille grazie...

Re: Email to fax

Un aiuto può essere leggere il man di faxmail:

man faxmail

Se hai installato hylafax dai sorgenti trovi una cartella con nome faxmail dove trovi alcuni script per inviare fax via mail con diversi server di posta elettronica.

/dev/ttyIAX is not a terminal device

Ciao,
dopo aver configurato correttamente asterisk, verificato e configurato iaxmodem, non riesco a far riconoscere ttyIAX ad hylafax.
Ogni volta che sono in faxsetup si blocca in:

....
Serial port that modem is connected to [ttyS0]? ttyIAX
/dev/ttyIAX is not a terminal device.
Serial port that modem is connected to [ttyIAX]?
.....

sto installando su una ubuntu server 8.04

 

grazie!!!

Re: is not a terminal device

Ubuntu per far partire i servizi usa un programma diverso da CentOS.

Ho appena pubblicato una guida per ubuntu desktop che va bene anche per ubuntu server.

Devi entrare nella cartella /etc/event.d e creare due file:

cd /etc/event.d

sudo nano iaxmodem

e mettere:

# IAXModem
#

start on stopped rc2
start on stopped rc3
start on stopped rc4
start on stopped rc5

stop on runlevel 0
stop on runlevel 1
stop on runlevel 6

respawn
exec /usr/local/sbin/iaxmodem ttyIAX

Salviamo le modifiche e facciamo partire IAXmodem:

sudo start iaxmodem

Per Faxgetty

cd /etc/event.d

sudo nano ttyIAX

# ttyIAX - faxgetty
#

start on stopped rc2
start on stopped rc3
start on stopped rc4
start on stopped rc5

stop on runlevel 0
stop on runlevel 1
stop on runlevel 6

respawn
exec /usr/local/sbin/faxgetty ttyIAX

Salviamo e facciamo partire faxgetty

sudo start ttyIAX

Nuovo Menu

Vedi menu FAX Ricevuti

invio fax

ciao ti ho inviato un fax issue.net, controllando i log ottengo

sudo tail -f /var/spool/hylafax/log/c000000062
[sudo] password for ric:
Oct 19 21:52:32.68: [ 4683]: SEND FAX (000000062): FROM ric@asterisk TO 07331875163 (page 1 of 1 sent in 0:00:29)
Oct 19 21:52:32.68: [ 4683]: SEND FAX (000000062): FROM ric@asterisk TO 07331875163 (docq/doc19.ps;f0 sent in 0:00:29)
Oct 19 21:52:32.68: [ 4683]: <-- [9:AT+FTH=3\r]
Oct 19 21:52:32.70: [ 4683]: --> [7:CONNECT]
Oct 19 21:52:32.70: [ 4683]: <-- data [3]
Oct 19 21:52:32.70: [ 4683]: <-- data [2]
Oct 19 21:52:33.73: [ 4683]: --> [2:OK]
Oct 19 21:52:34.74: [ 4683]: <-- [5:ATH0\r]
Oct 19 21:52:34.85: [ 4683]: --> [2:OK]
Oct 19 21:52:34.85: [ 4683]: SESSION END
 

non vedo errori, mentre usando faxstat ricevo solamente

HylaFAX scheduler on asterisk: Running
Modem ttyIAX0 (+39.0863.1856171): Sending job 19
 

e successivamente

HylaFAX scheduler on asterisk: Running
Modem ttyIAX0 (+39.0863.1856171): Running and idle

da quel poco che ho capito sembra che il fax sia stato spedito.  Ho anche provato ad autoinviarmelo  in questo caso ricevo questo tipo di errore

Oct 19 22:00:06.40: [ 5369]: <-- [14:AT+FCLASS=1.0\r]
Oct 19 22:00:06.40: [ 5369]: --> [2:OK]
Oct 19 22:00:06.40: [ 5369]: DIAL 08631856171
Oct 19 22:00:06.40: [ 5369]: <-- [16:ATDT08631856171\r]
Oct 19 22:00:36.80: [ 5369]: --> [4:BUSY]
Oct 19 22:00:36.80: [ 5369]: SEND FAILED: JOB 20 DEST 08631856171 ERR [1] Busy signal detected
Oct 19 22:00:37.80: [ 5369]: <-- [5:ATH0\r]
Oct 19 22:00:37.80: [ 5369]: --> [2:OK]
Oct 19 22:00:37.80: [ 5369]: SESSION END

mentre con faxstat ricevo

JID  Pri S  Owner Number       Pages Dials     TTS Status
20   126 S    ric 08631856171   0:1   1:12   20:03 Busy signal detected
 

inoltre ho anche provato ad inviarti un file con estensione .txt ma ricevo questo errore

Can not determine file type

Potresti controllare grazie mille
 

Re: Invio Fax

come ti ho giá detto in un precedente messaggio ho creato una pagina con l'elenco dei fax ricevuti (vedi menu fax ricevuti). Vedi se il tuo appare.

Per poter autoinviarti un fax devi creare due IAXmodem (uno per inviare e uno per ricevere). In questo modo ti dovrebbe funzionare.

Per il file txt crea nella cartella /usr/local/lib/fax il seguente file:

nano hyla.conf

FontMap: /usr/share/fonts/type1/gsfonts:/usr/share/fonts/truetype/ttf-dejavu:/usr/share/ghostscript/8.61/lib
FontPath: /usr/share/fonts/type1/gsfonts:/usr/share/fonts/truetype/ttf-dejavu:/usr/share/ghostscript/8.61/lib

(valido per ubuntu 8.04)

Ciao

ciao questa modifica è stata

ciao questa modifica è stata già fatta ho seguito un tuo post precedente.

ciao, ho analizzato tutto il

ciao,

ho analizzato tutto il log di c0000000xx ti riporto cosa ottengo

Oct 22 20:52:33.98: [ 5071]: SESSION BEGIN 000000070 397331875163
Oct 22 20:52:33.98: [ 5071]: HylaFAX (tm) Version 6.0.3
Oct 22 20:52:33.98: [ 5071]: SEND FAX: JOB 21 DEST 07331875163 COMMID 000000070 DEVICE '/dev/ttyIAX0' FROM 'ric <ric@asterisk>' USER ric
Oct 22 20:52:33.98: [ 5071]: <-- [14:AT+FCLASS=1.0\r]
Oct 22 20:52:33.99: [ 5071]: --> [2:OK]
Oct 22 20:52:33.99: [ 5071]: DIAL 07331875163
Oct 22 20:52:33.99: [ 5071]: <-- [16:ATDT07331875163\r]
Oct 22 20:52:46.57: [ 5071]: --> [7:CONNECT]
Oct 22 20:52:46.65: [ 5071]: --> [5:ERROR]
Oct 22 20:52:46.65: [ 5071]: MODEM Command error
Oct 22 20:52:46.65: [ 5071]: FCS error
Oct 22 20:52:46.65: [ 5071]: <-- [10:AT+FRS=21\r]
Oct 22 20:52:50.81: [ 5071]: --> [2:OK]
Oct 22 20:52:50.81: [ 5071]: <-- [9:AT+FTH=3\r]
Oct 22 20:52:50.84: [ 5071]: --> [7:CONNECT]
Oct 22 20:52:50.84: [ 5071]: <-- data [3]
Oct 22 20:52:50.84: [ 5071]: <-- data [2]
Oct 22 20:52:52.59: [ 5071]: --> [2:OK]
Oct 22 20:52:52.59: [ 5071]: SEND send CRP (command repeat)
Oct 22 20:52:52.59: [ 5071]: <-- [9:AT+FRH=3\r]
Oct 22 20:53:32.59: [ 5071]: --> [0:]
Oct 22 20:53:32.59: [ 5071]: MODEM <Empty line>
Oct 22 20:53:32.59: [ 5071]: <-- data [1]
Oct 22 20:53:32.61: [ 5071]: --> [2:OK]
Oct 22 20:53:32.61: [ 5071]: No receiver protocol (T.30 T1 timeout)
Oct 22 20:53:32.61: [ 5071]: SEND FAILED: JOB 21 DEST 07331875163 ERR [126] No receiver protocol (T.30 T1 timeout)
Oct 22 20:53:32.61: [ 5071]: <-- [9:AT+FRS=7\r]
Oct 22 20:54:02.62: [ 5071]: MODEM <Timeout>
Oct 22 20:54:02.62: [ 5071]: Failure to receive silence (synchronization failure).
Oct 22 20:54:02.62: [ 5071]: <-- data [1]
Oct 22 20:54:02.67: [ 5071]: --> [2:OK]
Oct 22 20:54:02.67: [ 5071]: <-- [9:AT+FTH=3\r]
Oct 22 20:54:02.70: [ 5071]: --> [7:CONNECT]
Oct 22 20:54:02.70: [ 5071]: <-- data [3]
Oct 22 20:54:02.70: [ 5071]: <-- data [2]
Oct 22 20:54:03.93: [ 5071]: --> [2:OK]
Oct 22 20:54:04.95: [ 5071]: <-- [5:ATH0\r]
Oct 22 20:54:05.06: [ 5071]: --> [2:OK]
Oct 22 20:54:05.06: [ 5071]: SESSION END
 

cè qlcosa ke non va facendo il tail vedevo le utlime 10 righe ed ero certo ke il fax era stato spedito in realtà ci sono altri errori. Mi potresti aiutarmi per risolverli grazie.

 

ho riprovato una seconda

ho riprovato una seconda volta e nel log questa volta

Oct 22 21:37:56.46: [ 4842]: SESSION BEGIN 000000072 397331875163
Oct 22 21:37:56.46: [ 4842]: HylaFAX (tm) Version 6.0.3
Oct 22 21:37:56.46: [ 4842]: SEND FAX: JOB 22 DEST 07331875163 COMMID 000000072 DEVICE '/dev/ttyIAX0' FROM 'ric <ric@asterisk>' USER ric
Oct 22 21:37:56.46: [ 4842]: <-- [14:AT+FCLASS=1.0\r]
Oct 22 21:37:56.46: [ 4842]: --> [2:OK]
Oct 22 21:37:56.51: [ 4842]: DIAL 07331875163
Oct 22 21:37:56.51: [ 4842]: <-- [16:ATDT07331875163\r]
Oct 22 21:38:05.18: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:06.88: [ 4842]: --> [5:ERROR]
Oct 22 21:38:06.88: [ 4842]: MODEM Command error
Oct 22 21:38:06.88: [ 4842]: FCS error
Oct 22 21:38:06.88: [ 4842]: <-- [10:AT+FRS=21\r]
Oct 22 21:38:08.43: [ 4842]: --> [2:OK]
Oct 22 21:38:08.43: [ 4842]: <-- [9:AT+FTH=3\r]
Oct 22 21:38:08.45: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:08.45: [ 4842]: <-- data [3]
Oct 22 21:38:08.45: [ 4842]: <-- data [2]
Oct 22 21:38:09.53: [ 4842]: --> [2:OK]
Oct 22 21:38:09.53: [ 4842]: SEND send CRP (command repeat)
Oct 22 21:38:09.53: [ 4842]: <-- [9:AT+FRH=3\r]
Oct 22 21:38:10.11: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:11.80: [ 4842]: --> [5:ERROR]
Oct 22 21:38:11.80: [ 4842]: MODEM Command error
Oct 22 21:38:11.80: [ 4842]: FCS error
Oct 22 21:38:11.80: [ 4842]: <-- [10:AT+FRS=21\r]
Oct 22 21:38:13.33: [ 4842]: --> [2:OK]
Oct 22 21:38:13.33: [ 4842]: <-- [9:AT+FTH=3\r]
Oct 22 21:38:13.35: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:13.35: [ 4842]: <-- data [3]
Oct 22 21:38:13.35: [ 4842]: <-- data [2]
Oct 22 21:38:14.42: [ 4842]: --> [2:OK]
Oct 22 21:38:14.42: [ 4842]: SEND send CRP (command repeat)
Oct 22 21:38:14.42: [ 4842]: <-- [9:AT+FRH=3\r]
Oct 22 21:38:14.86: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:16.53: [ 4842]: --> [5:ERROR]
Oct 22 21:38:16.53: [ 4842]: MODEM Command error
Oct 22 21:38:16.53: [ 4842]: FCS error
Oct 22 21:38:16.53: [ 4842]: <-- [10:AT+FRS=21\r]
Oct 22 21:38:18.06: [ 4842]: --> [2:OK]
Oct 22 21:38:18.06: [ 4842]: <-- [9:AT+FTH=3\r]
Oct 22 21:38:18.08: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:18.08: [ 4842]: <-- data [3]
Oct 22 21:38:18.08: [ 4842]: <-- data [2]
Oct 22 21:38:19.15: [ 4842]: --> [2:OK]
Oct 22 21:38:19.15: [ 4842]: SEND send CRP (command repeat)
Oct 22 21:38:19.15: [ 4842]: <-- [9:AT+FRH=3\r]
Oct 22 21:38:19.56: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:21.24: [ 4842]: --> [2:OK]
Oct 22 21:38:21.24: [ 4842]: REMOTE NSF "AD 00 55 48 79 6C 61 46 41 58 20 28 74 6D 29 20 56 65 72 73 69 6F 6E 20 36 2E 30 2E 33"
Oct 22 21:38:21.24: [ 4842]: NSF remote fax equipment: HylaFAX
Oct 22 21:38:21.24: [ 4842]: NSF remote station ID: "HylaFAX (tm) Version 6.0.3"
Oct 22 21:38:21.24: [ 4842]: <-- [9:AT+FRH=3\r]
Oct 22 21:38:22.00: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:22.00: [ 4842]: --> [2:OK]
Oct 22 21:38:22.00: [ 4842]: REMOTE CSI "VozToVoice"
Oct 22 21:38:22.00: [ 4842]: <-- [9:AT+FRH=3\r]
Oct 22 21:38:22.51: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:22.59: [ 4842]: --> [2:OK]
Oct 22 21:38:22.59: [ 4842]: REMOTE best rate 14400 bit/s
Oct 22 21:38:22.59: [ 4842]: REMOTE max A3 page width (303 mm)
Oct 22 21:38:22.59: [ 4842]: REMOTE max unlimited page length
Oct 22 21:38:22.59: [ 4842]: REMOTE best vres R16 x 15.4 line/mm
Oct 22 21:38:22.59: [ 4842]: REMOTE format support: MH, MR, MMR
Oct 22 21:38:22.59: [ 4842]: REMOTE supports T.30 Annex A, 256-byte ECM
Oct 22 21:38:22.59: [ 4842]: REMOTE best 0 ms/scanline
Oct 22 21:38:22.59: [ 4842]: USE 14400 bit/s
Oct 22 21:38:22.59: [ 4842]: USE error correction mode
Oct 22 21:38:22.59: [ 4842]: SEND file "docq/doc22.ps;f0"
Oct 22 21:38:22.59: [ 4842]: USE A4 page width (215 mm)
Oct 22 21:38:22.59: [ 4842]: USE unlimited page length
Oct 22 21:38:22.59: [ 4842]: USE 3.85 line/mm
Oct 22 21:38:22.59: [ 4842]: USE 2-D MMR
Oct 22 21:38:22.59: [ 4842]: USE 0 ms/scanline
Oct 22 21:38:22.59: [ 4842]: SEND training at v.17 14400 bit/s
Oct 22 21:38:22.59: [ 4842]: <-- [9:AT+FRS=7\r]
Oct 22 21:38:22.63: [ 4842]: --> [2:OK]
Oct 22 21:38:22.63: [ 4842]: <-- [9:AT+FTH=3\r]
Oct 22 21:38:22.65: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:22.65: [ 4842]: <-- data [23]
Oct 22 21:38:22.65: [ 4842]: <-- data [2]
Oct 22 21:38:24.18: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:24.18: [ 4842]: <-- data [7]
Oct 22 21:38:24.18: [ 4842]: <-- data [2]
Oct 22 21:38:24.58: [ 4842]: --> [2:OK]
Oct 22 21:38:24.58: [ 4842]: <-- [9:AT+FTS=7\r]
Oct 22 21:38:24.68: [ 4842]: --> [2:OK]
Oct 22 21:38:24.68: [ 4842]: <-- [11:AT+FTM=145\r]
Oct 22 21:38:24.69: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:24.69: [ 4842]: <-- data [1024]
Oct 22 21:38:24.69: [ 4842]: <-- data [1024]
Oct 22 21:38:24.69: [ 4842]: <-- data [652]
Oct 22 21:38:24.69: [ 4842]: <-- data [2]
Oct 22 21:38:27.61: [ 4842]: --> [2:OK]
Oct 22 21:38:27.61: [ 4842]: <-- [9:AT+FRH=3\r]
Oct 22 21:38:28.08: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:29.05: [ 4842]: --> [2:OK]
Oct 22 21:38:29.05: [ 4842]: TRAINING succeeded
Oct 22 21:38:29.05: [ 4842]: SEND begin page
Oct 22 21:38:29.05: [ 4842]: SEND send frame number 0
Oct 22 21:38:29.05: [ 4842]: SEND send frame number 1
Oct 22 21:38:29.05: [ 4842]: SEND send frame number 2
Oct 22 21:38:29.05: [ 4842]: SEND send frame number 3
Oct 22 21:38:29.05: [ 4842]: <-- [9:AT+FRS=7\r]
Oct 22 21:38:29.11: [ 4842]: --> [2:OK]
Oct 22 21:38:29.11: [ 4842]: <-- [11:AT+FTM=146\r]
Oct 22 21:38:29.13: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:29.13: [ 4842]: <-- data [1036]
Oct 22 21:38:29.13: [ 4842]: <-- data [429]
Oct 22 21:38:29.13: [ 4842]: <-- data [2]
Oct 22 21:38:30.14: [ 4842]: --> [2:OK]
Oct 22 21:38:30.15: [ 4842]: <-- [9:AT+FTS=9\r]
Oct 22 21:38:30.24: [ 4842]: --> [2:OK]
Oct 22 21:38:30.24: [ 4842]: <-- [9:AT+FTH=3\r]
Oct 22 21:38:30.24: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:30.24: [ 4842]: <-- data [7]
Oct 22 21:38:30.24: [ 4842]: <-- data [2]
Oct 22 21:38:31.42: [ 4842]: --> [2:OK]
Oct 22 21:38:31.42: [ 4842]: SEND send PPS (partial page signal)
Oct 22 21:38:31.42: [ 4842]: SEND send EOP (no more pages or documents)
Oct 22 21:38:31.42: [ 4842]: <-- [9:AT+FRH=3\r]
Oct 22 21:38:31.90: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:32.86: [ 4842]: --> [2:OK]
Oct 22 21:38:32.86: [ 4842]: SEND recv MCF (message confirmation)
Oct 22 21:38:32.86: [ 4842]: <-- [9:AT+FRS=7\r]
Oct 22 21:38:32.92: [ 4842]: --> [2:OK]
Oct 22 21:38:32.92: [ 4842]: SEND end page
Oct 22 21:38:32.92: [ 4842]: SEND FAX (000000072): FROM ric@asterisk TO 07331875163 (page 1 of 1 sent in 0:00:10)
Oct 22 21:38:32.92: [ 4842]: SEND FAX (000000072): FROM ric@asterisk TO 07331875163 (docq/doc22.ps;f0 sent in 0:00:10)
Oct 22 21:38:32.92: [ 4842]: <-- [9:AT+FTH=3\r]
Oct 22 21:38:32.94: [ 4842]: --> [7:CONNECT]
Oct 22 21:38:32.94: [ 4842]: <-- data [3]
Oct 22 21:38:32.94: [ 4842]: <-- data [2]
Oct 22 21:38:34.01: [ 4842]: --> [2:OK]
Oct 22 21:38:35.02: [ 4842]: <-- [5:ATH0\r]
Oct 22 21:38:35.13: [ 4842]: --> [2:OK]
Oct 22 21:38:35.13: [ 4842]: SESSION END
 

aiuto????

Secondo invio arrivato

Il primo fax non è arrivato per la seguente causa:

Oct 22 20:53:32.61: [ 5071]: No receiver protocol (T.30 T1 timeout)
Oct 22 20:53:32.61: [ 5071]: SEND FAILED: JOB 21 DEST 07331875163 ERR [126] No receiver protocol (T.30 T1 timeout)

Problemi nella negoziazione del protocollo

Il secondo è arrivato correttamente (vedi menu fax ricevuti). Non sempre l'invio di fax va a buon fine, specialmente se la chiamata è VoIP -> VoIP cioè da un provider VoIP a un altro. Le cause possono essere le più svariate (qualitá della connessione, perdida pacchetti, etc...)

Questo per dirti che non ti devi preoccupare se i fax che invii non vanno a buon fine al primo intento.

Errore in invio fax

Ciao a tutti sto provando ad inviare fax con hylafax e iaxmodem da console.
Io riescoa ricevere correttamente i fax ma non riesco ad inviarli.
Ogni volta che do il comando
sendfax -n -d numerofax prova.txt

ricevo sempre come risposta no answer

sotto il log che mi da:
Nov 01 17:36:02.31: [ 6626]: SESSION BEGIN 000000126 39091915074169
Nov 01 17:36:02.31: [ 6626]: HylaFAX (tm) Version 4.4.4
Nov 01 17:36:02.31: [ 6626]: SEND FAX: JOB 14 DEST 915074169 COMMID 000000126 DEVICE '/dev/ttyIAX' FROM 'root ' USER root
Nov 01 17:36:02.31: [ 6626]: STATE CHANGE: RUNNING -> SENDING
Nov 01 17:36:02.31: [ 6626]: <-- [12:AT+FCLASS=1\r]
Nov 01 17:36:02.31: [ 6626]: --> [2:OK]
Nov 01 17:36:02.31: [ 6626]: MODEM set XON/XOFF/FLUSH: input ignored, output disabled
Nov 01 17:36:02.31: [ 6626]: DIAL 915074169
Nov 01 17:36:02.31: [ 6626]: <-- [14:ATDT915074169\r]
Nov 01 17:36:10.21: [ 6626]: --> [4:BUSY]
Nov 01 17:36:10.21: [ 6626]: SEND FAILED: JOB 14 DEST 915074169 ERR [1] Busy signal detected
Nov 01 17:36:11.21: [ 6626]: <-- [5:ATH0\r]
Nov 01 17:36:11.21: [ 6626]: --> [2:OK]
Nov 01 17:36:11.21: [ 6626]: MODEM set DTR OFF
Nov 01 17:36:11.21: [ 6626]: MODEM set baud rate: 0 baud (flow control unchanged)
Nov 01 17:36:11.21: [ 6626]: STATE CHANGE: SENDING -> MODEMWAIT (timeout 5)
Nov 01 17:36:11.21: [ 6626]: SESSION END
~

Re: errore invio fax

Prova a mandarlo a questo numero 07331875163

Il numero che compare nel log è abbastanza strano: 915074169

Per quale canale esce la chiamata (pstn, sip, etc...)

Ciao

il numero in uscita lo devo

il numero in uscita lo devo passare ad un router wind che lo vuole senza lo zero iniziale per fare la chaimata.
Ovviamente per riprova o messo anche lo zero davanti ma il risultato è sempre lo stesso.
La chiamata esce in isdn.
Adesso faccio subito la prova al numero di fax che mi hai dato.

Ciao

Re: il numero in uscita

Fai la prova e se non ti funziona incolla la parte del dialplan que usi per inviare i fax.
Ciao

file preso da senq

questo è quello che mi da il file prima dell'invio:

ndials:1
totdials:1
maxdials:12
tottries:0
maxtries:3
pagewidth:209
resolution:196
pagelength:296
priority:127
schedpri:126
minbr:0
desiredbr:13
desiredst:0
desiredec:2
desireddf:3
desiredtl:0
useccover:1
usexvres:0
external:007331875163
number:007331875163
mailaddr:root@voispeak.pbx
sender:root
jobid:16
jobtag:
pagehandling:e1Z0107P
modem:any
faxnumber:
tsi:
receiver:
company:
location:
voice:
fromcompany:
fromlocation:
fromvoice:
regarding:
comments:
cover:
client:trixbox.orsa.locale
owner:root
groupid:16
signalrate:14400 bit/s
dataformat:2-D MMR
jobtype:facsimile
tagline:
subaddr:
passwd:
doneop:default
commid:000000161
csi:
nsf:
status:No answer from remote
statuscode:3
returned:0
notify:none
pagechop:default
chopthreshold:3
!postscript:0::docq/doc16.ps.16
fax:0::docq/doc16.ps;c1

ecco il dialpnae cosa

ecco il dialpnae cosa da,ovviamente usando la trixbox ci sono dei comandi aggiuntivi:

Accepting AUTHENTICATED call from 127.0.0.1:
> requested format = ulaw,
> requested prefs = (),
> actual format = ulaw,
> host prefs = (ulaw|alaw),
> priority = mine
-- Executing [007331875163@from-internal:1] Macro("IAX2/1102-2141", "user-callerid,SKIPTTL,") in new stack
-- Executing [s@macro-user-callerid:1] Set("IAX2/1102-2141", "AMPUSER=1102") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("IAX2/1102-2141", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("IAX2/1102-2141", "0?Set(REALCALLERIDNUM=1102)") in new stack
-- Executing [s@macro-user-callerid:4] Set("IAX2/1102-2141", "AMPUSER=1102") in new stack
-- Executing [s@macro-user-callerid:5] Set("IAX2/1102-2141", "AMPUSERCIDNAME=Fax3") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("IAX2/1102-2141", "0?report") in new stack
-- Executing [s@macro-user-callerid:7] Set("IAX2/1102-2141", "AMPUSERCID=1102") in new stack
-- Executing [s@macro-user-callerid:8] Set("IAX2/1102-2141", "CALLERID(all)="Fax3" <1102>") in new stack
-- Executing [s@macro-user-callerid:9] Set("IAX2/1102-2141", "REALCALLERIDNUM=1102") in new stack
-- Executing [s@macro-user-callerid:10] ExecIf("IAX2/1102-2141", "1?Set(CHANNEL(language)=it)") in new stack
-- Executing [s@macro-user-callerid:11] GotoIf("IAX2/1102-2141", "1?continue") in new stack
-- Goto (macro-user-callerid,s,20)
-- Executing [s@macro-user-callerid:20] NoOp("IAX2/1102-2141", "Using CallerID "Fax3" <1102>") in new stack
-- Executing [007331875163@from-internal:2] Set("IAX2/1102-2141", "_NODEST=") in new stack
-- Executing [007331875163@from-internal:3] Macro("IAX2/1102-2141", "record-enable,1102,OUT,") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("IAX2/1102-2141", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] AGI("IAX2/1102-2141", "recordingcheck,20091102-131709,1257164229.1311") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck,20091102-131709,1257164229.1311: Outbound recording not enabled
-- AGI Script recordingcheck completed, returning 0
-- Executing [s@macro-record-enable:5] MacroExit("IAX2/1102-2141", "") in new stack
-- Executing [007331875163@from-internal:4] Macro("IAX2/1102-2141", "dialout-trunk,2,07331875163,,") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("IAX2/1102-2141", "DIAL_TRUNK=2") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("IAX2/1102-2141", "0?sub-pincheck,s,1") in new stack
-- Executing [s@macro-dialout-trunk:3] GotoIf("IAX2/1102-2141", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:4] Set("IAX2/1102-2141", "DIAL_NUMBER=07331875163") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("IAX2/1102-2141", "DIAL_TRUNK_OPTIONS=tTr") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("IAX2/1102-2141", "OUTBOUND_GROUP=OUT_2") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("IAX2/1102-2141", "0?nomax") in new stack
-- Executing [s@macro-dialout-trunk:8] GotoIf("IAX2/1102-2141", "0?chanfull") in new stack
-- Executing [s@macro-dialout-trunk:9] GotoIf("IAX2/1102-2141", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:10] Set("IAX2/1102-2141", "DIAL_TRUNK_OPTIONS=") in new stack
-- Executing [s@macro-dialout-trunk:11] Macro("IAX2/1102-2141", "outbound-callerid,2") in new stack
-- Executing [s@macro-outbound-callerid:1] ExecIf("IAX2/1102-2141", "0?Set(CALLERPRES()=)") in new stack
-- Executing [s@macro-outbound-callerid:2] ExecIf("IAX2/1102-2141", "0?Set(REALCALLERIDNUM=1102)") in new stack
-- Executing [s@macro-outbound-callerid:3] GotoIf("IAX2/1102-2141", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,6)
-- Executing [s@macro-outbound-callerid:6] Set("IAX2/1102-2141", "USEROUTCID="Fax3" <1102>") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("IAX2/1102-2141", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("IAX2/1102-2141", "TRUNKOUTCID="390915074000" <390915074000>") in new stack
-- Executing [s@macro-outbound-callerid:9] GotoIf("IAX2/1102-2141", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,12)
-- Executing [s@macro-outbound-callerid:12] ExecIf("IAX2/1102-2141", "1?Set(CALLERID(all)="390915074000" <390915074000>)") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("IAX2/1102-2141", "1?Set(CALLERID(all)="Fax3" <1102>)") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("IAX2/1102-2141", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
-- Executing [s@macro-dialout-trunk:12] ExecIf("IAX2/1102-2141", "1?AGI(fixlocalprefix)") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
== fixlocalprefix: Dialpattern X. matched. 07331875163 -> 07331875163
-- AGI Script fixlocalprefix completed, returning 0
-- Executing [s@macro-dialout-trunk:13] Set("IAX2/1102-2141", "OUTNUM=07331875163") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("IAX2/1102-2141", "custom=AMP") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("IAX2/1102-2141", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("IAX2/1102-2141", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("IAX2/1102-2141", "") in new stack
-- Executing [s@macro-dialout-trunk:17] GotoIf("IAX2/1102-2141", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("IAX2/1102-2141", "1?customtrunk") in new stack
-- Goto (macro-dialout-trunk,s,21)
-- Executing [s@macro-dialout-trunk:21] Set("IAX2/1102-2141", "pre_num=AMP:mISDN/1/") in new stack
-- Executing [s@macro-dialout-trunk:22] Set("IAX2/1102-2141", "the_num=OUTNUM") in new stack
-- Executing [s@macro-dialout-trunk:23] Set("IAX2/1102-2141", "post_num=/:s:e128") in new stack
-- Executing [s@macro-dialout-trunk:24] GotoIf("IAX2/1102-2141", "1?outnum:skipoutnum") in new stack
-- Goto (macro-dialout-trunk,s,25)
-- Executing [s@macro-dialout-trunk:25] Set("IAX2/1102-2141", "the_num=07331875163") in new stack
-- Executing [s@macro-dialout-trunk:26] Dial("IAX2/1102-2141", "mISDN/1/07331875163/:s:e128,300,") in new stack
-- Called 1/07331875163/:s:e128
-- mISDN/1-u1631 is proceeding passing it to IAX2/1102-2141

Ciao

adesso sono riucito a farmi

adesso sono riucito a farmi rispondere dal fax ,era un problema di gestione di callerid.Adesso devo capire come mai non riceve il fax.
Ti allego il risultato che ho preasente nella coda di invio:

Nov 02 14:07:10.26: [ 3787]: SESSION BEGIN 000000172 1042091456
Nov 02 14:07:10.26: [ 3787]: HylaFAX (tm) Version 4.4.4
Nov 02 14:07:10.26: [ 3787]: SEND FAX: JOB 21 DEST 001042091456 COMMID 000000172 DEVICE '/dev/ttyIAX' FROM 'root ' USER root
Nov 02 14:07:10.26: [ 3787]: STATE CHANGE: RUNNING -> SENDING
Nov 02 14:07:10.26: [ 3787]: <-- [12:AT+FCLASS=1\r]
Nov 02 14:07:10.26: [ 3787]: --> [2:OK]
Nov 02 14:07:10.26: [ 3787]: MODEM set XON/XOFF/FLUSH: input ignored, output disabled
Nov 02 14:07:10.26: [ 3787]: DIAL 001042091456
Nov 02 14:07:10.26: [ 3787]: <-- [17:ATDT001042091456\r]
Nov 02 14:07:17.19: [ 3787]: --> [10:NO CARRIER]
Nov 02 14:07:17.19: [ 3787]: SEND FAILED: JOB 21 DEST 001042091456 ERR [2] No carrier detected
Nov 02 14:07:18.19: [ 3787]: <-- [5:ATH0\r]
Nov 02 14:07:18.19: [ 3787]: --> [2:OK]
Nov 02 14:07:18.19: [ 3787]: MODEM set DTR OFF
Nov 02 14:07:18.19: [ 3787]: MODEM set baud rate: 0 baud (flow control unchanged)
Nov 02 14:07:18.19: [ 3787]: STATE CHANGE: SENDING -> MODEMWAIT (timeout 5)
Nov 02 14:07:18.19: [ 3787]: SESSION END

Ciao

Trxbox e fax

Non conosco Trixbox e mi rimane un po' difficile interpretare il dialplan. Posso solamente dirti che il tuo fax è arrivato (vedi menu fax ricevuti). Fax in uscita OK. Adesso vedi se riesci a riceverli.

asterisk+hylafax+iaxmodem+hylafax-client

Ciao a tutti, mi chiamo lorenzo.
Eccomi ad usufruire della vostra preparazione: ho realizzato un faxserver come in ogetto e tutto funziona correttamente.
Preciso: ho diversi numeri, collegati a diversi patton, i cui fax ricevuti vengono inoltrati alle mail di uffici diversi.
Avrei però la necessità che per ogni ufficio che invii un fax tramite hylafax-client venga apposto come localidentifier un numero differente.
Qualcuno potrebbe darmi qualche dritta sulla strada da seguire per relizzarlo?

grazie mille in anticipo

sendfax

premesso che uso una debian testing, ho seguito la tua guida, credo, con scrupolo.

ho installato hylafax (client e server r.2:6.0.3-5.1) , asterisk (r. 1:1.6.2.0~rc7-1) e iaxmodem (r. 1.2.0~dfsg-1).

tuttavia dalla console di asterisk, dopo aver lanciato:
iaxmodem ttyIAX
che si conclude con:
........
Ignoring unknown information element 'Unknown IE' (54) of length 0
[2009-12-28 19:09:59] Registration completed successfully.

sulla console asterisk non ho la conferma della registrazione iax2. la mia console restituisce solo:
Connected to Asterisk 1.6.2.0~rc7-1 currently running on debian-server (pid = 22127)
[Dec 28 19:11:49] NOTICE[22153]: chan_iax2.c:8432 update_registry: Restricting registration for peer 'iaxmodem' to 60 seconds (requested 300)
debian-server*CLI>

inoltre:
sendfax -n -d 02700560516 Desktop/GuidaFirmaDigitale2009.pdf
Can not reach service hylafax at host "localhost".

dove sbaglio?

grazie e ciao.

fulvio

Re: Sendfax

Per quello che ho letto IAXmodem è registrato a Asterisk. Puoi controllare con il seguente comando:

CLI> iax2 show peers

Per quanto riguarda l'invio dei fax sembrerebbe che non hai hylafax attivo o lo hai installato in un altro server

Controlla con il comando:

ps aux | grep hylafax

Dovrebbe apparire:

uucp 2632 0.0 0.1 4324 704 ? Ss Dec03 0:00 /usr/local/sbin/hfaxd -i hylafax
root 16875 0.0 0.1 3924 704 pts/8 S+ 21:56 0:00 grep hylafax

Ciao

Re: Sendfax

> Per quello che ho letto IAXmodem è registrato a Asterisk. Puoi controllare con il seguente comando:
> CLI> iax2 show peers

questo è l'output:
CLI> iax2 show peers
Name/Username Host Mask Port Status
iaxmodem/iaxmod 127.0.0.1 (D) 255.255.255.255 4570 OK (3 ms)
demo/asterisk 216.207.245.47 (S) 255.255.255.255 4569 Unmonitore

hylafax è attivo, anche se con parametri differenti da quelli del tuo output; che dipenda da quello?

ps aux | grep hfaxd
uucp 6351 0.0 0.1 4728 1548 ? S 10:18 0:00 /usr/sbin/hfaxd -d -i 4559
root 6364 0.0 0.0 2184 784 pts/1 R+ 10:19 0:00 grep hfaxd

grazie e un saluto.

fulvio

ho fatto qualche passo

ho fatto qualche passo avanti.

ho rimosso i pacchetti debian di hylafax e ho installato da sorgenti.

ora la situazione è la seguente:
ps aux | grep hfaxd
uucp 3391 0.0 0.0 4636 836 ? Ss 18:33 0:00 /usr/local/sbin/hfaxd -i hylafax
root 5880 0.0 0.0 2188 812 pts/1 S+ 21:39 0:00 grep hfaxd

quindi hylafaz è attivo con le stesse modalità del tuo sistema.

se lancio
iaxmodem ttyIAX
l'output si conclude con
[2009-12-29 21:42:14] Registration completed successfully.

e dalla console di asterisk ho la conferma
-- Registered IAX2 'iaxmodem' (AUTHENTICATED) at 127.0.0.1:4570
-- Registered IAX2 'iaxmodem' (AUTHENTICATED) at 127.0.0.1:52815

dalla stessa console
debian-server*CLI> iax2 show peers
Name/Username Host Mask Port Status
iaxmodem/iaxmod 127.0.0.1 (D) 255.255.255.255 52815 OK (3 ms)
demo/asterisk 216.207.245.47 (S) 255.255.255.255 4569 Unmonitored
2 iax2 peers [1 online, 0 offline, 1 unmonitored]

anche nell'invio dei fax qualche cosa è cambiato
ora
sendfax -n -d 02700560516 Desktop/GuidaFirmaDigitale2009.pdf
restituisce
request id is 7 (group id 7) for host localhost (1 file)

... ma il fax non parte

ho il dubbio che mi manchi qualche cosa in relazione al provider voip, ma non so dove mettere le mani.

... spero che lo sappia tu!

grazie e ciao.

fulvio

Re: ho fatto qualche passo

Sembra un problema di configurazione del dialplan e forse del provider Voip che usi per le chiamate.

Nella configurazione dell'utente iaxmodem in iax.conf deve essere presente una linea:

context=fax

Lo stesso nome (fax) lo devi usare per la configurazione del dialplan con qualcosa del genere:

[fax]
exten => _X.,1,Dial(SIP/Provider/${EXTEN})
exten => _X.,n,Hangup

dove provider è il nome del provider VoIP che usi per le chiamate in uscita (che naturalmente deve essere correttamente configurato e funzionante). Nel caso di Eutelia sarebbe (sip.conf):

register => 07331875163:password@voip.eutelia.it/07331875163

[eutelia]
type=friend
context=from-eutelia
host=voip.eutelia.it
dtmdmode=inband
canreinvite=no
fromdomain=voip.eutelia.it
fromuser=07331875163
insecure=port,invite
qualify=yes
secret=password
disallow=all
allow=ulaw
allow=alaw

e le linee per l'invio del fax nel dialplan sarebbero:

[fax]
exten => _X.,1,Dial(SIP/eutelia/${EXTEN})
exten => _X.,n,Hangup

Fammi sapere
Ciao

> Nella configurazione

> Nella configurazione dell'utente iaxmodem in iax.conf deve essere presente una linea:

> context=fax

e fin qui vado bene; questa è la ia sezione in iax.conf:
[iaxmodem]
type=friend
context=fax
disallow=all
allow=ulaw
username=iaxmodem
secret=password
qualify=yes
notransfer=yes
host=dynamic
callerid="Fax"
requirecalltoken=no

una domanda: parli di "utente iaxmodem"; io sul sistema non ho un utente con questo nome, lo devo avere?

id iaxmodem
id: iaxmodem: Questo utente non esiste

> Lo stesso nome (fax) lo devi usare per la configurazione del dialplan con qualcosa del genere:

> [fax]
> exten => _X.,1,Dial(SIP/Provider/${EXTEN})
> exten => _X.,n,Hangup

qui non so se capisco esattamente, comunque in /etc/asterisk/extensions.con ho messo:
[fax]
exten => _X.,1,Dial(SIP/libero/${EXTEN})
exten => _X.,n,Hangup

poi in fondo a iax.conf ho messo:

register => :
@voip.libero.it/

[libero]
type=friend
context=from-libero
host=voip.eutelia.it
dtmdmode=inband
canreinvite=no
fromdomain=voip.libero.it
fromuser=
insecure=port,invite
qualify=yes
secret=
disallow=all
allow=ulaw
allow=alaw

il parametro voip.libero.it l'ho preso dai parametri di configurazione del voice sul router dove ho:

Server Address voip.libero.it
Service Domain sip.infostrada.it

ora però non riesco a fare altre prove in quanto:
/usr/local/bin/sendfax -n -d 02700560516 /home/fulvio/Desktop/GuidaFirmaDigitale2009.pdf
460 Failed to submit job 11: Unable to open scheduler FIFO: No such device or address.
faxstat -s
HylaFAX scheduler on debian-server.rete_casa: Not running

faxstat -s mi restituisce

JID Pri S Owner Number Pages Dials TTS Status
6 127 B fulvio 02700560516 0:0 0:12 Blocked by concurrent cal
7 127 B root 02700560516 0:0 0:12 Blocked by concurrent cal

e non riesco ad eliminare i JID bloccati

da root
faxrm 6
504 Cannot kill job: Operation not permitted.

e se provo con
faxrm -a 6
Password:
460 Failed to kill job 6: Unable to open scheduler FIFO: No such device or address

fallisco con qualunque password io conosca (!!!)

grazie, un saluto ... e un augurio per il nuovo anno.

fulvio

solo una piccola

solo una piccola integrazione.
con la configurazione di cui al precedente messaggio sulla console asterisk ho:
*CLI> iax2 show peers
Name/Username Host Mask Port Status
libero 83.211.227.21 (S) 255.255.255.255 4569 UNREACHABLE
iaxmodem/iaxmod 127.0.0.1 (D) 255.255.255.255 45715 OK (1 ms)
demo/asterisk 216.207.245.47 (S) 255.255.255.255 4569 Unmonitored
3 iax2 peers [1 online, 1 offline, 1 unmonitored]

cosa non funge?

ciao.

fulvio

Re: Nella configurazione

Ciao,

quando parlo di utente iaxmodem intendo la configurazione di iax.conf

Non so come funziona la configurazione di libero per il voip però non credo che la possa usare in Asterisk. Prova a contattare l'assistenza tecnica per vedere se è possibile. Normalmente questi parametri si configurano nel sip.conf e non nel iax.conf.

Il faxstat -s
HylaFAX scheduler on debian-server.rete_casa: Not running

ti dice che il server non è attivato. Controlla bene...

Per il resto ti consiglio di fare le prove con provider VoIP tipo eutelia

Per capire bene come stanno le cose puoi darmi accesso al tuo server in modo che possa controllare le tue configurazioni.

Saluti

qualche passo avanti credo di

qualche passo avanti credo di averlo ancora fatto ... ma non basta!

ricapitoliamo.

servizi attivi:
ps aux |grep fax
uucp 14589 0.0 0.1 4708 1628 pts/1 S 18:19 0:00 faxq -D /var/spool/hylafax/
uucp 14590 0.0 0.1 5160 1764 pts/1 S 18:19 0:00 faxgetty ttyIAX
uucp 14599 0.0 0.1 4632 1040 ? Ss 18:19 0:00 /usr/local/sbin/hfaxd -i hylafax

ps aux |grep iaxmodem
root 3521 0.0 0.0 2136 396 ? Ss 15:36 0:00 /usr/bin/iaxmodem
uucp 3525 0.0 0.0 2416 972 ? S 15:36 0:00 /usr/bin/iaxmodem
uucp 14583 0.0 0.1 3036 1120 pts/1 S 18:18 0:00 iaxmodem ttyIAX

ps aux |grep asterisk
asterisk 13050 0.0 1.7 46844 18540 ? Ssl 18:14 0:00 /usr/sbin/asterisk -p -U asterisk
asterisk 13051 0.0 0.0 2872 724 ? S 18:14 0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet

file di configurazione modificati:

iax.conf

ho aggiunto questa sezione (testuale)

[iaxmodem]
type=friend
context=fax
disallow=all
allow=ulaw
username=iaxmodem
secret=password
qualify=yes
notransfer=yes
host=dynamic
callerid="Fax"
requirecalltoken=no

register => @sip.infostrada.com:
@151.6.87.66

extensions.conf

ho aggiunto

[fax]
exten => _X.,1,Dial(SIP/libero/${EXTEN})
exten => _X.,n,Hangup

ma quando faccio

sendfax -n -d

ottengo
faxstat -s
HylaFAX scheduler on server.rete: Running

JID Pri S Owner Number Pages Dials TTS Status
23 126 S fulvio 02700560516 0:47 1:12 18:23 Busy signal detected

e dalla console di asterisk

CLI> iax2 show peers
Name/Username Host Mask Port Status
iaxmodem/iaxmod 127.0.0.1 (D) 255.255.255.255 58157 OK (3 ms)
CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
libero 151.6.87.166 5060 OK (39 ms)

qualche passo avanti credo di averlo ancora fatto ... ma non basta!

ricapitoliamo.

servizi attivi:
ps aux |grep fax
uucp 14589 0.0 0.1 4708 1628 pts/1 S 18:19 0:00 faxq -D /var/spool/hylafax/
uucp 14590 0.0 0.1 5160 1764 pts/1 S 18:19 0:00 faxgetty ttyIAX
uucp 14599 0.0 0.1 4632 1040 ? Ss 18:19 0:00 /usr/local/sbin/hfaxd -i hylafax

ps aux |grep iaxmodem
root 3521 0.0 0.0 2136 396 ? Ss 15:36 0:00 /usr/bin/iaxmodem
uucp 3525 0.0 0.0 2416 972 ? S 15:36 0:00 /usr/bin/iaxmodem
uucp 14583 0.0 0.1 3036 1120 pts/1 S 18:18 0:00 iaxmodem ttyIAX

ps aux |grep asterisk
asterisk 13050 0.0 1.7 46844 18540 ? Ssl 18:14 0:00 /usr/sbin/asterisk -p -U asterisk
asterisk 13051 0.0 0.0 2872 724 ? S 18:14 0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet

file di configurazione modificati:

iax.conf

ho aggiunto questa sezione (testuale)

[iaxmodem]
type=friend
context=fax
disallow=all
allow=ulaw
username=iaxmodem
secret=password
qualify=yes
notransfer=yes
host=dynamic
callerid="Fax"
requirecalltoken=no

register => @sip.infostrada.com:
@151.6.87.66

extensions.conf

ho aggiunto

[fax]
exten => _X.,1,Dial(SIP/${EXTEN}@151.6.87.66)
exten => _X.,n,Hangup

ma quando faccio

sendfax -n -d

ottengo
faxstat -s
HylaFAX scheduler on server.rete: Running

JID Pri S Owner Number Pages Dials TTS Status
23 126 S fulvio 02700560516 0:47 1:12 18:23 Busy signal detected

e dalla console di asterisk

CLI> iax2 show peers
Name/Username Host Mask Port Status
iaxmodem/iaxmod 127.0.0.1 (D) 255.255.255.255 58157 OK (3 ms)
CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
libero 151.6.87.166 5060 OK (39 ms)

Ignoring unknown information element 'Unknown IE' (54) of length 0
[2010-01-09 19:27:52] Registration completed successfully.
-- Registered IAX2 'iaxmodem' (AUTHENTICATED) at 127.0.0.1:58157
-- Accepting AUTHENTICATED call from 127.0.0.1:
> requested format = ulaw,
> requested prefs = (),
> actual format = ulaw,
> host prefs = (ulaw),
> priority = mine
-- Executing [02700560516@fax:1] Dial("IAX2/iaxmodem-1708", "SIP/02700560516/@151.6.87.66") in new stack
== Using SIP RTP CoS mark 5
-- Called 02700560516/@151.6.87.66
-- SIP/151.6.87.66-00000009 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing [02700560516@fax:2] Hangup("IAX2/iaxmodem-1708", "") in new stack
== Spawn extension (fax, 02700560516, 2) exited non-zero on 'IAX2/iaxmodem-1708'
-- Hungup 'IAX2/iaxmodem-1708'
-- Registered IAX2 'iaxmodem' (AUTHENTICATED) at 127.0.0.1:47986

inoltre dalla console dove avvio

iaxmodem ttyIAX ho

[2010-01-09 19:34:52] Dialing '02700560516'
[2010-01-09 19:34:52] Call accepted.
Ignoring unknown information element 'Unknown IE' (54) of length 0
[2010-01-09 19:35:24] Remote hangup.
[2010-01-09 19:35:25] Hanging Up

che cosa non funziona?

grazie.

fulvio

ps. ti ringrazio per la disponibiltà, purtroppo però rispetta alla possibilità di darti accesso al server, trattadosi di server aziendale, mi è impossibile.
se sei daccordo potremmo magari trami te uno strumento di chat conversare in tempo reale e potrei rispondere alle tue domande o postare output che ti fossero necessari.

Re: qualche passo avanti

Adesso il problema sembra essere con il provider VoIP che usi per le chiamate in uscita. O il numero che chiami è occupato (prova a mandare il fax al 07331875163) o nonostante sia registrato con libero qualcosa non va.

Puoi "tracciare" i messaggi sip e vedere cosa succede quando provi a mandare un fax.

Dalla console di asterisk:

CLI> sip set debug peer libero

Per chattare io uso googletalk.

Mi trovi all'indirizzo asannucci@gmail.com

Ciao

Grazie!

Ti ringrazio vivamente per questa guida.

Preziosissima e perfettamente funzionante!!!

 

Un saluto by Elia

Condividi contenuti