I’m trying to initiate a call by dropping a file in the spool folder like this:
$callfile = fopen(“…/temp/$filename.call”, “w”) or die("Error generating c$
fwrite($callfile, “Channel: Local/s@api-caller-process/n\n”);
fwrite($callfile, “CallerID: API Call <1010>\n”);
fwrite($callfile, “Context: api-callee-process\n”);
fwrite($callfile, “Extension: s\n”);
fwrite($callfile, “Priority: 1\n”);
fwrite($callfile, “SetVar: json=” . $postdata . “\n”);
I’m passing in a json string which contains config info that is used by my dialplan.
pbx_spool.c - Skipping extremely long line at line 6 of /var/spool/asterisk/outgoing/380699346.call
My json string is 2810 chars. Is it possible to adjust that limit?
Asterisk is open source, but you are likely to find that you have to raise limits in several places.
So, it is a case of editing pbx_spool.c, compiling it to pbx_spool.so and then dropping that file in the modules directory?
Or does the whole asterisk installation have to be recompiled?
It’s like that you will hit limits on the lengths of variables and possibly dialplan command line lengths. I’m suggesting that you will need to do significant tracing of the source code to find all the limits.
Thanks. The cause (of this first issue at least) seems to be this line
#define LINE_BUFFER_SIZE 1024
If I edit that can I just compile the single file pbx_spool or do I need to do the full make process?
It doesn’t take that long to do the full process, but if you already have the result of the original full build process, make, itself, will only rebuild what is affected by the change.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.