What is the ffmpeg command to convert 3gp to ulaw?

The simplest example is:

$ ffmpeg -i input -codec:a pcm_mulaw output.wav

Refer to ffmpeg -encoders to see a list of available encoders.