Hello Daniel
i made some more tests and i could see that it's after executing msg_apply_changes function that the xflag is lost. The original message transaction flags remain activated after msg_apply_changes.
i did an execution on debug but i saw no information more than
2(5231) INFO: Talos-Test Call 500000 / Call-ID
1-25549@1.1.18.171: We activate TEST_XFLAG!!!!!!!!!!!!!!!!!!!!!!
2(5231) INFO: Talos-Test Call 500000 / Call-ID
1-25549@1.1.18.171: TEST_XFLAG TRUE!!!!
2(5231) DEBUG: <core> [core/msg_translator.c:3262]: sip_msg_update_buffer(): SIP message content updated - reparsing
2(5231) DEBUG: <core> [core/parser/msg_parser.c:610]: parse_msg(): SIP Request:
2(5231) DEBUG: <core> [core/parser/msg_parser.c:612]: parse_msg(): method: <INVITE>
2(5231) DEBUG: <core> [core/parser/msg_parser.c:614]: parse_msg(): uri: <
sip:7777777@2.2.2.26:5060>
2(5231) DEBUG: <core> [core/parser/msg_parser.c:616]: parse_msg(): version: <SIP/2.0>
2(5231) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 235, <rport> = <n/a>; state=6
2(5231) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 232, <branch> = <z9hG4bK-5aaf0472f30d11e68aeff8bc1239f520>; state=6
2(5231) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 253, <sig> = <74e198e2>; state=16
2(5231) DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5
2(5231) DEBUG: <core> [core/parser/msg_parser.c:498]: parse_headers(): Via found, flags=2
2(5231) DEBUG: <core> [core/parser/msg_parser.c:500]: parse_headers(): this is the first via
2(5231) DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=10
2(5231) DEBUG: <core> [core/parser/msg_parser.c:171]: get_hdr_field(): <To> [83]; uri=[
sip:+9934355692006294@1.1.14.173;transport=udp;user=phone]
2(5231) DEBUG: <core> [core/parser/msg_parser.c:174]: get_hdr_field(): to body ["+0034355692006294"<
sip:+9934355692006294@1.1.14.173;transport=udp;user=phone>
], to tag []
2(5231) INFO: Talos-Test Call 500000 / Call-ID
1-25549@1.1.18.171: TEST_XFLAG after msg_apply_changes FALSE!!!!
best regards
david