Sending DTMF after a call is bridged

Hi Everyone,

I know there is another question http://forums.asterisk.org/viewtopic.php?f=1&t=81736 with a similar title but my use case is different and was also hoping to get some additional clarity on some of the responses for that question.

Each month, I need to pay my insurance company. They do not accept automatic payments via credit card but they let me pay each month’s premium over the phone using a credit card. I wanted to automate the tedium of inputting all the responses to make the payment. So I turned to Asterisk for this task. I am using a vanilla installation of Asterisk and not FreePBX / AsteriskNow.

I thought I will just use the Dial command’s D option but that does not actually work. My dialplan is below:


exten => 203,1,Monitor(wav,,i) ; recording it so I can listen to the confirmation later on 
exten => 203,n,Dial(SIP/DIAL_OUT_NUMBER,,D(www212121{{truncated}}))
exten => 203,n,Playtones(congestion)
exten => 203,n,Hangup()

I use LinPhone to dial the extension 203 and Asterisk dials my DIAL_OUT_NUMBER and after a few seconds of pause and sending tones, the call gets bridged. But unfortunately the IVR on the other hand has not received any of the DTMF tones. Atleast it starts the greeting as though none was sent. Although, when I try this on my cell phone, I seem to be getting DTMF tones. Please note that I tried different values for dtmfmode (auto, rfc2833, etc.) but no luck.

Once the call is bridged, I can use LinPhone to send DTMF tones through the keypad and it functions just like my cell phone but I would like to automate this sending of tones as well.

My question is how can I send DTMF tones after my call is bridged (i.e., simulate a manual key press on LinPhone)? I read AMI Originate as a possible solution to this. However, I don’t know how to get started. I can use Perl AMI interface but how do I know which channel this call is on? Any sample code around interacting with the call after it is live will be very much appreciated. I don’t care for performance – I just need to do this once a month.

Thanks!