freeswitch
freeswitch copied to clipboard
if the reason text field received is too long, the field is no longer correct.
if the reason text field received is too long, the field is no longer correct. Too long Reason header swallowed #1481 A leg not being closed down when B ends call #1293
I think this needs to be fixed in libsofia, nea_server.c reason_buf is 64, and not in mod_sofia.
i Brian,
I think this needs to be fixed in libsofia, nea_server.c reason_buf is 64, and not in mod_sofia.
I'm not sure that fixes the problem. I can test your nea_server.c patch if you let me know.
the need here is to be compatible with all freeswitches. if the header is too long, the next freeswitch will have the same problem...
i Brian,
Or else I can do the test myself. what do you recommend? replace 64 with 128? or 256? I see that some SBC sometimes can exceed 128 in the text cause.
Brian,
sorry for my not very good english. I tried with 256 in nea_server.c reason_buf but that didn't fix the problem.
we are exactly in line 501 of mod_sofia.c the complete sip header: "reason" is copied into a memory of 128. (char reason[128] = "";)
if this header is truncated, it is no longer correct when the ending quote is missing.
if we enlarge the (char reason[256] = "";) it works, but the next freeswitch that receives the call will have the same problem.
that's why I made this "pull request"
of course, you know freeswitch thousands of times better than me, that's why I'm explaining to you what I saw and understood, but maybe I'm wrong...
thank you very much for your opinion
Unit-tests failed: https://public-artifacts.signalwire.cloud/drone/signalwire/freeswitch/777/artifacts.html