дописал вопрос... по ходу не стартует, да. Как исправить?
thunderamur ( 2012-07-31 04:05:58 +0400 )редактироватьubuntu-12.04-server-amd64
apt-get install asterisk hylafax-server iaxmodem
/etc/iaxmodem/ttyIAX0
root@asterisk-dk:/etc/asterisk# cat /etc/iaxmodem/ttyIAX0 device /dev/ttyIAX0 owner uucp:uucp mode 660 port 4570 refresh 60 server 127.0.0.1 peername iaxmodem0 secret *** cidname *** cidnumber *** codec alaw
/etc/asterisk/iax.conf
root@asterisk-dk:/etc/asterisk# cat iax.conf [iaxmodem0] type=friend username=iaxmodem0 context=faxserver secret=*** host=dynamic qualify=yes disallow=all allow=alaw trunk=no requirecalltoken=no
/etc/asterisk/extensions.conf
root@asterisk-dk:/etc/asterisk# cat extensions.conf [outgoing-calls] exten=>999,1,Dial(iax2/iaxmodem0,10,r) same=>n,Dial(iax2/iaxmodem1,10,r) [faxserver]
перезапускаем все сервисы
root@asterisk-dk:/etc/asterisk# service asterisk restart Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. root@asterisk-dk:/etc/asterisk# service iaxmodem restart Restarting iaxmodem: iaxmodem. root@asterisk-dk:/etc/asterisk# service hylafax restart * Stopping HylaFAX faxq [ OK ] * Starting HylaFAX syncing directories... [ OK ]
Смотрим консоль Астериска
asterisk-dk*CLI> iax2 show peers Name/Username Host Mask Port Status iaxmodem0/iaxmo 127.0.0.1 (D) 255.255.255.255 4570 OK (1 ms) iaxmodem1/iaxmo 127.0.0.1 (D) 255.255.255.255 4571 OK (1 ms) 2 iax2 peers [2 online, 0 offline, 0 unmonitored] == Using SIP RTP CoS mark 5 -- Executing [999@outgoing-calls:1] Dial("SIP/150-00000000", "iax2/iaxmodem0,10,r") in new stack -- Called iax2/iaxmodem0 -- Call accepted by 127.0.0.1 (format alaw) -- Format for call is alaw -- IAX2/iaxmodem0-7233 is ringing -- Hungup 'IAX2/iaxmodem0-7233' == Spawn extension (outgoing-calls, 999, 1) exited non-zero on 'SIP/150-00000000'
============================
Писка в трубке не слышу. Подскажите, пожалуйста, где я ошибся.
============================
root@asterisk-dk:/etc/asterisk# ps aux | grep faxgetty root 10688 0.0 0.0 10620 888 pts/1 S+ 09:57 0:00 grep --color=auto faxgetty root@asterisk-dk:/etc/asterisk# faxgetty ttyIAX0 ^Croot@asterisk-dk:/etc/asterisk# /usr/sbin/faxgetty ttyIAX0 ^Croot@asterisk-dk:/etc/asterisk# ps aux | grep faxgetty root 10695 0.0 0.0 10620 884 pts/1 S+ 09:58 0:00 grep --color=auto faxgetty root@asterisk-dk:/etc/asterisk# service hylafax restart * Stopping HylaFAX faxq [ OK ] * Starting HylaFAX syncing directories... [ OK ] root@asterisk-dk:/etc/asterisk# ps aux | grep faxgetty root 10770 0.0 0.0 10620 884 pts/1 S+ 09:58 0:00 grep --color=auto faxgetty
и вот интересный момент
root@asterisk-dk:/etc/asterisk# dpkg-reconfigure hylafax-server * Stopping HylaFAX faxq [ OK ] * Stopping HylaFAX faxq [ OK ] Setup program for HylaFAX (tm) 6.0.5. Created for x86_64-unknown-linux-gnu on Mon Mar 26 10:58:20 UTC 2012. Reading cached parameters from /var/spool/hylafax/etc/setup.cache. Found base64 encoder: /usr/bin/base64 Found Quoted-Printable encoder: qp-encode Found mimencode for compatibilty: mimencode Checking system for proper server configuration. Warning: /etc/hylafax/getty-link does not exist or is not an executable program! The file: /etc/hylafax/getty-link does not exist or this file is not an executable program. The HylaFAX software optionally uses this program and the fact that it does not exist on the system is not a fatal error. If the program resides in a different location and you do not want to install a symbolic link for /etc/hylafax/getty-link that points to your program then you must reconfigure and rebuild HylaFAX from source code. Warning: /etc/hylafax/vgetty-link does not exist or is not an executable program! The file: /etc/hylafax/vgetty-link does not exist or this file is not an executable program. The HylaFAX software optionally uses this program and the fact that it does not exist on the system is not a fatal error. If the program resides in a different location and you do not want to install a symbolic link for /etc/hylafax/vgetty-link that points to your program then you must reconfigure and rebuild HylaFAX from source code. Warning: /etc/hylafax/egetty-link does not exist or is not an executable program! The file: /etc/hylafax/egetty-link does not exist or this file is not an executable program. The HylaFAX software optionally uses this program and the fact that it does not exist on the system is not a fatal error. If the program resides in a different location and you do not want to install a symbolic link for /etc/hylafax/egetty-link that points to your program then you must reconfigure and rebuild HylaFAX from source code. Make /var/spool/hylafax/bin/ps2fax a link to /var/spool/hylafax/bin/ps2fax.gs. Make /var/spool/hylafax/bin/pdf2fax a link to /var/spool/hylafax/bin/pdf2fax.gs. Update /var/spool/hylafax/status/any.info. HylaFAX configuration parameters are: [1] Init script starts faxq: yes [2] Init script starts hfaxd yes [3] Start paging protocol: no Are these ok [yes]? Modem support functions written to /var/spool/hylafax/etc/setup.modem. Configuration parameters written to /var/spool/hylafax/etc/setup.cache. Restarting HylaFAX server processes. Should I restart the HylaFAX server processes [yes]? You do not appear to have any modems configured for use. Modems are configured for use with HylaFAX with the faxaddmodem(8) command. Do you want to run faxaddmodem to configure a modem [yes]? Done verifying system setup. Updating /etc/hylafax/setup.modem from /var/spool/hylafax/etc/setup.modem. /var/spool/hylafax * Starting HylaFAX syncing directories...
WARNING...
Бъла уже подобная ошибка проверьте работает ли faxgetty.
ps aux | grep faxgetty
если нет
/usr/sbin/faxgetty ttyIAX0
дописал вопрос... по ходу не стартует, да. Как исправить?
thunderamur ( 2012-07-31 04:05:58 +0400 )редактироватьСудя по логу iaxmodem не успевает ответить на вызов. Проверьте настройку RingsBeforeAnswer. Или увеличьте таймаут в Dial().
Вот пример рабочего config.ttyIAX0:
CountryCode: 7 AreaCode: 495 FAXNumber: +7.111.222.3344 LongDistancePrefix: 0 InternationalPrefix: 00 DialStringRules: etc/dialrules ServerTracing: 0xFFF SessionTracing: 0xFFF RecvFileMode: 0600 LogFileMode: 0600 DeviceMode: 0600 RingsBeforeAnswer: 1 SpeakerVolume: off GettyArgs: "-h %l dx_%s" LocalIdentifier: "Horse21" TagLineFont: etc/lutRS18.pcf TagLineFormat: "From %%l|%c|Page %%P of %%T" MaxRecvPages: 200 ModemType: Class1 # use this to supply a hint Class1AdaptRecvCmd: AT+FAR=1 Class1TMConnectDelay: 400 # counteract quick CONNECT response ModemResetCmds: AT+VCID=1 # enables CallID display PagerTTYParity: none CallIDPattern: "NMBR=" CallIDPattern: "NAME=" CallIDPattern: "ANID=" CallIDPattern: "NDID="
тайаут до 30 ничего не дал, конфиг пока не пробовал.
thunderamur ( 2012-07-31 04:02:41 +0400 )редактироватьЗадан: 2012-07-30 11:10:43 +0400
Просмотрен: 4,709 раз
Обновлен: Jul 31 '12
Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией GNU GPL.