def send_command(self, command, result_callback = None, *callback_parameters):
        cookie = md5(str(random()) + str(time())).hexdigest()
        next_retr = self.delay_flt.lastval * 4.0
        rtime = 3.0
        if isinstance(command, Rtp_proxy_cmd):
            if command.type == 'I':
                rtime = 10.0
            if command.type == 'G':
                rtime = 1.0
            nretr = command.nretr
            command = str(command)
        else:
            if command.startswith('I'):
                rtime = 10.0
            elif command.startswith('G'):
                rtime = 1.0
            nretr = None
        if nretr == None:
            nretr = getnretrans(next_retr, rtime)
        command = '%s %s' % (cookie, command)
        timer = Timeout(self.retransmit, next_retr, 1, cookie)
        stime = MonoTime()
        self.worker.send_to(command, self.address)
        nretr -= 1
        self.pending_requests[cookie] = (next_retr, nretr, timer, command, result_callback, stime, callback_parameters)
dataset/ETHPy150Open sippy/b2bua/sippy/Rtp_proxy_client_udp.py/Rtp_proxy_client_udp.send_command/original