i will be gracefull if someone could help me to solve this problem.
I need to do this sequence:
- -> answer to a SIP trunk
- <- send dtmf digits to the trunk
- -> immediately receive a dtmf string from the trunk
well, i call an AGI script from the inbound route, i can answer but via AGI i’m not able to send a dtmf tone, i try this:
$agi->exec("SendDTMF","5"); it no works return an error
$agi->exec("Dial",$channel."|5|cD(w5)"); no works
the only way to send a dtmf digit was through Manager API and then receive the DTMF with AGI Read
$myvar = $agi->get_variable(myvar);
the problem is that i need to receive very soon the answer from the trunk and in this way i have a latence time of few seconds before asterisk is able to receive digits.
I’m also tryng to simulate in dialplan the procedure but it doesnt work
exten => 8199,1,Ringing()
exten => 8199,n,wait(1)
exten => 8199,n,Answer()
exten => 8199,n,SendDTMF(5) // doesnt send the tone
exten => 8199,n,Read(myvar,1,2) // wait the timeout much more than 2 seconds??why?
exten => 8199,n,Hangup
someone can help me?? i’m going crazy!!! thanks