Updated

A comedian known for his work on “The Howard Stern Show” says he was patched through to President Trump on Air Force One this week after impersonating a Democratic senator on the telephone.

Comedian John Melendez of "The Stuttering John" podcast posted audio on Thursday of his conversation with the president, where Melendez claimed to be New Jersey Democratic Sen. Bob Menendez. During the call, the two apparently discussed immigration and the Supreme Court for several minutes as Trump flew back from a rally in North Dakota.

“I find it astounding that the news media's not picking up the fact that I totally duped the President & got in touch...in less than 2 hours while he was on Air Force One,” Melendez tweeted Thursday.

A senior White House official declined to comment to Fox News, citing security issues.

Politico reports that the White House is scrambling to figure out how the prank caller got Trump on the line.

During the podcast, Melendez played audio of his call to the White House switchboard, where he claimed he needed to talk to the president immediately about pending legislation.

He reached several White House operators before being told the president would call him back. According to the comedian, senior White House adviser Jared Kushner returned the call, connecting him to Trump.

Menendez

New Jersey Sen. Bob Menendez. A comedian impersonated Menendez in order to reach President Trump by telephone. (Associated Press)

“Hi Bob!” the voice identified as Trump is heard saying as he picks up the phone, apparently from Air Force One.

He referenced last year’s mistrial in the high-profile bribery case against Menendez, indicating he sympathized with the Democratic senator’s case.

“Congratulations on everything,” he said. “We’re proud of you. Congratulations. Great job. You went through a tough, tough situation. And I don’t think a very fair situation, but congratulations.”

Trump ND Rally Screengrab

President Trump during a rally in North Dakota this week. A comedian known for his work on “The Howard Stern Show” says he was patched through to Trump on Air Force this week after impersonating a Democratic senator on the telephone.

Menendez was accused of using his Senate seat to advance the interests of a doctor friend. The Senate Ethics Committee later “severely admonished” Menendez for accepting gifts.

When the impersonator asked about immigration issues, Trump replied: “So Bob, let me just tell you: I want to be able to take care of the situation every bit as much as anybody else, at the top level. I'd like to do the larger solution rather than the smaller solution.”

When the conversation turned to the retirement of Justice Anthony Kennedy, Trump said “we're probably going to make a decision Bob, over the next two weeks” on a replacement.

The conversation ended with Trump saying, “You take care, I will speak to you soon Bob, take care of yourself.”

A spokeswoman for Menendez’s Senate office did not immediately return a request for comment.

Fox News’ Matt Leach contributed to this report.