Vlad1983 писал(а):скорей всего из-за include => exts
Если exten => fax и exten => h сделать в том же контексте - ничего не меняет.
jugatsu писал(а):А где контекс fax-rx? И вынесли fax в отдельный контекст и goto на fax-rx.
У меня так и сделано: при 2 либо fax -> goto fax-rx
Код: Выделить всё
[fax-rx]
exten => fax,1,NoOp(-- FAX from ${CALLERID(num)} --)
exten => fax,n,Wait(2)
exten => fax,n,Set(FILENAME=fax-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${CALLERID(number)})
exten => fax,n,Set(FAXFILE=/var/spool/asterisk/tmp/${FILENAME}.tif)
exten => fax,n,Set(FAXOPT(headerinfo)=Received by ${CALLERID(num)} ${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M)})
exten => fax,n,Set(FAXOPT(localstationid)=OFFICE)
exten => fax,n,Set(FAXOPT(maxrate)=14400)
exten => fax,n,Set(FAXOPT(minrate)=2400)
exten => fax,n,NoOp(FAXOPT(ecm) : ${FAXOPT(ecm)})
exten => fax,n,NoOp(FAXOPT(headerinfo) : ${FAXOPT(headerinfo)})
exten => fax,n,NoOp(FAXOPT(localstationid) : ${FAXOPT(localstationid)})
exten => fax,n,NoOp(FAXOPT(maxrate) : ${FAXOPT(maxrate)})
exten => fax,n,NoOp(FAXOPT(minrate) : ${FAXOPT(minrate)})
exten => fax,n,NoOp(**** RECEIVING FAX : ${FAXFILE} ****)
exten => fax,n,ReceiveFAX(${FAXFILE})
exten => fax,n,Hangup()
exten => h,1,NoOP(-- FAX from ${CALLERID(number)} --)
exten => h,2,NoOP(-- STATUS ${FAXSTATUS} ${FAXERROR} --)
exten => h,3,System(/home/sky/mailer/flow-my-mail.php -fax ${FAXFILE} ${CALLERID(num)} example@mail.com &)