Below are the different strategies against the Caliph.
For his slave raids, several groups of archers or horse archers are needed to protect outlying buildings.
A good number of crossbowmen on walls will easily deal with the troops that the Caliph sends on his main attacks, even his horse archers, which tend to rather foolishly remain stationary (unlike those of Saladin) and his Arabian swordsmen (which die easily to crossbow bolts). Hostile fire ballistae and catapults may be tougher to destroy, and a group of horse archers are useful (once his own horse archers are dead) to sally out from your castle and destroy the catapults. Move them from side to side in range of the enemy siege equipment to avoid getting hit by the fire ballistae.
The best attack strategy would be to use trebuchets placed just close enough to his walls to smash them down, and tunnelers undermining his walls from below. A small wave of macemen should then rush ahead of the main attacking force (which should consist primarily of swordsmen and pikemen, and miscellaneous siege equipment) to ignite the pitch. After the walls have fallen, the heavily armored swordsmen and pikemen should be able to storm his keep without much difficulty.