Don't know about detect, but you could set a transaction-persistent flag or AVP when processing the reinvite request. This will also be testable in the onreply_route.
-- Alex
-- Principal, Evariste Systems LLC (www.evaristesys.com)
Sent from my Google Nexus.