Ultracold scattering of alkali-metal atoms in magnetic fields