27150.2. (b) A certificate of compliance for a vehicular exhaust system shall be issued pursuant to subdivision (a) if the vehicle complies with Sections 27150 and 27151. Exhaust systems installed on motor vehicles, other than motorcycles, with a manufacturer's gross vehicle weight rating of less than 6,000 pounds comply with Sections 27150 and 27151 if they emit no more than 95 dbA when tested in accordance with Society of Automotive Engineers Standard J1169 May 1998.
SAE Standard J1169 on how to test your exhaust noise level:
Decibel meter is held 0.5 meters (20 inches) from the exhaust tip, and the test is done at 1/2 the engine's maximum rated RPM (redline).
Any exhaust modifications after the catalytic converter are legal as long as the exhaust noise is below 95dB. If you got a ticket for modified exhaust, have this test done by someone with a dB meter (try local car stereo shops), have the person doing the test write out the results of the test, along with the date, time, and location of the test, then sign the paper. Bring this when you appear in court. The charge will likely be dropped.