Announcement on each/multiple DDI’s

Hi Guys

I need some urgent help please!

Basically it’s a client with multiple DDI’s, where in the past we only played the “Welcome” announcement on the main number, they want the announcement / message played on all numbers before ringing through to the intended extension.
One way would be to create 300 announcements with specific destinations for each extension but that would just make me suicidal.
Is there an easier way?

It would just have been so much easier if “Inbound Routes” had the option to play a system recording.

Quentin

Very simple, just create a custom context in extensions_custom.conf that answers the channel, plays the message then passes control back to from-trunk.

It’s four lines of code.

Once that is done just change the context in your trunk to the custom context and you are ready to go.

Quite like what Sky proposes, another suggestion to use custom_destination which i did once that seemed to work. :S

  1. in /etc/asterisk/extensions_custom.conf

[play-msg-to-all]
exten => _X.,1,NoOp(Lets play a message for all incoming messages)
same => n,Playback(youranoucementfilename)
same => n,Goto(ext-did,${EXTEN},1)
same => n,Hangup

  1. Then create custom-destination
    Custom destination: play-msg-to-all,${EXTEN},1

  2. Then for your inbound route, send it to custom-destination, as named above.

This gives a little bit of control which to have the music and which to not as well…

Sanjay, thanks for posting the code. I would have done that too but did not have a guide in front of me and was answering from a small form factor device that does not lend to cutting, pasting etc.

Anyway, Sanjay’s idea is right, but make sure you do a wild card route.

One other option would be to do:

[inbound-play-msg-to-all]
exten => s,1,NoOp(Lets play a message for all incoming messages)
same => s,Playback(youranoucementfilename)
same => s,Goto(ext-did,${EXTEN},1)
same => s,Hangup

Now you can change your inbound trunk context to context=inbound-play-msg-to-all

This would plan the message then move on to the normal inbound routing.

Also, some providers don’t support early media so you may have to:

[inbound-play-msg-to-all]

exten => s,1,Answer()
same => s,NoOp(Lets play a message for all incoming messages)
same => s,Playback(youranoucementfilename)
same => s,Goto(ext-did,${EXTEN},1)
same => s,Hangup

Thank you to all responders, all your advice helped!

Kind regards
Quentin

You should share your final solution with everyone.