converting mu-law to PCM should not result in a change of sample rate or channel count. It simply should go from 8 bits per sample to 16 bits.
I'm afraid I don't know about removing audio from RTP packets, but you must definitely not simply write the whole thing into your WAV file since it will contain additional data which is probably the cause of your clicking noise.
I'm afraid I don't know about removing audio from RTP packets, but you must definitely not simply write the whole thing into your WAV file since it will contain additional data which is probably the cause of your clicking noise.