SendDTMF problem on outgoing call

Hi -

Trying to send the DTMF tone for # in my dialplan using SendDTMF(#) and testing against a voicemail system that accepts # to bypass and jump stright to recording a message. I can hear the tone properly if I answer the phone but if I let the voicemail pick up the tone is played yet nothing happens with the voicemail system. If I try it manually by pressing the # key everything works fine.

Does anyone know if sendDTMF actually works on external calls using IAX?

Thanks!

show us your dialplan for this … i’m not convinced that SendDTMF() is suitable in your case.

[test]
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,SendDTMF(#) ;doesnt work
exten => s,4,Wait(1)
exten => s,5,playback(dtmf-pound) ;raw pcm of dtmf tone
exten => s,6,Wait(1)
exten => s,7,Playback(${FILE})

more details- how is this phone connected to the pbx? telco? pots port? voip carrier?

if sip, post the applicable sip.conf segment…

also is this an outgoing call? does the voicemail system call * or does asterisk dial out with a .call file?

What I am trying to do is have asterisk automatically dial out using a call file and then send the # DTMF tone. I am using IAX (although also tested with SIP) via Voicepulse Connect.

ah.

First dump the Answer() as it applies only to incoming calls.

Then use iax2 for vpconnect. (if that doesn’t work, use SIP with dtmfmode=inband and ulaw codec)

Try sendign the tone a few times- SendDTMF(###)

see if any of those help…

tried all the above, same problem. Now, what was weird was that if I tried SendDTMF(###) as suggested and as I watched the call go through, ### actually hung up the line so I’m guessing it is recognizing the DTMF tones. I tried ## and it didn’t recognize and I tried Playback(dtmf-tone) after each other and that didn’t work either. I can’t believe something this simple is impossible to do so there must be a setting wrong in my configuration somewhere. Is there a way to turn up the levels on outgoing calls? I remember a customer telling me once how quiet the calls were but I never got to the root of the problem.

You probably need to have it wait a couple of seconds before sending the tone.

It works fine for me with a Zap channel, but I had to use a Macro in the dialplan, like the following, which allows a VoIP user to do a voice call on our key system:

exten => _*662XX,1,Dial(Zap/g1/|10|M(flash^${EXTEN}))

[macro-flash]
exten => s,1,background(silence/1)
exten => s,2,Flash
exten => s,3,background(silence/1)
exten => s,4,SendDTMF(${ARG1})

In your case you just want something like

exten => s,1,background(silence/1)
exten => s,2,SendDTMF(#)
exten => s,3,background(silence/1)
exten => s,4,background(${FILE})

You could use playback if you prefer, it doesn’t really matter.

I put a Wait(1) on either side and no joy.

Today I hooked up a softphone and dialled out on the same trunk. I was able to successfully send a DTMF tone manually by pressing the # on the softphone keypad and it was recognized by the system I am dialling. So then I really have to question the validity of the SendDTMF command that asterisk sends when I do this through the call file.

Any other ideas? I’m completely stumped…

try increasing wait to 2 or 3…

also try using Monitor() to record the call. Maybe you can then see what the problem is?

Monitor… what a great idea!

OK, So I monitored the call. It created two files test-in.wav and test-out.wav.

The dialplan is exactly as I posted above. This is what I heard:

test-in.wav - heard the call answer and the ivr menu dialog.
test-out.wav - complete silence then playback of ${FILE}.

Listening carefully to the test-in.wav I could hear a slight break in the dialog where the SendDTMF tone was sent but in the test-out.wav no tone whatsoever!

Also, I tried playing back the dtmf-pound recording instead of SendDTMF. What was recorded was complete garbage instead of the tone.

Any ideas?

Interesting Dial app option. It probably does the same as SendDTMF, though, so I doubt it will be of any help. Nice to know it’s there, though. My how the documentation has improved in the last year!

Are you sure that your sip configuration is set to send DTMF in band? Are you using an aggressive compression protocol that might be munging the tones?

You said you’re using a call file. Are you sure you’re first dialing out and then when the call gets bridget goes to the context? Dummy, but it might be the problem :wink: