Spotting/discharge or mucus plug

Yesterday at my 37 week appointment I was checked for dilation. Only at 1/2 a centimeter dilated and cervix is softening. About 4 hours later the cramps started and I had brown slimy discharge. Is this from spotting or my mucus plug? Still had the cramps through the night.