The DWP has a useful leaflet on this very matter
http://www.dwp.gov.uk/docs/dwp1023.pdf
With regard to JSA there are two aspects to voluntary work a Labour Market aspect and payability. What Chris said about beaing available for employment is the Labour Market aspect but if someone CHOOSES not to be paid or is doing work that would normally be paid for, a Payment Decision Maker may decide that notional earnings should be applied as if they were being received. Folk can do unpaid work for a relative but for benefit purposes THIS IS NOT VOLUNTARY.
Best thing is, have a read of the leaflet and if there's any doubt ask the DWP or at the Jobcentre.
With regard to benefit advice in general, sites with a ".gov" in them are official Government sites and they will give correct information and advice as oposed to unoffical ones which sometimes give misleading advice.