You can definitely get a ticket for your exhaust being too loud. It's pretty much up to the cop and what he thinks is "too loud"
Ive never heard anything about getting a ticket just because the exhaust is not stock. Then again, you live in Cali and their rules are lame as fuck. I live in FL where dont have Smog and all that other bullshit.