Answer the question
In order to leave comments, you need to log in
Sending email notifications of missed calls to internal subscribers?
There is Asterisk + Freepbx, in the current configuration I sent notifications via voice mail, but voice mail is generally not needed at all. I really want to do it through the dialplan, I found examples for IVR, queues, etc., but unfortunately I can’t find it just for internal subscribers.
Example: subscriber 100 calls subscriber 200, subscriber 200 does not pick up the phone for 10 seconds, we send short beeps + a letter to the mail, and the same with offline statuses and if the subscriber drops the call.
Answer the question
In order to leave comments, you need to log in
h extension and the HANGUPCAUSE variable
in this extension executes the dialplan after the channel dies.
example
exten=>_XXX,1,Set(NUMBER=${EXTEN})
exten=> h, 1,GotoIf($["${HANGUPCAUSE}" = "16"]?3:2)
exten=> h,2 , System(sendmail.sh ${NUMBER})
exten => h,3, NoOp
in this case, on any abnormal end of the call (busy, hung up, unavailable), the sendmail.sh script will be executed with the number of the caller as a parameter
yes, not the point - mutt or sendmail... if you want, here is a piece of a live dialplan for sending sms about missed calls to megaphone numbers via their Email2SMS service:
[send_sms_to_megafon] ; SMS sending context after HangUP() - according to the rules from dial-to-megafon context h-extenses
; used if the caller (initiator of the call)
hangs up exten => s,1, NoOP("Sending SMS to unanswered subscriber ${D_N_for_h1} from ${F_N_for_h1}")
exten => s,n, System(rm /my_scripts/sms/ sendfile_${D_N_for_h1})
exten => s,n, System(touch /my_scripts/sms/sendfile_${D_N_for_h1})
exten => s,n, System(chmod 777 -R /my_scripts/sms/sendfile_${D_N_for_h1} )
exten => s,n, System(echo "Subject: ${STRFTIME(${EPOCH},,%d.%m.%y - %H:%M:)}" >>/my_scripts/sms/sendfile_$ {D_N_for_h1})
exten => s,n, System(echo "Mime-Version: 1.0" >>/my_scripts/sms/sendfile_${D_N_for_h1})
exten => s,n, System(echo "Content-Type: text /html charset=UTF-8" >>/my_scripts/sms/sendfile_${D_N_for_h1})
exten => s,n, System(echo "Content-Transfer-Encoding: 8bit" >>/my_scripts/sms/sendfile_${ D_N_for_h1})
exten => s,n, System(echo "" >>/my_scripts/sms/sendfile_${D_N_for_h1})
exten => s,n, System(echo "Missed call from ${F_N_for_h1}" >> /my_scripts/sms/sendfile_${D_N_for_h1})
exten => s,n, System(echo "" >>/my_scripts/sms/sendfile_${D_N_for_h1})
exten => s,n, System(echo "." >>/my_scripts/sms/sendfile_${D_N_for_h1})
exten => s,n, System(echo "" >>/my_scripts/sms/sendfile_${D_N_for_h1})
exten => s,n, System(cat /my_scripts/sms/sendfile_${D_N_for_h1} | sendmail -f my @XXXrom.ru -t ${D_N_for_h1}@sms.ugsm.ru)
exten => s,n, NoOp("SMS for ${D_N_for_h1} from ${F_N_for_h1} has been sent.")
exten => s,n, Hangup() Personal
questions. Whatever I can, I'll help.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question