The sulphur of the sulphonyl group is pretty electrophilic due to the two oxygens and one chlorine atom attached to it. So the nitrogen oxygen from the amide attacks on this sulphur atom, displacing the chlorine atom on it. The $\ce{Cl-}$ ion takes a proton from the amide with it and forms $\ce{HCl}$. The nitrogen then pushes its lone pair towards the former carbonyl carbon, causing the benzenesulphonyl group along with the former carbonyl carbon to take off, leaving a triple bond between the nitrogen and the carbon. The benzenesulphonate anion then picks up the proton left on the nitrogen, giving the products $\ce{R-C#N}$ and $\ce{Ph-SO3H}$.
Generally $\ce{P4O10}$ is a very strong dehydrating agent, so must be used where dehydration is difficult, or more dehydration than done by normal dehydrating agents is required. $\ce{H2SO4}$ is a good dehydrating agent, but probably isn't good enough for this particular reaction. It is difficult to predict which dehydrating agent must be used for any arbitrary reactant (atleast to my knowledge).
$\ce{CaCl2}$ or silica gel are physical dehydrating agents (more accurately drying agents) and cannot be used for chemical dehydration reaction like the above reaction.
Edit: My original mechanism was shown to be wrong by @jerepierre and @orthocresol, and hence i have corrected it above.