OnixS::FIX::Session class exposes OnixS::FIX::Session::resetLocalSequenceNumbers member to reset both incoming and outgoing local message sequence numbers to 1 and back up the previous log files.
Agree the reset with the counterparty first; this method does not reset the counterparty's state. Follow Agreed sequence reset: start a new sequence for the procedure. To continue an existing session after a restart, use Normal restart: continue the same session instead.