How To: Send Dtmf Back To The Calling Channel From Post-answer Subroutine Executed On Outbound Channel

Home » Asterisk Users » How To: Send Dtmf Back To The Calling Channel From Post-answer Subroutine Executed On Outbound Channel
Asterisk Users No Comments

I have a customer who wants me to send a DTMF on the calling channel if the called channel says any word. So I am using
[my_gosub_routine]

exten => s,1,NoOp(ARG1=${ARG1} ARG2=${ARG2})
same => n,Playback(hello)
same => n,Return()

[default]

exten => _X.,1,NoOp()
same =>
n,Dial(PJSIP/alice,,U(my_gosub_routine^my_gosub_arg1^my_gosub_arg2))
same => n,Hangup()

Is there a way to send DTMF back to the caller from [my_gosub_routine]?
If I use sendDTMF at the moment, it will be heard only by the callee, and only the caller must hear it.