Quantcast
Channel: FreePBX - FreePBX Community Forums
Viewing all articles
Browse latest Browse all 17443

Send Email or SMS notification for EVERY inbound hangup call

$
0
0

@v3z0viz2si wrote:

I am searching for a way to have FreePBX send out an Email or SMS for every inbound call who hangs up. I discovered on this board the suggestion below however, I am unable to get it to work.

It seems my hangup is knowing exactly where to put the suggested "local/s@send-email" line.

Does anyone have a better way to accomplish this task?


QUOTE


lgaetzLorne GaetzSangoma

If I was doing this, I would create a new context in /etc/asterisk/extensions_custom.conf with content similar to:

[send-email]
exten => s,1,NoOp(Entering user defined context [send-email] in extensions_custom.conf)
exten => s,n,System(echo 'Call from ${CALLERID(name)} at ${CALLERID(number)}' | mail -s 'SUBJECT' 'address@email.com')
exten => s,n,hangup()

Then in FreePBX create an extension of type, other (custom) device, give it a name and number. In the dial field use:

local/s@send-email

Now you have a local dummy extension that will execute custom code whenever it is dialed. You can include it in ring groups, or queues, etc. It will never answer the call, but whenever it rings it will execute the custom code. You have the basis for adding your own code for whatever you can dream up once you learn a bit of Asterisk.

edit - fixed system line quote

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17443

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>