The legal status of Ayahuasca in generalDMT has been made illegal in almost every country. The common botanical sources for it, however, are still legal pretty much everywhere. You can even freely purchase DMT containing plants from specialized ethnobotanical shops on the internet. β-carbolines on the other hand, are generally legal, including most of its ethnobotanically common plant sources (such as syrian rue and the vine ayahuasca). In Canada harmaline is a Schedule lll drug (Note: Canadian schedules are very different than U.S. schedules), and in France all plants used for making ayahuasca are illegal.
There have been several raids and courtcases in the history of ayahuasca. Ayahuasca plants and bottles containing ayahuasca have been confiscated from ayahuasca church members repeatedly by various authorities. The UDV has recently had a courtcase in the USA and the conclusion of the judge was that there are no problems with the UDV using ayahuasca as a religious sacrament. The Dutch Santo Daime church has been involved in a courtcase between 1999 and 2001 with a similar outcome. What it comes down to is that Santo Daime, UDV and Barquinha churches drinking ayahuasca frequently are condoned in most places.
The legal status of DMTDMT was first synthesized in 1931 by British chemist Richard Manske and named "nigerine". In 1955 it was first discovered in a plant, Anadenanthera peregrina (yopo). In 1971 DMT becomes illegal in the U.S. with the passage of the 1971 Convention on Psychotropic Substances. From Wikipedia:
"This Convention is a UN treaty designed to control psychoactive drugs such as amphetamines, barbiturates, and psychedelics. During the 1960s, drug use increased greatly around the world, especially in Western nations. Inspired by psychedelic advocates such as Aldous Huxley and Timothy Leary, millions of people experimented with powerful hallucinogens, and drugs of all kinds became freely available.
Government authorities saw this as immoral and destructive to economic progress. The Single Convention on Narcotic Drugs of 1961 could not ban the many newly discovered psychotropics, since its scope was limited to drugs with cannabis, coca, and opium like effects. On February 21, 1971, a conference in Vienna signed a new Convention worded to include almost any conceivable mind-altering substance.
The Convention, which contains import and export restrictions and other rules aimed at limiting drug use to scientific and medical purposes, came into force on August 16, 1976. Today, 175 nations are Parties to the treaty. Many laws have been passed to implement the Convention, including the U.S. Psychotropic Substances Act, the UK Misuse of Drugs Act 1971, and the Canadian Controlled Drugs and Substances Act. Like the treaty itself, these statutes usually divide drugs into several classes or Schedules."
Nowadays DMT is classified in the United States as a Schedule I drug and in Canada as a Schedule III drug. In France it is classified as a stupéfiant, along with all the plant sources for DMT. In the United Kingdom it's a Class A drug.