The patient is sedated or anaesthetized. Then a flexible camera (endoscope) is inserted through the mouth, down the esophagus, into the stomach, through the pylorus into the duodenum where the ampulla of Vater (the opening of the common bile duct and pancreatic duct) exists. The sphincter of Oddi is a muscular valve that controls the opening of the ampulla. The region can be directly visualized with the endoscopic camera while various procedures are performed. A plastic catheter or cannula is inserted through the ampulla, and radiocontrast is injected into the bile ducts and/or pancreatic duct.