res_pjsip_session.c: Fix crashes seen when call cancelled.