Play message to incoming calls?

Good morning!

I’m running Asterisk 11.25.1 (according to asterisk -rx ‘core show version’)

I have a T1 (dahdi) coming into the system. I need to play a message when a call comes in; the “This call may be monitored or recorded”.

I think that what I maybe need to do is something like modify my extensions_custom.conf something like this:

exten => s,1,Answer()
same => s,n,Playback(this-call-may-be-monitored-or-recorded)
… but then I’m not sure of the next step, which would be to process the call (operator, DID’s, etc.)

I don’t need the message to play on station to station calls, just on incoming trunk calls. Once the message is played, it should ring whatever extension it would normally ring (DID, operator, etc.)

Any help would be greatly appreciated. I hope I’m making sense.

(I’ve only been on Asterisk about 2 years, I’m a certified NEC guy… so I understand telephony, just not the nuances of Asterisk systems yet)

Thank you in advance!


Why not point your inbound route to an announcement and then point the announcement to whichever destination you want. Extension, Ring Groups etc.

Well, mainly because I have 100 DID’s… I’d have to build a route to each of them.

You need to change your trunk context to something like from-dahdi-announcement and then in extensions_custom.conf:

exten => _.,1,Answer()
exten => _.,n,Wait(1)
exten => _.,n,Playback(this-call-may-be-monitored-or-recorded)
exten => _.,n,Goto(from-dahdi,${EXTEN},1)  ; sub whatever context you want in place of from-dahdi

That was EXACTLY what I needed!

It seems so simple, now that I see it… thank you so VERY much!

1 Like

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