Some pseudo variables do not seem to be available in the failure route, while others are.
I have a log line like this in the failure route:
x_log("L_INFO", "Call failed with $rs $rr ($ci)\n");
which always produces:
Call failed with <null> <null> (some_callid)
--
Dan