Different music onhold classes for different parts of a call

HI, I am hoping someone can help with this, I am fairly new to the system and have set up a callflow into our premises where our mainline calls are queued and then answered, during the time the calls are quueued we play moh, if the agent puts the caller on hold and they came from this queue then they get the queue moh and not the default moh which is what we need to do, is anyone able to help me with this please?