Call pickup notification, how to make?

When incoming call I need to have email send with simple call info and which extension picked it up.
Call comes in, rings in a ring group, when someone picks up I need notification with extension number.

Maybe possible to do it on extensions themselves - whenever they pick up calls email sent?

Any suggestions welcomed.

That should be simple enough - you can watch the ‘full’ logfile with a “tail -F” and when the event happens, send out an email. There are also a couple of ways to do this in a custom context, so yeah, this should be easy.

Doubt it. Extensions are just about as stupid as POTS phones were. Setting them up to send out an email is going to be ridiculously hard and not portable across different phones.

Actually… this will blow your mind. Many manufacturers (not the least Sangoma) implement Action URLs which can be programmed into the SIP phone so they load a URL whenever the phone does ‘something’ (when it rings, when it answers, when it boots, when it registers, etc), so you could program your Sangoma phone to load a URL (and hence generate a record) whenever it answers a call. The URL can be on any host, it doesn’t even have to be on the PBX.

@cynjut killing everything with log parser kinda force approach :smile:
Thank you, good idea
do you have some working example code?

@lgaetz oh, last thing we want to go is rely on user devices
probably log trace is only hope

maybe asterisk (non freepbx approach) forum people will have some ideas from asterisk guts

looks like needed topic

maybe just add something like
exten => s,n,System(echo ‘Call from ${CALLERID(name)} at ${CALLERID(number)}’ | mail -s ‘Call received’ ‘[email protected]’)
to extensions_override_freepbx.conf?

1 Like

works through putting copy of [macro-dial-one] (from extensions_additional.conf) to /etc/asterisk/extensions_override_freepbx.conf

changing line 53 with dial to run macro on pickup using M() option:

exten => s,n(dial),Dial(${DSTRING},${ARG1},${D_OPTIONS}b(func-apply-sipheaders^s^1)M(picku))

exten => s,1,Noop(notification of pickup)
exten => s,n,System(echo ‘Answered by ${CALLERID(name)} at ${CALLERID(number)}’ | mail -s ‘Call answered’ ‘[email protected]’)

;–== end of [macro-picku] ==–;


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