Hi Mario:
If you're dealing with a whole class that's become disinterested or unfocused, it might be hard to pull a student aside and speak with them.
Telling a story about a situation or work related occurence seems like it always brings the students back to attention. Circulating around the room works, too.
You can consider to begion asking students questions also, and they then begin to expect, since they may be called upon, to pay more attention. Sometimes, changing the whole direction with a diiferent activity is needed too.
Regards, Barry