how get silence state

I want to sync the volume state from silence button to volume control widget to change the volume icon or number, how get silence state? Are there some relevant variables?