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:email@example.com:54321;transport=WS;x-ast-orig-host=10.20.30.50:0& (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.