Problem with sending notifications about missed calls in the queue

Good afternoon. FreePbx 17 Asterisk 21.6 Debian 12. There is a problem with sending messages about missed calls in the queue. I’ve set up Postfix, and text messages are being sent. Next, I added to the extensions_override_freepbx.conf file:
[ext-queues] ;
exten => h,1,ExecIf($[“${CDR(dstchannel)}”=“”]?System(echo “${CD R(start)} missed call from ${CDR(clid)} | To the number: ${DR(dead)} | Date of the call: ${STRFTIME(${EPOCH},%l:%M:%S %p %Z on %A %B %e)} | Queue ${NODEST}” | mail -s “Missed call from ${CDR(clid)}” [email protected])
exten => h,2,Gosub(macro-hangupcall,s,1())
The problem is that the missed emails are coming and not coming. The mail.log only has entries when the message is being sent and the message arrives. According to the general logic, this rule is always present (when a missed one occurs). What could be the reason for the problem of emails being sent or not? Can someone suggest alternative ways to send notifications? Before that, everything worked fine on Asterisk 11.Жирный

What does the mail log say?

In the mail.log file, the commit is only performed upon successful dispatch. At the moment when the emails do not arrive but there was a missed call, nothing is recorded in the log.

Then show from the Asterisk logs where this missed call happens and that the notification is being triggered.

Happy birthday, @BlazeStudios !

1 Like

Is there a reason why you can’t use the missed call module instead of hacking the override file?

If you can share how to configure the notification of missed calls in the QUEUE through the module, I would be very grateful.

In the log, he writes that the rule has worked, as I understand it, but at this moment, the email is not being sent.:
Spawn extension (ext-queues, 47, 54) exited non-zero on ‘PJSIP/bee_▒▒▒▒▒▒▒-0000cc37’
– Executing [h@ext-queues:1] ExecIf(“PJSIP/bee_▒▒▒▒▒▒▒-0000cc37”, “0?System(echo “2025-02-28 09:18:14 ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒ “▒▒▒▒▒▒▒” <▒▒▒▒▒▒▒> | ▒▒ ▒▒▒▒▒: 622022 | ▒▒▒▒ ▒▒▒▒▒▒: 9:18:30 AM MSK on Friday February 28 | ▒▒▒▒▒▒▒ 47” | mail -s “▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒ “▒▒▒▒▒▒▒” <▒▒▒▒▒▒▒>” ▒▒▒▒▒▒▒@▒▒▒▒▒▒▒.ru, ▒▒▒▒▒▒▒@▒▒▒▒▒▒▒.ru”) in new stack
– Executing [h@ext-queues:2] Gosub(“PJSIP/bee_▒▒▒▒▒▒▒-0000cc37”, “macro-hangupcall,s,1()”) in new stack

This is not valid LInux shell syntax. “>” must be followed by the target of the redirection, or an indication to close the file descriptor. Also, I don’t think one can pass multiple parameters to the -s option on mail. Basically, your quoting is all wrong.

When I specify one mailbox, it works exactly the same way. Sometimes she sends emails, sometimes she doesn’t. Can you tell me if you know how to solve this problem?

== Spawn extension (dialOne-with-exten, 5006, 2) exited non-zero on ‘Local/5006@from-queue-0000724c;2’
– Local/5006@from-queue-0000724c;2 Internal Gosub(app-missedcall-hangup,5006,1) complete GOSUB_RETVAL=
– Local/5006@from-queue-0000724c;2 Internal Gosub(queueMemberCall-hangup,s,1(5006,1740723509.179175,47)) start
– Executing [s@queueMemberCall-hangup:1] NoOp(“Local/5006@from-queue-0000724c;2”, “5006”) in new stack
– Executing [s@queueMemberCall-hangup:2] UserEvent(“Local/5006@from-queue-0000724c;2”, “QueueMemberCallHangup,QAGENT:5006,UNIQ:1740723509.179175,Queue:47,DIALSTATUS:CANCEL”) in new stack
– Executing [s@queueMemberCall-hangup:3] Return(“Local/5006@from-queue-0000724c;2”, “”) in new stack
== Spawn extension (dialOne-with-exten, 5006, 2) exited non-zero on ‘Local/5006@from-queue-0000724c;2’
– Local/5006@from-queue-0000724c;2 Internal Gosub(queueMemberCall-hangup,s,1(5006,1740723509.179175,47)) complete GOSUB_RETVAL=
== Spawn extension (ext-queues, 47, 54) exited non-zero on ‘PJSIP/bee_▒▒▒▒▒▒▒-0000cc37’
– Executing [h@ext-queues:1] ExecIf(“PJSIP/bee_▒▒▒▒▒▒▒-0000cc37”, “0?System(echo “2025-02-28 09:18:14 ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒ “▒▒▒▒▒▒▒” <▒▒▒▒▒▒▒> | ▒▒ ▒▒▒▒▒: ▒▒▒▒▒▒▒ | ▒▒▒▒ ▒▒▒▒▒▒: 9:18:30 AM MSK on Friday February 28 | ▒▒▒▒▒▒▒ 47” | mail -s “▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒ “▒▒▒▒▒▒▒” <▒▒▒▒▒▒▒>” admin@▒▒▒▒▒▒▒.ru”) in new stack
– Executing [h@ext-queues:2] Gosub(“PJSIP/bee_84912622022-0000cc37”, “macro-hangupcall,s,1()”) in new stack

Still has the same error. This is mainly a Linux question, not a FreePBX or Asterisk one.

Today, the most interesting thing is that all the letters started coming again. There were almost no notifications yesterday. It’s just not clear why he’s sending it or not.

Is there really no solution or other way to send without buying paid modules?

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.