DTMF problem via Call Manager

Hello

I am trying to make a call over my web site (click-to-call).
I have done everything well but I want to customer to confirm the call first so I set my context to “from-internal-custom” and edited these context as my wish but when I try to confirm call by pressing 1 asterisk doesnt detect my key press.

I have tried almost all of asterisk versions (1.6.2, 1.7.1, 1.8.2, 1.8.5) but unfortunately all same.
I have tried dtmfmode=auto, dtmfmode=rfc2833 and dtmfmode=inband in trunk details but no way. It never worked.

All my codes below. Could someone please help me to solve my dtmf problem.

call.php file in /var/www/html/ directory

[code]<?
$strHost=“127.0.0.1”;
$strUser=“admin”;
$strSecret=“mypassword”;
$strChannel=“SIP/trunk_name/”.$_GET[“to”]; //my first phone number comes here.
$strWaitTime=“10”;
$strCallerId="“1000” <1000>";
$strReceiver=“1000”; //1000 is my extension which is used in extensions_custom.conf
$strContext=“from-internal-custom”;

$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: originate\r\n”);
fputs($oSocket, “Channel: $strChannel\r\n”);
fputs($oSocket, “WaitTime: $strWaitTime\r\n”);
fputs($oSocket, “CallerID: $strCallerId\r\n”);
fputs($oSocket, “Exten: $strReceiver\r\n”);
fputs($oSocket, “Context: $strContext\r\n”);
fputs($oSocket, “Priority: 1\r\n\r\n”);
fputs($oSocket, “Action: Logoff\r\n\r\n”);
while (!feof($oSocket)) {
$wrets .= fread($oSocket, 8192);
}
fclose($oSocket);
if (stripos($wrets, ‘Originate successfully queued’)) {
echo "Call completed ";
} else {
echo "No accept call ";
}
?>
[/code]

extensions_custom.conf file in /etc/asterisk directory

[code][from-internal-custom]
exten => 1000,1,Goto(demo-menu,s,1)

[demo-menu]
exten => s,1,Answer()
exten => s,n,Background(incoming-call-1-accept-2-decline)
exten => s,n,Read(INPUT,1,10)
exten => s,n,GotoIf($[${LEN(${INPUT})} > 0]?${INPUT},1:i,1)
exten => 1,1,Dial(SIP/trunk_name/xxxxxxxxxxx,30) ;my second phone number comes here
exten => t,1,Hangup()
exten => h,1,Hangup()
exten => i,1,Hangup()[/code]

P.S: When I register my softphone to 1001 extensions and call 1000 extension over softphone, I can dial dtmf, it works well but if I try over call manager it doesnt work

What happens if You try it with:

[demo-menu] exten => s,1,Answer() exten => s,n,Read(INPUT,incoming-call-1-accept-2-decline,1,,,10) exten => s.n,NoOp(User pressed: ${INPUT}) exten => s,n,GotoIf($[${LEN(${INPUT})} > 0]?${INPUT},1:i,1) exten => 1,1,Dial(SIP/trunk_name/xxxxxxxxxxx,30) ;my second phone number comes here exten => t,1,Hangup() exten => h,1,Hangup() exten => i,1,Hangup()

Please test this and provide a cli-Output with core set verbose 3

I tried pressing 1 many times during the call and result is same like here

aky*CLI> core set verbose 3 Verbosity is at least 3 == Using SIP RTP TOS bits 184 == Using SIP RTP CoS mark 5 -- Executing [1000@from-internal-custom:1] Goto("SIP/phatel-00000009", "demo-menu,s,1") in new stack -- Goto (demo-menu,s,1) -- Executing [s@demo-menu:1] Answer("SIP/phatel-00000009", "") in new stack -- Executing [s@demo-menu:2] Read("SIP/phatel-00000009", "INPUT,incoming-call-1-accept-2-decline,1,,,10") in new stack -- Accepting a maximum of 1 digits. -- <SIP/phatel-00000009> Playing 'incoming-call-1-accept-2-decline.slin' (language 'en') -- User entered nothing. -- Executing [s@demo-menu:3] GotoIf("SIP/phatel-00000009", "0?,1:i,1") in new stack -- Goto (demo-menu,i,1) -- Executing [i@demo-menu:1] Hangup("SIP/phatel-00000009", "") in new stack == Spawn extension (demo-menu, i, 1) exited non-zero on 'SIP/phatel-00000009' -- Executing [h@demo-menu:1] Hangup("SIP/phatel-00000009", "") in new stack == Spawn extension (demo-menu, h, 1) exited non-zero on 'SIP/phatel-00000009'

What is the audio-codec of the connection to the trunk?
What happens if You try another trunk?

my trunk supports all codecs and I tried all codecs one by one. (g729, ulaw, alaw, gsm, g723, speex, ilbc)
and I tried all dtmfmode opinions one by one (auto,dtmf,inband).

I didnt try with another trunk but I can dial dtmfs when I call a bank for example.
Also I can dial dtmf via my context when I call 1000 extension with my softphone which registered to 1001 extension.

What about the DTMF settings of your phone? Does it match the DTMF settings for the SIP friend in the sip.conf?