Есть Elastix.
Прием факсов на одну эл. почту настроен и работает.
Далее у внутренних номеров включил прием факса, указал эл. почту.
Факс отправляется, но на эл. почту не приходит.
В Elastix кажется нерабочий код:
Код: Выделить всё
[app-fax]
include => app-fax-custom
exten => 666,1,Set(FAX_RX_EMAIL=fax@mydomain.com)
exten => 666,n,Goto(ext-fax,s,1)
exten => h,1,Macro(hangupcall,)
; end of [app-fax]
[ext-fax]
include => ext-fax-custom
exten => 250,1,Noop(Receiving Fax for: Maksim (250), From: ${CALLERID(all)})
exten => 250,n,Set(FAX_RX_EMAIL=mail1@mail.ru)
exten => 250,n(receivefax),Goto(s,receivefax)
exten => 270,1,Noop(Receiving Fax for: Roman (270), From: ${CALLERID(all)})
exten => 270,n,Set(FAX_RX_EMAIL=mail2@mail.ru)
exten => 270,n(receivefax),Goto(s,receivefax)
exten => s,1,Macro(user-callerid,)
exten => s,n,Noop(Receiving Fax for: ${FAX_RX_EMAIL} , From: ${CALLERID(all)})
exten => s,n(receivefax),StopPlaytones
exten => s,n,ReceiveFAX(${ASTSPOOLDIR}/fax/${UNIQUEID}.tif,f)
exten => s,n,ExecIf($["${FAXOPT(error)}"=""]?Set(FAXSTATUS=FAILED LICENSE EXCEEDED))
exten => s,n,ExecIf($["${FAXOPT(error)}"!="" && "${FAXOPT(error)}"!="NO_ERROR"]?Set(FAXSTATUS="FAILED FAXOPT: error: ${FAXOPT(error)} status: ${FAXOPT(status)} statusstr: ${FAXOPT(statusstr)}"))
exten => s,n,Hangup
exten => h,1,GotoIf($["${FAXSTATUS:0:6}" = "FAILED"]?failed)
exten => h,n(process),GotoIf($[${LEN(${FAX_RX_EMAIL})} = 0]?end)
exten => h,n,System(${ASTVARLIBDIR}/bin/fax-process.pl --to "${FAX_RX_EMAIL}" --from "freepbx@gmail.com" --dest "${FROM_DID}" --subject "New fax from ${URIENCODE(${CALLERID(name)})} ${URIENCODE(<${CALLERID(number)}>)}" --attachment fax_${URIENCODE(${CALLERID(number)})}.pdf --type application/pdf --file ${ASTSPOOLDIR}/fax/${UNIQUEID}.tif)
exten => h,n(end),Macro(hangupcall,)
exten => h,process+101(failed),Noop(FAX ${FAXSTATUS} for: ${FAX_RX_EMAIL} , From: ${CALLERID(all)})
exten => h,n,Macro(hangupcall,)
; end of [ext-fax]
Код: Выделить всё
exten => 666,n,Goto(ext-fax,s,1)
Код: Выделить всё
exten => 250,1,Noop(Receiving Fax for: Maksim (250), From: ${CALLERID(all)})
exten => 250,n,Set(FAX_RX_EMAIL=mail1@mail.ru)
exten => 250,n(receivefax),Goto(s,receivefax)
exten => 270,1,Noop(Receiving Fax for: Roman (270), From: ${CALLERID(all)})
exten => 270,n,Set(FAX_RX_EMAIL=mail2@mail.ru)
exten => 270,n(receivefax),Goto(s,receivefax)