Play recording before connecting outbound calls

Hello, I’ve got an odd request.

Is there a documented way, module, add on, or your recommendation is appreciated on the following.

I need to play an audio file BEFORE the call is connected/dialed, and after the msg is heard then go on traditionally.

This is to inform the user/dialer of msg before the call is executed.

Example. Local user dials any number, then listens to “your call is being connected after this msg, please remember to blablabla” then call connects.

I need to be able to enable or disable this with comments or a flag, as it will be used sporadically.

all comments, ideas, pointers, or suggestions are welcomed
thanks :bulb:

I use something like this in my macro and it works for me!

[macro-zapout] exten => s,1,NoOp(zapout - ${PST-OUT}/${MACRO_EXTEN}) exten => s,n,Playback(your-call-is-being-connected-after-this-msg-please-remember-to-blablabla) exten => s,n,Wait(0.3) exten => s,n,Dial(${PST-OUT}/${MACRO_EXTEN},,tTKk) exten => s,n,Hangup()

Then you can comment out the Playback line to disable it.

Hi nypon

This works for zap only right?

not ext to ext.

I appreciate your insight.
thanks

It can work for an extension as well.

No it works for anything!
That was just a copy of my ZAP macro.

Something like this in your <extensions.conf>

[code][general]
PST-OUT=ZAP/4
PHONZO-OUT=SIP/sip_phonzo-out
IDEASIP-OUT=SIP/sip_ideasip-out

[macro-zapout]
exten => s,1,NoOp(zapout - ${PST-OUT}/${MACRO_EXTEN})
exten => s,n,Playback(your-call-is-being-connected-after-this-msg-please-remember-to-blablabla)
exten => s,n,Wait(0.3)
exten => s,n,Dial(${PST-OUT}/${MACRO_EXTEN},tTKk)
exten => s,n,Hangup()

[macro-phonzo-out]
exten => s,1,NoOp(phonzo-out - ${PHONZO-OUT}/${MACRO_EXTEN})
exten => s,n,playback(your-call-is-being-connected-after-this-msg-please-remember-to-blablabla)
exten => s,n,Wait(0.3)
exten => s,n,Dial(${PHONZO-OUT}/${MACRO_EXTEN},tTrKk)
exten => s,n,Hangup()

[macro-ideasip-out]
exten => s,1,NoOp(ideasip-out - ${IDEASIP-OUT}/${MACRO_EXTEN})
exten => s,n,playback(your-call-is-being-connected-after-this-msg-please-remember-to-blablabla)
exten => s,n,Wait(0.3)
exten => s,n,Dial(${IDEASIP-OUT}/${MACRO_EXTEN},tTrKk)
exten => s,n,Hangup()[/code]

This is for one ZAP and two SIP account.