“faxout”内容如下:
;----------------------------------------------
;目标号码:
Channel: SIP/815
MaxRetries: 0
WaitTime: 30
; you can set variables here
; Setting the file name is let as an exercise to the reader.
Set: LOCALSTATIONID=inxs2
Set: LOCALHEADERINFO=Fax with T38
;这里是你这次任务要向外发送的传真文件:
Set: FAX_FILE_NAME=/tmp/2pfaxout.tif
;Please note.
;Setting the T38CALL channel variable before actually originating the call,
;skips the RTP part and starts T38 negotiation directly.
;Set: T38CALL=1 ;Fax detection and switchover should be done by the receving party. Setting ;the following variable will enable CallWeaver to send the invite for the initial switchover if ;a fax CNG is detected. (useless since trunk 2585) ;Set: T38TXDETECT=something Context: faxout Extension: s priority: 1
|
编辑“extensions.conf”,找到
[
faxout
]
...
exten => s,n,Set(FAXFILE=/tmp/${UNIQUEID}.tif)
改成
exten => s,n,Set(FAXFILE=${FAX_FILE_NAME})
写一个脚本:
cp faxout test
chown somebody .somebody test
mv test /usr/local/var/spool/somebody/outgoing
|
执行这个脚本测试,
Nov 30 12:26:53 NOTICE[3059129232]: pbx_spool.c:278 attempt_thread: Call completed to SIP/813
-- Attempting call on SIP/815 for s@faxout:1 (Retry 1)
> Channel SIP/815-8da6 was answered.
-- Executing [s@faxout:1] Set("SIP/815-8da6", "LOCALSTATIONID=CallWeaver FAX")
-- Executing [s@faxout:2] Set("SIP/815-8da6", "LOCALHEADERINFO=Callewaver fax termination")
-- Executing [s@faxout:3] Set("SIP/815-8da6", "FAXFILE=/home/callweaver/2pfaxout.tif")
-- Executing [s@faxout:4] Set("SIP/815-8da6", "SIP_CODEC=alaw")
-- Executing [s@faxout:5] SipDTMFMode("SIP/815-8da6", "inband")
-- Executing [s@faxout:6] TxFAX("SIP/815-8da6", "/home/callweaver/2pfaxout.tif,caller,debug,ecm")
Nov 30 12:28:07 NOTICE[3059129232]: rtp.c:1040 cw_rtp_read: Unknown RTP codec 100 received
-- Executing [s@faxout:7] Hangup("SIP/815-8da6", "")
== Spawn extension (faxout, s, 7) exited non-zero on 'SIP/815-8da6'
-- Executing [h@faxout:1] NoOp("SIP/815-8da6", "TX: REMOTESTATIONID is 1234567890")
-- Executing [h@faxout:2] NoOp("SIP/815-8da6", "TX: FAXPAGES is 2")
-- Executing [h@faxout:3] NoOp("SIP/815-8da6", "TX: FAXRESOLUTION is 7700")
-- Executing [h@faxout:4] NoOp("SIP/815-8da6", "TX: FAXBITRATE is 9600")
-- Executing [h@faxout:5] NoOp("SIP/815-8da6", "TX: PHASEESTATUS is 0")
-- Executing [h@faxout:6] NoOp("SIP/815-8da6", "TX: PHASEESTRING is OK")
|
阅读(345) | 评论(0) | 转发(0) |