send_text problem

I have this in a agi script (PHP)


$pulsado = $agi->wait_for_digit();
$agi->text2wav(“You pulse the digit. “);
$agi->send_text(”$pulsado”);

the result is that in terminal put only “Array” not the digit that pulse in the terminal.

The AGI view:

AGI Tx >> agi_request: ht_prueba1.php
AGI Tx >> agi_channel: SIP/2004-09a67268
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1165229100.22
AGI Tx >> agi_callerid: 2004
AGI Tx >> agi_calleridname: pepe
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: 8001
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: from-internal
AGI Tx >> agi_extension: 8001
AGI Tx >> agi_priority: 2
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >>
AGI Rx << ANSWER
AGI Tx >> 200 result=0
AGI Rx << SEND TEXT "Prueba"
AGI Tx >> 200 result=0
AGI Rx << STREAM FILE /tmp/text2wav_b34699068d34bb0d68f228dd7aaccd0d “” 0
AGI Tx >> 200 result=0 endpos=15353
AGI Rx << WAIT FOR DIGIT -1
AGI Tx >> 200 result=57
AGI Rx << STREAM FILE /tmp/text2wav_0415105096ff24bc3c7bc05457cb7ea4 “” 0
AGI Tx >> 200 result=0 endpos=13874
AGI Rx << SEND TEXT "Array"
AGI Tx >> 200 result=0

What is wrong ?