S operator test IMS long session call and found that about 1 hour ATS will send "491 Request Pending", and later sends a BYE message terminal the session.
From the message trace (see attachment), the reINVITE from called heartbeat messages(310 lines), o = MxSIP 0 2 IN IP4 10.161.202.228, compared with the previous version number plus 1, so the ATS treat as a media re-negotiation and transfer this reINVITE to the caller for media re-negotiation, but this time received from the ATS calling UAC side a UADATE heartbeat refresh message (317 lines), so the media re-negotiation not completed when received another UPDATE message, media collide, it replies to the caller 491 (319 lines). Then, 5 minutes later the called terminal does not receive the response and release the session .(350 lines).
For such cases, solution is required the terminal side to solve reINVITE heartbeat message does not meet the protocol.
Since the site opens the Session timer function, ATS as a B2BUA, conduct Session timer negotiation and send heartbeat messages. while the test terminal support timer and ATS open the heart timer switch, based on the RFC3264 ,about the defination of heartbeat reINVITE SDP:
When issuing an offer that modifies the session, the "o =" line of the new SDP MUST be identical to that in the previous SDP, except that the version in the origin field MUST increment by one from the previous SDP.
According to this requirement, only when the reINVITE message from the original and called terminal, the two SDP o line version is the same, the o-line information is exactly the same, ATS will treate that as a heartbeat message and end this reINVITE, otherwise ATS will treat it as a re-negotiation media message and pass it to the other network node.