  We describe a timing technique that allows to obtain precise orbital
parameters of an accreting millisecond pulsar in those cases in which intrinsic
variations of the phase delays (caused e.g. by proper variation of the spin
frequency) with characteristic timescale longer than the orbital period do not
allow to fit the orbital parameters over a long observation (tens of days). We
show under which conditions this method can be applied and show the results
obtained applying this method to the 2003 outburst observed by RXTE of the
accreting millisecond pulsar XTE J1807-294 which shows in its phase delays a
non-negligible erratic behavior. We refined the orbital parameters of XTE
J1807-294 using all the 90 days in which the pulsation is strongly detected and
the method applicable. In this way we obtain the orbital parameters of the
source with a precision more than one order of magnitude better than the
previous available orbital solution, a precision obtained to date, on accreting
millisecond pulsars, only for XTE J1807-294 analyzing several outbursts
spanning over seven years and with a much better statistics.
