<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rtsp_url(self, channelno=None, typeno=None):
 """ Return RTSP streaming url Params: channelno: integer, the video channel index which starts from 1, default 1 if not specified. typeno: the stream type, default 0 if not specified. It can be the following value: 0-Main Stream 1-Extra Stream 1 (Sub Stream) 2-Extra Stream 2 (Sub Stream) """

        if channelno is None:
            channelno = 1

        if typeno is None:
            typeno = 0

        cmd = 'cam/realmonitor?channel={0}&subtype={1}'.format(
            channelno, typeno)

        try:
            port = ':' + [x.split('=')[1] for x in self.rtsp_config.split()
                          if x.startswith('table.RTSP.Port=')][0]
        except IndexError:
            port = ''
        return 'rtsp://{}:{}@{}{}/{}'.format(
            self._user, self._password, self._host, port, cmd)