[resolved] GET DATA not playing

GET DATA seems to be completely skipping over, not playing the prompt and not absorbing digits.
Running 13.8
rdxtra*CLI> core show version
Asterisk certified/13.8-cert4 built by root @ rdxtra on a x86_64 running Linux on 2017-02-11 05:22:50 UTC

#!/usr/bin/php -q

<?php set_time_limit(30); require('phpagi.php'); error_reporting(E_ALL); $agi = new AGI(); $a = $agi->get_data("there-is-no-customer-support",3000,4); $aa = $a['result']; $bb = $a['data']; $agi->say_digits(111,""); $agi->verbose($aa,1); $agi->verbose($bb,1); exit; ?>

Returning:
– Launched AGI Script /var/lib/asterisk/agi-bin/rec_psw_entry.php
<PJSIP/voipms-00000006>AGI Tx >> agi_request: rec_psw_entry.php
<PJSIP/voipms-00000006>AGI Tx >> agi_channel: PJSIP/voipms-00000006
<PJSIP/voipms-00000006>AGI Tx >> agi_language: en
<PJSIP/voipms-00000006>AGI Tx >> agi_type: PJSIP
<PJSIP/voipms-00000006>AGI Tx >> agi_uniqueid: 1486953533.12
<PJSIP/voipms-00000006>AGI Tx >> agi_version: certified/13.8-cert4
<PJSIP/voipms-00000006>AGI Tx >> agi_callerid:
<PJSIP/voipms-00000006>AGI Tx >> agi_calleridname:
<PJSIP/voipms-00000006>AGI Tx >> agi_callingpres: 0
<PJSIP/voipms-00000006>AGI Tx >> agi_callingani2: 0
<PJSIP/voipms-00000006>AGI Tx >> agi_callington: 0
<PJSIP/voipms-00000006>AGI Tx >> agi_callingtns: 0
<PJSIP/voipms-00000006>AGI Tx >> agi_dnid: unknown
<PJSIP/voipms-00000006>AGI Tx >> agi_rdnis: unknown
<PJSIP/voipms-00000006>AGI Tx >> agi_context: mycontext
<PJSIP/voipms-00000006>AGI Tx >> agi_extension:
<PJSIP/voipms-00000006>AGI Tx >> agi_priority: 6
<PJSIP/voipms-00000006>AGI Tx >> agi_enhanced: 0.0
<PJSIP/voipms-00000006>AGI Tx >> agi_accountcode:
<PJSIP/voipms-00000006>AGI Tx >> agi_threadid: 140021040187136
<PJSIP/voipms-00000006>AGI Tx >>
<PJSIP/voipms-00000006>AGI Rx <<
<PJSIP/voipms-00000006>AGI Tx >> 510 Invalid or unknown command
<PJSIP/voipms-00000006>AGI Rx <<
<PJSIP/voipms-00000006>AGI Tx >> 510 Invalid or unknown command
<PJSIP/voipms-00000006>AGI Rx << GET DATA there-is-no-customer-support 3000 4
– <PJSIP/voipms-00000006> Playing ‘there-is-no-customer-support.gsm’ (language ‘en’)
<PJSIP/voipms-00000006>AGI Rx << SAY DIGITS 111 “”
– <PJSIP/voipms-00000006> Playing ‘digits/1.gsm’ (language ‘en’)
– <PJSIP/voipms-00000006> Playing ‘digits/1.gsm’ (language ‘en’)
– <PJSIP/voipms-00000006> Playing ‘digits/1.gsm’ (language ‘en’)
<PJSIP/voipms-00000006>AGI Tx >> 200 result=0
<PJSIP/voipms-00000006>AGI Rx << VERBOSE “” 1
rec_psw_entry.php:
<PJSIP/voipms-00000006>AGI Tx >> 200 result=1
<PJSIP/voipms-00000006>AGI Rx << VERBOSE “Invalid or unknown command” 1
rec_psw_entry.php: Invalid or unknown command
<PJSIP/voipms-00000006>AGI Tx >> 200 result=1
– <PJSIP/voipms-00000006>AGI Script rec_psw_entry.php completed, returning 0

Interestingly enough, the returns from the GET DATA was a “result” of blank and “data” of “Invalid or unknown command”

Any help on this would be appreciated. I have not touched asterisk in years… and I am trying to get something working here. Thanks.

=m

I just dont see after the GET DATA the result value with the DTMF input, you should have something like this for example

AGI Tx <SIP/101-0000003e>AGI Tx >> 200 result=333

where 333 is the digits entered by the caller,

This piece of code is working and tested on my system, replace the paths according to your system

#!/usr/bin/php -q

<?php error_reporting(E_ALL); set_time_limit(30); require_once('/root/phpagi-svn/phpagi.php'); $agi = new AGI(); $agi->answer(); $result = $agi->get_data('welcome',8000 ,3); $agi->say_digits(111,""); $keys = $result['result']; $agi->verbose(" Testing $keys",1); exit(); ?>

Have you taken PHP out of the equation and confirmed media is being sent and received from Asterisk? What does “rtp set debug on” show?

I have tried this using both the phpagi library function as well as a function that I used to use many years ago (the last time I tried using AGI) that involved writing the actual command (GET DATA there-is-no-customer-support 3000 4) and either way worked. I am able to use say_digits().

I turned on rtp set debug on and the output in the vicinity of the of the sequence where it was supposed to call the GET DATA function was:
<PJSIP/voipms-0000000a>AGI Tx >>
Got RTP packet from 208.43.xxx.xxx:xxxxx (type 00, seq 044694, ts 774453184, len 000160)
Got RTP packet from 208.43.xxx.xxx:xxxxx (type 00, seq 044695, ts 774453344, len 000160)
Got RTP packet from 208.43.xxx.xxx:xxxxx (type 00, seq 044696, ts 774453504, len 000160)
<PJSIP/voipms-0000000a>AGI Rx <<
<PJSIP/voipms-0000000a>AGI Tx >> 510 Invalid or unknown command
<PJSIP/voipms-0000000a>AGI Rx <<
<PJSIP/voipms-0000000a>AGI Tx >> 510 Invalid or unknown command
<PJSIP/voipms-0000000a>AGI Rx << GET DATA there-is-no-customer-support 3000 4
Sent RTP packet to 208.43.xxx.xxx:xxxxx (type 00, seq 036984, ts 031520, len 000160)
– <PJSIP/voipms-0000000a> Playing ‘there-is-no-customer-support.gsm’ (language ‘en’)
<PJSIP/voipms-0000000a>AGI Rx << SAY DIGITS 111 ""
Sent RTP packet to 208.43.xxx.xxx:xxxxx (type 00, seq 036985, ts 031680, len 000160)
– <PJSIP/voipms-0000000a> Playing ‘digits/1.gsm’ (language ‘en’)
Got RTP packet from 208.43.xxx.xxx:xxxxx (type 00, seq 044697, ts 774453664, len 000160)
Sent RTP packet to 208.43.xxx.xxx:xxxxx (type 00, seq 036986, ts 031840, len 000160)
(IP addresses redacted)

There is code afterwards to “SAY DIGITS 111” which is still playing fine.

thanks in advance…

=m

Also, if I try to use “WAIT FOR DIGIT”…
$b = $agi->wait_for_digit(2000);

I am getting this:
[Feb 13 12:47:16] WARNING[27240][C-00000000]: channel.c:3490 ast_waitfordigit_full: The FD we were waiting for has something waiting. Waitfordigit returning numeric 1

I have tried searching and was not able to find anything clear about this message…

AGI does not seem to like accepting DTMF on this…

Just a follow up. It appears the root cause were blank lines in the php after the ?> that was apparently sending AGI into a tizzy.

RESOLVED.