Answer the question
In order to leave comments, you need to log in
Sending missed call notification to mail in freepbx?
Notifications about a missed call are not sent to the mail, it is written in extensions_custom.conf
exten => s,n, System(echo "текст" | mail -s "тема" [email protected])
echo "текст" | mail -s "тема" [email protected]
[ivr-5] ;
exten => h,1,System(echo "Пропущеный вызов с номера ${CALLERID(num)} в ${STRFTIME(${EPOCH},,%H:%M)}" | sendmail -f [email protected] -t [email protected])
same => n,Hangup()
-- Executing [[email protected]:1] System("SIP/AS5350-000041bc", "echo "Пропущеный вызов с номера 89991111111 в 16:45" | sendmail -f [email protected] -t [email protected]") in new stack
Answer the question
In order to leave comments, you need to log in
Thanks for your help, I wrote it like this:
exten => 1314,1,GotoIf($["${QUEUESTATUS}"="CONTINUE"]?answered)
same => n,ExecIf($["${CDR(dstchannel)}"=""]?System(echo "Пропущеный вызов с номера ${CALLERID(num)} в ${STRFTIME(${EPOCH},,%H:%M)}" | sendmail -f [email protected] -t [email protected]))
Through ssh, you issue the command on your own behalf, and through System, most likely on behalf of the asterisk user (if one has been created). Perhaps the asterisk user does not have rights to the mail command.
The mail command asks questions the first time it is run.
You need to
1) allow asterisk user /bin/bash instead of nologin in /etc/passwd
2) do su asterisk then mail, answer questions.
3) don't forget to do nologin back.
but in general it is necessary to transfer to systems only as /etc/asterisk/send_email "text" "[email protected]", and write a script that checks all possible gaps and sends a message.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question