[asterisk-users] log incoming calls without answering

Pete Mundy pete at fiberphone.co.nz
Thu Apr 20 21:13:52 CDT 2017


> On 21/04/2017, at 9:33 am, Fabio Moretti <fmoretti at tecytal.com> wrote:
> 
> the point basically is: it is possibile for asterisk to log a call
> without answering it? How to do it in the dialplan? Or I'm wasting time
> because an analog line who enter asterisk is always answered?

Yes.

Something similar to this will work (untested, possibly with syntax errors, but gives the idea):

	exten => s,1,NoOp(Inbound call from callerID $CALLERID(num))
	exten => s,n,Hangup

The 'Hangup' will simply tell the FXS box (which you've used to terminate the line) that Asterisk isn't accepting the call.

One problem could be the FXS box re-inviting Asterisk over and over (causing duplicate NoOp logs), but you could add a Wait in there for 2-3 minutes before 'Hangup'. Not many calls would ring for more than 2-3 minutes. In fact the PSTN may limit the number of rings (I have a feeling here in NZ it's about 250 rings or so).

	exten => s,1,NoOp(Inbound call from callerID $CALLERID(num))
	exten => s,n,Wait(180)
	exten => s,n,Hangup

Pete

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170421/639a00a8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3577 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170421/639a00a8/attachment-0001.bin>


More information about the asterisk-users mailing list