BasicProxy makes sure that a CANCEL properly chases the request to the same S-CSCF by using pjsip_endpt_create_cancel and specifying the message sent to the S-CSCF (see BasicProxy::UACTsx::cancel_pending_tsx).  I-CSCF won't do an LIR for a CANCEL request.