South African President Cyril Ramaphosa called on Monday for African countries to work together to manage migration, as his government faces mounting pressure over attacks on foreign nationals.