Re: как можно узнать успех или неудачу отправки факса?
Добавить обработку результатов функции SendFAX:
CLI> core show application SendFax
-= Info about application 'SendFAX' =-
[Synopsis]
Send a FAX
[Description]
SendFAX(filename[|options]):
Send a given TIFF file to the channel as a FAX.
The option string may contain zero or more of the following characters:
'a' - makes the application behave as an answering machine
The default behaviour is to behave as a calling machine.
This application uses following variables:
LOCALSTATIONID to identify itself to the remote end.
LOCALHEADERINFO to generate a header line on each page.
This application sets the following channel variables upon completion:
FAXSTATUS - status of operation:
SUCCESS | FAILED
FAXERROR - Error when FAILED
FAXMODE - Mode used:
audio | T38
REMOTESTATIONID - CSID of the remote side.
FAXPAGES - number of pages sent.
FAXBITRATE - transmition rate.
FAXRESOLUTION - resolution.
Returns -1 in case of user hang up or any channel error.
Returns 0 on success.
Например вывод результатов и проверка статуса "FAXSTATUS":
exten => h,1,NoOp(FAXSTATUS: ${FAXSTATUS}, FAXERROR: ${FAXERROR}, FAXMODE: ${FAXMODE}, REMOTESTATIONID: ${REMOTESTATIONID}, FAXPAGES: ${FAXPAGES}, FAXBITRATE: ${FAXBITRATE}, FAXRESOLUTION: ${FAXRESOLUTION})
exten => h,2,GotoIf($[${FAXSTATUS} = SUCCESS]?3:5)
Дальше можно проиграть нужное сообщение/перенабрать и т.д...
|