code: protected void updateMSIdinCallDetailRecord(final String msId, final Sid callSid){
          if(callSid == null){
              if(logger.isDebugEnabled())
                  logger.debug("Call Id is not specisfied, it can be an outbound call.");
          }else{
              CallDetailRecordsDao dao = storage.getCallDetailRecordsDao();
              CallDetailRecord cdr = dao.getCallDetailRecord(callSid);
              if(cdr != null){
                  cdr = cdr.setMsId(msId);
                  dao.updateCallDetailRecord(cdr);
              }else{
                  logger.error("provided call id did not found");
              }
          }
  
      }
docs: @param msId
  @param callSid