VIDEOCHAT  ::   FAQ  ::   Поиск  ::   Регистрация  ::   Вход

Опять про факсы

Проблемы Asterisk без вэб-оболочек и их решения

Модераторы: april22, Zavr2008

ded
Сообщения: 15625
Зарегистрирован: 26 авг 2010, 19:00

Re: Опять про факсы

Сообщение ded »

Если руками конвертируется, а из диалплана
same => n,System(/usr/bin/tiff2pdf "/var/spool/asterisk/fax/${FAXOPT(headerinfo)}.tif" -o "/var/spool/asterisk/fax/${FAXOPT(headerinfo)}.pdf")
не исполняется, то проблема в правах на исполнение /usr/bin/tiff2pdf от имени юзера, под которым запущен астериск. Обычно это тоже user = asterisk.
Чтобы проверить эту мысль
# su asterisk
$ /usr/bin/tiff2pdf "/var/spool/asterisk/fax/123423145245345.tif" -o "/var/spool/asterisk/fax/123423145245345.pdf"
newuser
Сообщения: 52
Зарегистрирован: 23 сен 2014, 15:29

Re: Опять про факсы

Сообщение newuser »

так до этой строчки даже не доходит.
Вот эта строка same => n,NoOp(**** receive ****) не появляется в cli
А вместо нее
Asterisk cleanly ending (0).
Executing last minute cleanups
ded
Сообщения: 15625
Зарегистрирован: 26 авг 2010, 19:00

Re: Опять про факсы

Сообщение ded »

Ох! У вас просто падает Астериск на строке
same => n,ReceiveFax(/var/spool/asterisk/fax/${FAXOPT(headerinfo)}.tif,d)

Разбирайтесь почему.
core set debug 10
core set verbose 1010
Удалите все tif
# rm - /var/spool/asterisk/fax/*.tif
ReceiveFax требует spandsp
newuser
Сообщения: 52
Зарегистрирован: 23 сен 2014, 15:29

Re: Опять про факсы

Сообщение newuser »

spandsp собирал и линк в lib64 сделал.

Код: Выделить всё

CLI> core set debug 10
Core debug was OFF and is now 10.
CLI> core set verbose 1010
Console verbose was 5 and is now 1010.
  == Using SIP RTP CoS mark 5
    -- Executing [1000@my:1] Goto("SIP/0004-00000000", "fgu,1000,1") in new stack
    -- Goto (fgu,1000,1)
    -- Executing [1000@fgu:1] NoOp("SIP/0004-00000000", "-------------------Call from 0004 to 1000------------------") in new stack
    -- Executing [1000@fgu:2] Goto("SIP/0004-00000000", "fax-rx,receive_fax,1") in new stack
    -- Goto (fax-rx,receive_fax,1)
    -- Executing [receive_fax@fax-rx:1] NoOp("SIP/0004-00000000", "------------------- FAX from 0004 ------------------") in new stack
    -- Executing [receive_fax@fax-rx:2] Answer("SIP/0004-00000000", "") in new stack
       > 0x7f648400a950 -- Probation passed - setting RTP source address to 10.0.46.219:5000
    -- Executing [receive_fax@fax-rx:3] Set("SIP/0004-00000000", "DT=--1417262566.0") in new stack
    -- Executing [receive_fax@fax-rx:4] Set("SIP/0004-00000000", "FAXOPT(headerinfo)=Received_by_0004_2014-11-29_15-02") in new stack
    -- Executing [receive_fax@fax-rx:5] Set("SIP/0004-00000000", "FAXOPT(localstationid)=Name") in new stack
    -- Executing [receive_fax@fax-rx:6] Set("SIP/0004-00000000", "FAXOPT(maxrate)=14400") in new stack
    -- Executing [receive_fax@fax-rx:7] Set("SIP/0004-00000000", "FAXOPT(minrate)=4800") in new stack
    -- Executing [receive_fax@fax-rx:8] NoOp("SIP/0004-00000000", "FAXOPT(ecm) : yes") in new stack
    -- Executing [receive_fax@fax-rx:9] NoOp("SIP/0004-00000000", "FAXOPT(headerinfo) : Received_by_0004_2014-11-29_15-02") in new stack
    -- Executing [receive_fax@fax-rx:10] NoOp("SIP/0004-00000000", "FAXOPT(localstationid) : Name") in new stack
    -- Executing [receive_fax@fax-rx:11] NoOp("SIP/0004-00000000", "FAXOPT(maxrate) : 14400") in new stack
    -- Executing [receive_fax@fax-rx:12] NoOp("SIP/0004-00000000", "FAXOPT(minrate) : 4800") in new stack
    -- Executing [receive_fax@fax-rx:13] NoOp("SIP/0004-00000000", "**** RECEIVING FAX : --1417262566.0 ****") in new stack
    -- Executing [receive_fax@fax-rx:14] Playback("SIP/0004-00000000", "vm-press") in new stack
    -- <SIP/0004-00000000> Playing 'vm-press.ulaw' (language 'ru')
       > 0x7f648400a950 -- Probation passed - setting RTP source address to 10.0.46.219:5000
    -- Executing [receive_fax@fax-rx:15] ReceiveFAX("SIP/0004-00000000", "/var/spool/asterisk/fax/Received_by_0004_2014-11-29_15-02.tif,d") in new stack
    -- Channel 'SIP/0004-00000000' receiving FAX '/var/spool/asterisk/fax/Received_by_0004_2014-11-29_15-02.tif'
       > Channel 'SIP/0004-00000000' fax session '0', [ 000.220077 ], stack sent 10 frames (200 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 000.446753 ], channel sent 22 frames (440 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 000.726947 ], channel sent 14 frames (280 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 001.466759 ], channel sent 37 frames (740 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 001.506461 ], channel sent 2 frames (40 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 001.745866 ], channel sent 12 frames (240 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 001.786762 ], channel sent 2 frames (40 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 001.965806 ], channel sent 9 frames (180 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 001.986869 ], channel sent 1 frames (20 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 002.026711 ], channel sent 2 frames (40 ms) of energy.
[Nov 29 15:02:49] WARNING[2419][C-00000000]: chan_sip.c:10341 process_sdp: Failed to initialize UDPTL, declining image stream
[Nov 29 15:02:49] WARNING[2419][C-00000000]: chan_sip.c:10516 process_sdp: Failing due to no acceptable offer found
       > 0x7f648400a950 -- Probation passed - setting RTP source address to 10.0.46.219:5000
       > 0x7f648400a950 -- Probation passed - setting RTP source address to 10.0.46.219:5000
       > Channel 'SIP/0004-00000000' fax session '0', [ 002.423888 ], channel sent 18 frames (360 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 002.820096 ], stack sent 130 frames (2600 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 002.880077 ], stack sent 3 frames (60 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 002.923741 ], channel sent 25 frames (500 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 004.960073 ], stack sent 104 frames (2080 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 005.323739 ], channel sent 120 frames (2400 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 006.743980 ], channel sent 71 frames (1420 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 006.823760 ], channel sent 4 frames (80 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 008.603771 ], channel sent 89 frames (1780 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 008.700076 ], stack sent 187 frames (3740 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 009.820072 ], stack sent 56 frames (1120 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 010.183626 ], channel sent 79 frames (1580 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 068.102617 ], channel sent 2896 frames (57920 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 068.302604 ], channel sent 10 frames (200 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 069.722215 ], channel sent 71 frames (1420 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 069.800075 ], stack sent 2999 frames (59980 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 070.900074 ], stack sent 55 frames (1100 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 071.102613 ], channel sent 69 frames (1380 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 129.121758 ], channel sent 2901 frames (58020 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 129.321461 ], channel sent 10 frames (200 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 130.741200 ], channel sent 71 frames (1420 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 130.820076 ], stack sent 2996 frames (59920 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 131.920073 ], stack sent 55 frames (1100 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 132.201399 ], channel sent 73 frames (1460 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 169.160828 ], channel sent 1848 frames (36960 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 169.400824 ], channel sent 12 frames (240 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 170.820795 ], channel sent 71 frames (1420 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 170.900074 ], stack sent 1949 frames (38980 ms) of silence.
       > Channel 'SIP/0004-00000000' fax session '0', [ 172.000073 ], stack sent 55 frames (1100 ms) of energy.
       > Channel 'SIP/0004-00000000' fax session '0', [ 172.201584 ], channel sent 69 frames (1380 ms) of silence.
CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
tif снова создался.
newuser
Сообщения: 52
Зарегистрирован: 23 сен 2014, 15:29

Re: Опять про факсы

Сообщение newuser »

Всем спасибо.
Вообщем все пересобрал заново и заработало. Выяснить что точно не хватало не удалось.
Ответить
© 2008 — 2024 Asterisk.ru
Digium, Asterisk and AsteriskNOW are registered trademarks of Digium, Inc.
Design and development by PostMet-Netzwerk GmbH