As far as I know, the character will move to the node nearest to the point where you clicked.
So create a path with many nodes near the wall. (but keep in mind that too many nodes slow down the engine because of the vast amount of posibilities in way-finding)