def _getrport(self):
        """
        Returns the rport value expected by the old SIP code.
        """
        if self.rportRequested == True:
            return True
        elif self.rportValue is not None:
            return self.rportValue
        else:
            return None

        Returns the rport value expected by the old SIP code.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/sip.py