0

i have this code in mi file extension_custom.conf:

[ivr-prueba]
exten => _2000,1,Answer
exten => _2000,n,Set(val=500)
exten => _2000,n,NOOP("El valor de la variable es ${val}" )
exten => _2000,n,AGI(prueba13.php, ${val})
exten => _2000,n,Agi(googletts.agi,”${CPFMESSAGE}”,es)
exten => _2000,n,Hangup

[ivr-test]
exten => 2022,1,Verbose(Probando Google TTS);
same => n,Answer();
same => n,Agi(prueba13.php,${CPF});
same => n,GotoIf($[ “${CPFSTATUS}” = “1” ]?ok:err);
same => n,Hangup();
same => n(ok),Agi(googletts.agi,”Olá, ${CPFMESSAGE}, escolha uma das opções a seguir.”,pt-BR);
same => n,Hangup();
same => n(err),Agi(googletts.agi,”${CPFMESSAGE}”,pt-BR);
same => n,Goto(ini);

Here i try to set the CPFMESSAGE variable and then i want to play a voice that says the variable content

this is the code in prueba13.php where I set CPFMESSAGE:

$agi->set_variable("CPFSTATUS",1);
$agi->set_variable("CPFMESSAGE",$respuestaDecodificada[0]->Error);

I have already verify the variable content and it has the message i want to play

I have tried using the both extension but they doesnt work, what do i am doing wrong?

Agustin Coronel
  • 297
  • 4
  • 12

0 Answers0