We do have a strange behavior while using UACreg module and rtpengine.
So far we used uacreg to register to an external pbx and we are using rtpenginde since we do not know if there is NAT on the far side. With an kamailio 4.4.2 there are no problems doing this. Now we tried to update to 4.4.3 and 5 (latest) we do see an issue with this two modules.
Problem we have is on an basic call while DA chellange. By using DA catching from uac module and an updated SDP from rptengine the uac module seems to crash and the DA chellange (unauth) gets forwarded to the calling side instead of answered by the uac Module.
it seems the DA chellange is causeing the problem but only if the original invite was modified by RTP engine.
in the logs i can see this happening:
``` f94ea564de0806c4a811bce674@xx.xx.120.5:5060 Status: <null> <null> F:user T:123 R:123] Remote asked for authentication Oct 11 16:02:11 gaudino /usr/sbin/kamailio[8342]: ERROR: <core> [msg_translator.c:417]: clen_builder(): no message body found (missing crlf?) Oct 11 16:02:11 gaudino /usr/sbin/kamailio[8342]: ERROR: <core> [msg_translator.c:1963]: build_req_buf_from_sip_req(): Error while adjusting Content-Length Oct 11 16:02:11 gaudino /usr/sbin/kamailio[8342]: ERROR: tm [t_fwd.c:462]: prepare_new_uac(): could not build request Oct 11 16:02:11 gaudino /usr/sbin/kamailio[8342]: ERROR: tm [t_fwd.c:1723]: t_forward_nonack(): ERROR: t_forward_nonack: failure to add branches Oct 11 16:02:11 gaudino /usr/sbin/kamailio[8342]: ERROR: tm [tm.c:1415]: _w_t_relay_to(): ERROR: w_t_relay_to: t_relay_to failed
``` When i disable the rtpengine the problem does not occur as well as the kamailio 4.4.2 did not have this issue.
I can provide config, traces and debug logs (via mail) please tell me where to send.
Seems to be the same like #789 -- I couldn't reproduce it, but I used without rtpproxy/rtpengine, so this is a good hint. Maybe you can send me the logs with debug=3, not sure if I can get the time it to test myself tomorrow.
Log are on the way via Email. I can reproduce this issue in our DEV environment so please ask if we should do some further testing.
Would it be possible to test with master branch? It has more debug messages in the c code that should help tracking this issue.
Log is on the way via email again.
Can you fetch the latest master branch and try again, then send the logs? I added more logs in the get_body() function to see why it fails to see the end of headers, because the logs you sent show a valid sip message.
Made new logs with latest Version. Logs are on the way by email.
New logs helped and hopefully the issue was fixed with the commit referenced above. Try again with master and let's see if works ok now.
The Fix is working! thanks a lot.
Closed #819.
Thanks for reporting back, and all the assistance to troubleshoot it. I will backport to 4.4 very soon.
Thanks @miconda, I have been following this one as I use RTPEngine and am looking at trying UAC in 4.4 for one of my LCR trunks.