answer the call of nature
obey the call of nature
To go to the bathroom to relieve oneself by urinating or defecating.
Ted was hiking in the mountains when suddenly he had to answer the call of nature but since there was no bathroom in the woods, he excused himself and disappeared behind the bushes.