Maximum numbers of characters in AGI Command

I am facing the problem the AGI command exceeded its maximum characters and unable to execute the AGI command.

For instance, call 30 devices at the same time using chan_pjsip over the Websocket. Then the PJSIP dial contact will become PJSIP/u00001234/sip:abcd1234@;transport=WS;x-ast-orig-host= (90 letters). As the result, final command to execute will become EXEC DIAL "PJSIP/u00001234...<trimmed>...,60,<options>)". This is more than 2700 charactors.

I found that the root cause of the issue is maximum charactors are limited in res_agi.c as AGI_BUF_LEN 2048. Also we found that the “x-ast-orig-host” parameter was added in recent change, that increased the characters of contact.

I think it is better to change AGI_BUF_LEN 2048 to AGI_BUF_LEN 32768 (x16 charactors or more ). If there are no problem with other resources or channel drivers, should we increase this parameter? I would love to hear your thoughts.

No reason why that buffer has to be fixed-length … unless a long command will cause some buffer overflow somewhere else?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.