Some 30 people - most of them soldiers - have been jailed in Benin in connection with a failed coup attempt earlier this month, French news agency AFP is reporting.