A man with a history of assaulting emergency workers has been locked up for six months for attempting to bite and headbutt police.