asterisk 传真服务器配置

摘要:

     asterisk 可以作为电子传真服务器,进行收发电子传真。但是配置起来,比较麻烦,需要一番折腾。在这儿分享一下电子传真的配置,希望对朋友们有所帮助。

正题:

    asterisk 如果需要收发电子传真,需要的配置资源有两个。

    res_fax  : 包含了收发传真方法 

    res_fax_spandsp: 传真DSP信号

    开始安装dsp,建议大家去spandsp官方去下载 spandsp-master,安装步骤,按照 ReadMe.去安装好了。

     asterisk 模块选择时,一定要选择res_fax 和 res_fax_spandsp.

     启动 asterisk, 检查模块是否安装成功:太棒了,传真模块加载完成。

pbx*CLI> module show like fax
Module                         Description                              Use Count 
res_fax.so                     Generic FAX Applications                 1         
res_fax_spandsp.so             Spandsp G.711 and T.38 FAX Technologies  23  

     配置:

      和传真相关的配置文件 res_fax.conf  和 sip.conf

   

; Generic Fax Application configuration 

[general]
; Maximum Transmission Rate
; Possible values are { 2400 | 4800 | 7200 | 9600 | 12000 | 14400 }
; Set this value to the maximum desired transfer rate.  Default: 14400
maxrate=14400

; Minimum Transmission Rate
; Possible values are { 2400 | 4800 | 7200 | 9600 | 12000 | 14400 }
; Set this value to the minimum desired transfer rate.  Default: 2400
minrate=2400

; Send Progress/Status events to manager session
; Manager events with 'call' class permissions will receive events indicating the
; steps to initiate a fax session.  Fax completion events are always sent to manager
; sessions with 'call' class permissions, regardless of the value of this option.
; Default: no
statusevents=yes

; modem capabilities
; Possible values are { v17 | v27 | v29 }
; Set this value to modify the default modem options.  Default: v17,v27,v29
modems=v17,v27,v29

; Enable/disable T.30 ECM (error correction mode) by default.
; Default: Enabled
ecm=disable

   sip.conf 有对T380检测的配置,我取消了,没有做,你可以加上,但是这个信号就必须跑T380了,否则会报错了,检测不到T380.

  sip.conf general增加 ,注意传真只能是G711编码。

  t38pt_udptl=yes
  faxdetect=t38

   接收传真的拨号方案配置

[fax-in]
exten => _X.,1,Verbose(3,Incoming fax)
exten => _X.,n,Set(FAXDEST=/var/spool/asterisk/fax)
exten => _X.,n,SET(tempfax=${CALLEDFAX}/${UNIQUEID})
exten => _X.,n,ReceiveFax(${FAXDEST}/${tempfax}.tif)
exten => _X.,n,Verbose(3,- Fax receipt completed with status:${FAXSTATUS})

 

最终重新启动一下asterisk服务器,拿传真机呼入进来,就能接收到传真了。

  

 

 

 

   

     

    

posted @ 2020-09-02 18:54  大米粥的博客  阅读(674)  评论(0编辑  收藏  举报