I am developing an application for automated IVR testing on asterisk but the problem is that I am unable to inject DTMF into the asterisk.PlayDTMF doesn’t seems to be beneficial because It plays DTMF on the other END of channel i.e caller but requirement is to inject the DTMF on callie side…

Add a local channel and inject it into that.

Thanks for the concern could u please elaborate it up-to some extent… … l+channels

i have a scenario like.


exten => _X.,1,set(VOICEFILEPATH=/usr/ajaytest)
exten => _X.,n,Answer()
exten => _X.,n(language),Read(LANG,${VOICEFILEPATH}/g_welsub,1,5,2)
exten => _X.,n,GotoIf($[${LEN(${LANG})}=0]?lbl_hangup:)
exten => _X.,n,GotoIf($["${LANG}" = “1”]?P21:)
exten => _X.,n,GotoIf($["${LANG}" = “2”]?P22:)
exten => _X.,n,GotoIf($["${LANG}" = “3”]?P23:)
exten => _X.,n(P21),playback(catname_BOS1)
exten => _X.,n(lbl_hangup),Hangup()

i have an AMI like…

$oSocket = @fsockopen($strHost, 5038, $errnum, $errdesc)
or die(“Connection to host failed”);
fputs($oSocket, “Action: login\r\n”);
fputs($oSocket, “Events: off\r\n”);
fputs($oSocket, “Username: $strUser\r\n”);
fputs($oSocket, “Secret: $strSecret\r\n\r\n”);
fputs($oSocket, “Action: PlayDTMF\r\n”);
fputs($oSocket, “Channel: SIP/4001-0008\r\n”);
fputs($oSocket, “Digit: 1\r\n\r\n”);

    fputs($oSocket, "Action: Logoff\r\n\r\n");

while (!feof($oSocket)) {
$wrets .= fread($oSocket, 8192);
echo “Reload Events”."";
echo $wrets;

when i am making a call to this contenxt and executing the AMI application it says DTMF queued successfully and i hear a DTMF tone too. BUT this DTMF if being played on the caller side and as per the requirement it shold hit the callie side i mean the asterisk should accept this DTMF and move the dialplan as per the DTMF recived by AMI… so please help me accordingly…

Is requested to help on this issue…

thanks in advance…

could you please help me on this issue…

I have. If you don’t understand how local channels will solve the problem, I think you need to pay a consultant, and therefore move to the Jobs forum.

Also note that you are supposed to wait 24 hours before bumping threads.

Hi david,
Thanks for your kind suggestion. I just asked for the help and you started showing your consultant attitude,the problem got resoved by editing the source-code rather than your bogus IDEA . if you are helping some-one on the forum TRY to understand his problem and help him for the proper solution rather than giving vague and incomplete Ideas…

I’m a software product developer, not a consultant. In any case, any of the other Asterisk users on the forum could have expanded on my suggestion or given an alternative solution, if they had thought it was appropriate.

We use the local channel technique to acknowledge calls to AgentLogin agents. It works. As I remember it, it took almost no time from the problem statement to understanding how it could be solved.