Got Bitten By The 255 Char Variable Limit – How Best To Work Around It?
I loop through a list in Asterisk which is generated by a Python AGI
and I’ve just been bitten by a variable limit I didn’t realise existed before.
The only way I can think of working around this is to get Python to write the list to file, then do a FILE_COUNT_LINE to get the number of items (needed first) and then iterate through them by doing FILE to read one line at a time.
Would rather stay away from polluting ASTDB, and don’t want to install MySQL as I don’t need it for anything else.
Ideally, though, is there a workaround for the variable limit? Thanks!
One thought on - Got Bitten By The 255 Char Variable Limit – How Best To Work Around It?
I was curious about this and started looking through the code to remember how this all worked. I don’t see anything specifically that would truncate setting a channel variable internally, but perhaps it’s a limitation due to how AGI is processed or buffers used for parsing/interpreting there. There are a number of fixed sized buffers used in the AGI parsing code. I’m curious, what version of Asterisk are you using?
I’m not aware of any workarounds other than those you mentioned. If you wanted to get really into it, you could poke around in res/res_agi.c and see if you can figure out which buffer is limiting. YMMV there though.