'Set parameters of this Via header. All arguments correspond to
attributes of the same name.
To maintain compatibility with old SIP
code, the \'rport\' argument is used to determine the values of
C{rportRequested} and C{rportValue}. If None, C{rportRequested} is set
to True. (The deprecated method for doing this is to pass True.) If an
integer, C{rportValue} is set to the given value.
Any arguments not explicitly named here are collected into the
C{otherParams} dict.'

def __init__(self, host, port=PORT, transport='UDP', ttl=None, hidden=False, received=None, rport=_absent, branch=None, maddr=None, **kw):

    self.transport = transport
    self.host = host
    self.port = port
    self.ttl = ttl
    self.hidden = hidden
    self.received = received
    if (rport is True):
        warnings.warn('rport=True    is    deprecated    since    Twisted    9.0.', DeprecationWarning, stacklevel=2)
        self.rportValue = None
        self.rportRequested = True
    elif (rport is None):
        self.rportValue = None
        self.rportRequested = True
    elif (rport is _absent):
        self.rportValue = None
        self.rportRequested = False
    else:
        self.rportValue = rport
        self.rportRequested = False
    self.branch = branch
    self.maddr = maddr
    self.otherParams = kw
