Fix missing HEP/SIP trace records for retransmissions for in-dialog OPTIONS - #4227
Open
digipigeon wants to merge 1 commit into
Open
Fix missing HEP/SIP trace records for retransmissions for in-dialog OPTIONS#4227digipigeon wants to merge 1 commit into
digipigeon wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix missing HEP/SIP trace records for retransmissions of locally generated stateful requests, including in-dialog OPTIONS pings generated by the
dialogmodule.Details
This is a bug fix for the
tracermodule.Locally generated requests sent through TM are stateful and, when using an unreliable transport such as UDP, are retransmitted according to the normal TM timers. However, only the initial transmission may appear in SIP captures exported by
tracer, while the retransmitted packets are absent.TM invokes the
TMCB_MSG_SENT_OUTcallback for each retransmission. For a locally generated transaction, however, there may be no UAS request available, so bothps->reqandps->rplareNULL. The actual outgoing SIP buffer and destination remain available throughps->extra1andps->extra2.The existing tracer callback only processes the event when
ps->reqorps->rplis set. It therefore silently ignores these outgoing packets even though they were successfully transmitted.This was observed with in-dialog OPTIONS pings generated by the
dialogmodule. Packet-level captures confirmed the UDP retransmissions were sent, while HEP captures contained only the initial OPTIONS request.The same callback representation may also be used for other locally generated buffered requests, such as ACK and CANCEL messages.
Solution
When
TMCB_MSG_SENT_OUTprovides neither a request nor a reply, the tracer now checks whether the transaction is locally generated and whether an outgoing buffer was supplied.For these events, it:
sip_msg.Because the actual outgoing buffer is parsed, OPTIONS, ACK, and CANCEL messages retain their correct SIP methods and contents in the resulting trace.
Parsing is performed only when tracing callbacks are installed and TM has not already supplied a parsed request. There is therefore no additional processing for untraced transactions or for the usual callback path where
ps->reqis available.Compatibility
The change does not modify SIP transmission, transaction handling, retransmission timers, or dialog behavior. It only makes previously omitted outgoing packets visible to configured tracer destinations, including HEP collectors.
No configuration changes or migration steps are required.
Existing captures may contain additional records for locally generated retransmissions, ACKs, or CANCELs that were previously omitted. This is the intended behavior and makes tracer output correspond more closely to the packets transmitted on the network.
Closing issues
No associated issue.