More than 200,000 people seek addiction treatment on the phone or online every month. Few of them realize that their pleas for help are a valuable commodity — one that is quietly fought over by those angling to turn a distress signal into cash.

Addicts represent big money to treatment centers, which are happy to pay a middleman $50 for a “lead” on a patient who might generate $40,000 or more in insurance claims in a matter of months. That is why television ads offering help to addicts air constantly nationwide.

But lead generators, or lead gens, aren’t necessarily the ideal path to rehab clinics — as Dr. Alan Goodwin, an inquisitive psychologist in Palm Beach, Fla., accidentally discovered earlier this year. That discovery led him on a monthslong personal mission to try to understand the ethically murky business of customer acquisition in the treatment world.

It started when Dr. Goodwin, who works as an education and health care consultant, phoned a local substance abuse awareness coalition with a question about the format of a presentation he was to make. Instead of the organization, he got a recording saying the number had been disconnected — but before he could hang up, the message continued.

In This Series

“We can help you find an alternative addiction specialist,” the recording said, according to Dr. Goodwin. “Please stay on the line while we look.”

The medical group’s phone number, he quickly realized, had been hijacked by a drug-treatment referral service.

A man who identified himself as Jacob came on the line, and started asking Dr. Goodwin the kind of questions you ask an addict in crisis. Dr. Goodwin instantly invented a new persona: a 67-year-old with early onset Alzheimer’s, an unhinged wife named Betty and a drug-addled son who had just introduced him to heroin.

“I can get into it,” Dr. Goodwin said later, recalling his imagined identity. “My father was a retailer, but he somehow was involved with Second City, the improv comedy troupe in Chicago. So it might be genetic.”

With his call, Dr. Goodwin had chanced across the underbelly of the treatment industry, where new customers are corralled, often with a hard sell. By the time his conversation with Jacob was over, he had developed a new vocation — dialing up and lecturing the sketchy rehab referral services that have become telemarketers to the addicted.

He spent months struggling to map this realm, inventing a small cast of characters to help him find answers and meticulously documenting his encounters. All the while, he tried to determine who was behind the most ubiquitous TV ad on the air, one featuring a figure he called “the man in blue.”

Speedy Service, One Call Away

This was a project he assigned to himself. Now 76, Dr. Goodwin had spent decades in the addiction treatment field and had become the kind of trusted voice now occasionally called by clinics for advice. Because of that, he already knew that some clinics used underhanded tactics, which outraged him.

“I went into activist mode,” he said. “What I saw was pure opportunism.”

Lead generators, those who connect the people seeking a service to the people selling it, operate in a variety of businesses — carpet cleaners, locksmiths, personal injury lawyers and, as America confronts a persistent opioid crisis, drug treatment centers. Dr. Goodwin became a student of the business, starting with Jacob, the man he found himself speaking to during that first call.

Jacob connected him to Palm Partners in Delray Beach, Fla., which describes itself on its website as “one of the country’s most trusted alcohol and drug rehabilitation centers.” A representative at Palm Partners asked a few questions before urging him to spend the weekend detoxing in a sober home, followed by weeks of therapy.

When the rep offered to send a car — that very afternoon — to pick him up at home, it was time to end the ruse. “I’m not an addict,” Dr. Goodwin said he told the representative. “I’m Dr. Alan Goodwin, and I have some concerns about what just happened.”

Dr. Goodwin thought his critique would at least get an audience, and perhaps even prompt some changes. It was the first of many disappointments.

‘A Huge Opportunity’

Lead gens in addiction treatment can run afoul of so-called patient brokering laws, which prohibit commissions and kickbacks for referring patients to a provider. Florida, for example, this year made it a felony to profit from patient referrals. But the gamesmanship continues.

“We have to constantly monitor the web for fake versions of our clients’ websites,” said Daniel Gemp of Dreamscape Marketing, a Maryland firm that works with addiction clinics. “Fake social media reviews. Fake Facebook profiles. We have worked with 28 different industries and we have never had to play more defense than we do in addiction treatment.”

Some lead-gen operators in this field are hard to find, let alone get on the phone. But the chief executive of a major player, TreatmentCalls.com of West Palm Beach, Fla., contended that he performs a valuable service. Jason Brian, who founded TreatmentCalls.com in 2014, said that he will not work with clinics that lie about themselves, including where they are located and what services they offer. So, he said, people who reach clinics through his call system are more likely to enroll with quality providers.

And after Florida criminalized paid health care referrals, Mr. Brian said he took the word “referral” out of his ads to stay on the right side of the law. Further, he now says that his company isn’t, strictly speaking, in the referral business, because every caller in his system is automatically routed to a rehab clinic without any input from TreatmentCalls.com. His company, in his judgment, is merely connecting — not referring.

Critics counter that deception is built in to this and other business models. Callers are unlikely to be told that they are getting medical recommendations that have been shaped by financial incentives.

Ben Cort, a consultant to rehab clinics, has conducted his own first-person experiments with addiction treatment lead gens. He said he has been placed on hold for a few minutes and then put up for a kind of instant auction after his personal information — age, insurance, drug of choice — were collected.

“People are making decisions in real-time because their loved ones are in immediate peril,” Mr. Cort said. “One more overdose and that’s the end. So nobody is researching rehab the way people research college, and that creates a huge opportunity for lead gens and clinics to take advantage.”

An ‘Aging Activist’ Finds a Cause

Dr. Goodwin has treated hundreds of addicts in a career that has spanned three decades. He grew up in a suburb of Chicago and earned his Ph.D. in psychology from the University of Alabama. He was a freshman there when he volunteered at a state psychiatric hospital — and found his life’s work.

Starting in 1977, he served as the executive director of the Indian Rivers Mental Health Center, in Tuscaloosa, which eventually named a building in his honor. In the 1990s, he helped a private hospital, The Manors, in Tarpon Springs, Fla., create an addiction treatment program.

He later became an entrepreneur and now runs a company that designs what he calls group e-learning for colleges and other entities. He also cocreated a board game, “Drugs/Alcohol: Play it Straight,” the most public example of his knack for mixing the fun with the serious.

Today, looking professorial and perpetually tousled, he calls himself an “aging activist.” Inspired by Robert F. Kennedy, he has championed various causes over the years, large and small. Recently he organized a successful donation drive to ship flashlight batteries to Puerto Rico, after hurricanes Irma and Maria, an effort that was covered in his local newspaper.

Though no longer employed in the treatment field, Dr. Goodwin is still regarded by physicians and clinic owners as a resource. In April of last year, an investor in a clinic in West Palm Beach got in touch with him, he said, asking for patient referrals. Dr. Goodwin said he wanted to check out the place first. After a few days, he concluded that clients there were being grossly overcharged.

“They wanted to own fancy cars,” he said of the owners, “not to help anyone.”

Mr. Goodwin took his findings to the state’s attorney general. He said he was amazed that prosecutions for insurance fraud didn’t follow.

“My dad loves a challenge,” said his son, Joey Goodwin. “And when he found out what was happening in rehab, this was a challenge right in his neighborhood. Literally, because so many clinics are near his home in Florida.”

The acting part of his phone calls came naturally, Dr. Goodwin said, because of the years he had spent role-playing in group therapy settings. “Plus, I’ve worked for years with all the people I was pretending to be,” he said. “I’ve worked with the elderly heroin addict. I’ve worked with the kid smoking pot. I know them all.”

After his first call, he started typing up his conversations, in part to keep track of a handful of different personas he’d created, each with their own name and biography.

They included a churchgoing, 18-year-old Duke University freshman who had recently tried pot. (“I kept my voice really low,” Dr. Goodwin said, explaining how he tried to sound young.) There was also a multimillionaire claiming to be calling on behalf of an autistic son who was dabbling in drugs.

He wanted to understand who was behind the pitches. Clinics? Phone banks? Who ran them, and how did they parcel out leads?

But Dr. Goodwin said he had a second purpose in mind: to persuade clinics he reached to change their ways, if he found their procedures lacking. Which he often did.

For instance, most people he spoke to lacked medical training, so in follow-up calls he would urge clinics to staff up with professionals. And nearly everyone pushed the priciest treatment, Dr. Goodwin said — even if he was playing a character who barely used drugs at all.

But every time he offered advice, he said, he was rebuffed, starting with that very first call to Palm Partners.

“The person on the phone just blasted me,” he said, describing the conversation after he revealed his true identity. “He said something about helping thousands of people and how I was wasting their time.”

Dr. Goodwin said he asked for a manager to call him back — not to get the phone rep in trouble, but to get the company “to really look at their practices.”

“He hung up on me,” Dr. Goodwin said. “I later left a message. No one ever called me back.”

Messages left with Palm Partners by The New York Times were not returned.

Gaming the System, With Just a Few Clicks

The story of lead generation in addiction treatment begins, strangely enough, with a nonprofit supported by the Church of Scientology. Narconon started in 1966, according to the Church’s site, and uses the teachings of the Church’s founder, L. Ron Hubbard, as its guiding principles. Conventional mental health practices are eschewed, high doses of vitamins are encouraged and clients are urged to sweat a lot, often in saunas.

Back in 2000, most clinics got their clients from physicians and insurers. Narconon clinics instead turned to the World Wide Web, according to the former Scientologist and Narconon critic Katherine McBride, who oversees narcononreviews.net under the pseudonym Mary McConnell.

Soon, she said, the internet was home to countless sites promoting Narconon clinics. Over the years, Narconon’s success produced imitators who packed sites with keywords in hopes of kicking their services to the top of search results.

Google continuously tinkers with its algorithm to make it harder to game. Until the company imposed restrictions in mid September, bidding for phrases like “rehab near me” fetched high cost-per-click rates in its paid ad system. But Google still has not found a way to end the phone number hijacking scam that Dr. Goodwin encountered time and again.

It is a hustle carried out with a bit of internet chicanery.

When anyone searches the name of a business online, the results include a box that turns up to the right, containing an address, phone number and other information. Google generates these boxes in-house, using its own algorithms. It’s a product called Google My Business, and it is Google’s answer to the Yellow Pages.

Typically, one of the links in the box is labeled “suggest an edit.” It allows users to change details of the listing. Google’s goal is to offer a simple way for people to correct addresses and phone numbers. But relying on users across the world has a flaw: Bad actors can use the function to insert their own phone numbers, in effect redirecting calls from the intended company to another.

Google has safeguards to reduce foul play. For example, a business can take control of its own Google My Business listing — making shenanigans tougher to pull off — via a system where Google snail-mails the business a postcard with a verification code. But the safeguards aren’t perfect — the workarounds are complicated but motivated competitors can still divert calls.

A Google spokeswoman declined to say whether a fix for this problem was in the works, other than noting that the company is always looking for ways to improve its system.

“We use manual and automated systems to detect for spam and fraud,” the spokeswoman, Liz Davidoff, wrote. “But we tend not to share details behind our processes so as not to tip off spammers or others with bad intent.”

At one point, Dr. Goodwin discovered that someone skilled in these dark arts had hijacked the number for the Florida Alcohol and Drug Abuse Association, a nonprofit that represents a variety of treatment-related entities. Instead of reaching the association, a guy named Jacob — a different Jacob than the first one, it seemed — answered.

This time Dr. Goodwin pretended to be “Alan Richard,” a wealthy man whose wife thought he was smoking “a little too much weed.”

Jacob advised against the rehab centers in Florida, suggesting that they were little more than resorts for kids on drugs. Better to head to Michigan, where a company called Behavioral Rehabilitation Services operated a clinic.

Next, that company’s intake coordinator came on the line. After a brief patient assessment — What drugs are you taking? What kind of insurance do you have? — the coordinator offered two options: a $32,900 shared room, or a semiprivate room for $40,000 at a facility in Harrison, Mich.

“I have no idea what the difference is,” Dr. Goodwin said. “I didn’t ask. I just went for the most expensive choice.”

After that, a third person came on the line and told him that he would receive a free one-way plane ticket to Detroit, on Delta Air Lines. (“You will be responsible for your transportation home,” she added, according to Dr. Goodwin’s notes.) In a follow-up call, Mr. Richard was informed that everyone detoxing from marijuana was entitled to on-demand massages.

Still pretending to be Alan Richard, Dr. Goodwin later called back to say that his personal physician was concerned about the lack of medical information that had been requested during the intake process. Could his doctor speak to the medical director?

He had to ask a few times before getting connected to a nurse. Then, Dr. Goodwin unmasked himself.

“She sounded a little panicked,” he said. “She said she’d have some administrator call me, but no one ever did.”

The executive director of Behavioral Rehabilitation Services, JJ Bush, told The New York Times in a brief interview that he knew nothing about the company’s marketing efforts but would have someone in that department get in touch. No one did. A follow-up phone call was not returned.

Even after months of calls, Dr. Goodwin’s picture of the business remained fuzzy. When he asked phone reps who they worked for, they either refused to say or, Dr. Goodwin suspected, they lied.

The Mysterious ‘Man in Blue’

But of all the mysteries Dr. Goodwin encountered, none was as confounding as a television ad featuring the person he called “the man in blue.” In it, a bearded man wearing blue scrubs speaks directly into the camera, accompanied by tinkling piano music.

“If you’ve been trying to quit your addiction to drugs or alcohol without any luck,” the man in blue says, “then you need to call the number on your screen now.”

The ad promoted “The Addiction Network.” But each time Dr. Goodwin dialed the number he saw on the screen, a representative at a different clinic answered. None of the clinics seemed affiliated with any other. And none seemed interested in discussing it.

“I got pushback whenever I tried to find out anything about the ad,” he said. “Everyone was pretty evasive.”

If the man in blue is a puzzle, Mr. Brian of TreatmentCalls.com can solve it.

On a sunny afternoon, Mr. Brian, the company’s founder and owner, sat in his office and explained how his business works.

In a typical day, his company and its affiliates air hundreds of TV ads across the country, along with many online ads, he said. Combined, those ads generate roughly 2,000 calls a day. The mid-September changes made by Google, he said recently, have had no effect on the company.

Through the magic of modern telephony, incoming calls are automatically routed to a rotating list of treatment centers, which prepay to receive a set number of calls per month. It costs treatment centers between $40 and $50 each time their phones ring, whether the person signs up for treatment or not.

The man-in-blue ad has aired so often because it generates lots of calls, Mr. Brian said. (It has also inspired a batch of YouTube parodies.) And the man in blue himself? “He’s friend of mine’s son,” Mr. Brian said. “He’s an actual doctor.”

TreatmentCalls.com’s ads are generic on purpose. The man-in-blue ad, for instance, long promised little more than a “free referral.” But even that was been toned down lately. Concerned about Florida’s new patient-brokering law, Mr. Brian snipped the word “referral” out of his ads. Recently, he said by email that he simply sells “calls.”

The company’s model is good for consumers, Mr. Brian said. His employees monitor calls, he said, and the company will not renew its deals with clinics that mislead people.

“Our clients aren’t lying about the quality of care or their qualifications,” he said. “People who call a center directly could get a snake oil salesman.”

Treating Patients, as ‘Commodities’

The TreatmentCalls.com model has its critics. One of them is Mr. Cort, the consultant. He noted that people in Mr. Brian’s system may have no idea that their call has been sold to a clinic. Further, because the clinic is randomly selected, it may be the wrong one for the client.

“Callers who are patients are not simple commodities,” Mr. Cort said. “When no thought is given to appropriate referrals based on a patient’s specific needs it demonstrates either a lack of understanding or a callousness.”

As Dr. Goodwin made more calls over the months, he wondered if he could say anything that would cause a clinic to advise against immediate enrollment. Sometimes this meant presenting himself as the most casual of drug users. Other times, he added berserk details to his story.

That reached an extreme when he told a clinic in New Jersey that, in a drug-fueled depression, he had just slit his wrists. To his amazement, the phone rep did not suggest that he head straight to a hospital. Instead, Dr. Goodwin said, he was counseled to immediately board a plane and fly to the clinic.

Someone else, however, “did the right thing,” Dr. Goodwin said. When the owners of the clinic’s affiliated detox center heard about his call, they phoned the authorities. Soon, three police cars pulled up to Dr. Goodwin’s house.

“The officers were furious when I explained what I was doing,” he recalled, sounding chastened. “At that point, my wife said, ‘You don’t need to be doing this any more.’”