# Notification for missed calls - part II

**URL:** <https://community.freepbx.org/t/notification-for-missed-calls-part-ii/71284>\
**Category:** Development\
**Created:** [November 6, 2020, 2:36pm UTC](https://community.freepbx.org/t/notification-for-missed-calls-part-ii/71284 "2020-11-06T14:36:41Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![Charles\_Darwin](https://community.freepbx.org/user_avatar/community.freepbx.org/charles_darwin/32/17132_2.png) [@Charles\_Darwin](https://community.freepbx.org/u/Charles_Darwin)\
**Post date:** [November 6, 2020, 9:31pm UTC](https://community.freepbx.org/t/notification-for-missed-calls-part-ii/71284/12 "2020-11-06T21:31:58Z")

</div>

Another work-around would be a script, which you execute as a cronjob every 5mins or so (you have to change the time span)

cdr-email.sh

```
#!/bin/bash

/usr/bin/mysql -u freepbxuser -PASSWORD -e "SELECT calldate AS Timestamp, clid AS Caller, disposition AS Status, dst AS Destination, duration AS Duration, src AS Source, did AS Target_inbound,lastapp AS LastApp,dcontext AS Context, dstchannel AS DestChannel, userfield AS outgoing, uniqueid AS ID from cdr where calldate > date_sub(now(), interval 24 HOUR) GROUP BY ID, Status ORDER BY ID DESC, Status DESC" -H asteriskcdrdb | mail -s "$(echo -e "Custom Call Report YOURLOCATION\nContent-Type: text/html")" YOUREMAILADDRESS

```

I described it here

> [@Automated email with simplified call list - much better than the CDR Reports module...just kidding slight\_smile](https://community.freepbx.org/t/automated-email-with-simplified-call-list-much-better-than-the-cdr-reports-module-just-kidding/70111):
>
> One of the shortcomings of freePBX is that there is no useful & complete call list available (GUI or email). Today I played around with a script from here …yet, it is still not very useful. my script (/root/cdr-email.sh): #!/bin/bash /usr/bin/mysql -u freepbxuser -pMYPASSWORD -e “SELECT calldate AS Timestamp, clid AS Caller, disposition AS Status, dst AS Destination, duration AS Duration, src AS Source, did AS Target\_inbound,lastapp AS LastApp,dcontext AS Context, dstchannel AS DestChannel…

---

_[View the full topic](https://community.freepbx.org/t/notification-for-missed-calls-part-ii/71284)._
