[asterisk-users] Source code for AGI GET DATA command

Rhys Hanrahan rhys at nexusone.com.au
Thu Apr 20 06:26:25 CDT 2023


Thanks! I was so close... I don't know how I didn't find it as I was looking right there and hunting for the agi_command table. Was looking for a non-trivial amount of time. Frustrating!

Also for anyone who stumbles onto this with the same underlying issue, after looking at:
main/app.c:enum ast_getdata_result ast_app_getdata(struct ast_channel *c, const char *prompt, char *s, int maxlen, int timeout)

It seems like a timeout of 0ms is basically ignored, but if I set a timeout of 1 as in 1ms that's effectively no timeout, and seems to take effect for the GET DATA agi command.

Thanks,
Rhys.


On 20/4/2023, 9:21 pm, "asterisk at phreaknet.org <mailto:asterisk at phreaknet.org>" <asterisk at phreaknet.org <mailto:asterisk at phreaknet.org>> wrote:


On 4/20/2023 7:16 AM, Rhys Hanrahan wrote:
>
> Hi All,
>
> I’m having issues figuring out how to set no DTMF timeout on the AGI 
> GET DATA command as “0” still has a multi-second timeout if no input 
> is given. I am trying to find the source code of the AGI command to 
> figure it out, but I can’t for the life of me find the underlying 
> source code. The closest I’ve found is XML that defines the command 
> syntax but can’t trace it from there.
>
Here is where it is in the master version: 
https://github.com/asterisk/asterisk/blob/master/res/res_agi.c#L2829 <https://github.com/asterisk/asterisk/blob/master/res/res_agi.c#L2829>
And in version 11: 
https://github.com/asterisk/asterisk/blob/11/res/res_agi.c#L2239 <https://github.com/asterisk/asterisk/blob/11/res/res_agi.c#L2239>





More information about the asterisk-users mailing list