SendDTMF when call answered

Hi

In extensions_custom.conf i’ve put in the below:

[custom-app]
exten => 572,1,NoOp(Welcome to the customer application)
exten => 572,n,Answer()
exten => 572,n,SendDTMF(*1)
exten => 572,n,Dial(SIP/200,15,trwWb)

to try and get *1 pressed (and call recording automatically started) when an person answers extension 200. But i can the the *1 being pressed before extension 200 rings.

Is there anyway i can modify this custom-app for *1 to be injected when 200 answers?

Kind Regards

Tara

Type the command “core show application Dial” at the CLI prompt. You will find an option, it might be “D”, that allows for sending DTMF in one or both directions after AST_CONTROL_ANSWER is generated on the outgoing channel (i.e. not just for SIP).

thanks David for the reply. I got it to work but unfortunately it doesn’t do what i expected. It sends *1 to the called party rather than to activate call recording :frowning:

– Executing [572@custom-app:3] Dial(“SIP/pureip-00000000”, “SIP/200,15,trwWb||D(*1)”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/200
[2013-09-16 13:29:29] NOTICE[14769]: channel.c:4287 __ast_read: Dropping incompatible voice frame on SIP/pureip-00000000 of format ulaw since our native format has changed to (alaw)
– SIP/200-00000001 is ringing
– SIP/200-00000001 answered SIP/pureip-00000000
– Sending DTMF ‘*1’ to the called party.

D([called][:calling])

Thank you David for all your help. i changed it but it got *1 sent to the calling party and unfortunately didn’t activate call recording as i hoped (obviously). I’ll try and look at activating call recording automatically another way.

thanks again.

-- SIP/200-00000001 is ringing
-- SIP/200-00000001 answered SIP/pureip-00000000
-- Sending DTMF '*1' to the calling party.

If you are trying to activate recording within Asterisk, you will need to use the relevant recording applications. The only way of doing it with “DTMF” would be to use a local channel, but that would be an unnecessary use of one.

Understood. what i’m trying to acheive here is having call recording on automatically but giving the user the option to pause it if needed. I seem to cannot be able to find an easy way to do this. Do you have any ideas please?

I’d look at PauseMixMonitor, but it was added after the version of Asterisk with which I’m most familiar.