The AU mission in Somalia will take over from Ethiopian forces, who have come under attack in Mogadishu.