MANILA — When Rolando Cuartero III spoke to American credit card customers for his job at a call center, he found it stressful — especially when callers insulted his nationality.

“You’re Filipino, I don’t want to talk to you,” some customers would say. “You know what, transfer me to somebody who speaks English,” others demanded. Sometimes the pressure was so great that he blew off steam by putting the phone on mute and shouting at the skies.

“You can’t really hang up on them,” Cuartero said.

The Philippines, where English is one of the national languages, is the largest destination for jobs at U.S. call centers. Last year, the market for outsourced customer service and other business services generated $22.9 billion in revenue and 1.15 million jobs in the Philippines, according to a report by the Oxford Business Group. Such work will soon become “the single largest contributor” to the country’s economy, the report projected.

BEIJING, CHINA – 28 JUNE 2017. Mengqiu Wang, known also as MQ, CEO of Zero Zero, which is selling a drone camera at Apple Stores, talks to one of the employees at the company headquarter in Beijing. Some startups find the American dream in China Market roles range from cleaning and transporting fish to book-keeping and accounting. Tsukiji Fish Market, Tokyo, Japan, 5-15-2017 How sushi gets from Japan to San Francisco

Technology, from the plummeting cost of routing calls overseas to the efficient distribution of tasks by computer, has made this possible. If a slight accent doesn’t give a worker like Cuartero away, a customer can’t tell where the person answering the phone is sitting.

Yet automation also looms as a long-term threat to the outsourcing industry, boosting the productivity of U.S. workers and allowing robots to handle many tasks.

And the rise in the number of call center jobs has come at a cost. Manila has become even more congested as workers travel long distances to get into work. Graveyard shifts, set for peak calling hours in the United States, take a toll on family life.

Far from shifting jobs permanently away from the U.S. to places like the Philippines, advances in hardware, software and networking continue to roil the system by which work gets distributed around the globe.

One example: Workers such as Cuartero are using the same technology that enabled them to serve customers across the sea to now work from home and get jobs on the fly rather than working for one employer.

Cuartero quit his job handling calls for the credit card business and now gets assignments through San Francisco’s Upwork, which has built a network of freelancers around the world. Upwork said it has 2 million registered freelancers in the Philippines, including customer service representatives such as Cuartero, who now answers calls from his dining room table.

A college dropout, Cuartero worked as a grocery bagger until he joined a call center. He says he typically earns about $814 a month — almost double what the average household earned in 2015, according to the Philippine Statistics Authority.

“I love talking to people,” said Cuartero, who grew up speaking English. “I had the mind-set when I was in high school that having a sensible conversation with people will give you information that will help you grow.”

The movement of call center jobs to the Philippines began roughly four years ago, according to Chris Tang, a professor at UCLA’s Anderson School of Management. India competed for the jobs, but over time it became more expensive to employ Indian call center workers because of high turnover rates and the cost to train new workers.

In the U.S., call center workers may earn $20 to $30 an hour. In the Philippines, Tang said, they earn around $2 an hour. The Philippines was once a U.S. territory, so its citizens are familiar with U.S. geography and trends, making it easier to talk to American customers.

“The Philippines is much more Americanized,” Tang said. “They understand the slang and culture.”

But Jasher Sutton, a former director of online booking site Hotels.com, said calls handled by representatives in the U.S. received higher customer satisfaction scores than those done by workers in the Philippines.

“You are paying a premium for that,” Sutton said of U.S. workers. Hotels.com was “willing to trade a little overseas” because it was cheaper than the U.S., he added.

Hotels.com, a subsidary of Expedia Inc. in Bellevue, Wash., said it works with suppliers in the Philippines but declined to comment further.

Union officials and some members of Congress have pointed to overseas call centers as part of the reason that U.S. workers are losing their jobs.

Gloria Mendoza, a customer service representative for AT&T in Cerritos (Los Angeles County), said she’s concerned about workers in the Philippines who earn a fraction of her $18.57 hourly wage.

“It affects our job security,” Mendoza said.

Paul Butalid, a country manager in the Philippines for Atos, a company that provides IT help and other services to global businesses, said none of his U.S. corporate clients has asked him to transfer services outsourced to the Philippines back home because of President Trump’s emphasis on creating American jobs.

“If I can get the same kind of service from someone I am paying $1,000 a week to, versus someone I am paying $100 a week to, doesn’t it make sense (to go with) somebody I pay $100 a week to?” Butalid said.

Companies that use call center workers in the Philippines said the savings in wages gives them more flexibility to adjust staffing levels based on clients’ needs.

“Just in terms of cost and getting a lot of people fast, it was the best option at the time,” said Kaytlin Louton, a business operations manager at Redwood City repair company iCracked Inc. The company uses outsourcing firm TaskUs of Santa Monica to employ eight people in the Philippines who provide support for iCracked technicians.

She’s looking for the best person to handle the job, taking into account wages, their abilities, accent and other factors.

“I’m going to look not just in U.S., but also look globally for the best person,” Louton said.

Besides handling calls, workers in the Philippines provide other types of services, including helping companies abroad with marketing, flagging offensive posts online and serving as a virtual concierge. San Francisco’s Magic, for example, provides an on-demand personal assistant service, and has staff in the Philippines.

Many Filipinos work night shifts to sync with U.S. working hours. Typically, call center employees are given set times for breaks and must stow their smartphones in lockers before starting work. The salary of an entry-level worker can range from $582 to $679 a month and may be significantly higher than other jobs, like a public school teacher or a fast-food worker, according to Felipe Medalla, a monetary board member of the country’s central bank.

Bars open early for workers like 24-year-old Reggie Marie Sugalan, who gets a buzz from a bucket of San Miguel beers and a mouthful of beef sisig after coming off her 11 p.m.-to-8 a.m. call center shift.

“This is our dinner,” Sugalan said. “We sleep during the day and work at night. My body clock is already used to it.”

While the number of call center jobs in the Philippines is expected to rise, economists said it will be hard to maintain rapid growth as the market matures and automation grows. Also, there could be more competition from countries such as Cambodia, Laos and Vietnam, said Aekapol Chongvilaivan, a country economist for the Philippines at Asian Development Bank.

Turnover rates at call centers are high, according to Medalla.

“It’s hard for people to be awake at night and sleeping during (the) daytime,” he said. “Some of them eventually say, ‘I want to do something else.’”

For Cuartero, Upwork enables him to work from home — allowing him to stay close to his son, who has a developmental disorder. He sets his own wages, and if companies choose to hire him through Upwork, the San Francisco firm takes 5 percent for long-term jobs. He has done jobs for a range of companies, including Palo Alto gardening service Ezhome.

Sabina Alistar, Ezhome’s director of global operations, says the company uses a combination of people and technology to meet customers’ needs.

“As our technology can support more of the basic customer service needs, we empower our staff to learn new skills that enable them to handle more complex situations, or shift into higher responsibility roles,” Alistar said in an email.

Bryce Maddock, CEO of TaskUs, said he expects that automation will have a big impact on the industry. But he plans to retrain his workers for other tasks. For example, if responses to customer emails become automated, employees could be trained to analyze data about trends in customer requests, he said.

Cuartero, 36, says he’s not worried about his job being taken over by a machine in the next three decades because he thinks it can’t replicate empathy or satisfy customers the way a human can. One night in May, Cuartero sat barefoot at his dining room table around 1 a.m, wearing a pink T-shirt and red shorts and defusing a situation in which a San Ramon customer was upset that a gardener did not come at the time requested.