def charge_per_call(
        seconds, minimum, per_minute, charge_interval, connection=0):
    """Returns the charge for a call.

    Args:
        seconds: length of call
        minimum (seconds): calls are effectively at least this long
        per_minute: charge for a call of one minute
        charge_interval (seconds): call length rounded up to a multiple of this
        connection: charge for connecting call
    """
    per_interval = charge_interval * per_minute / 60.0
    q, r = divmod(max(seconds, minimum), charge_interval)
    if r > 0:
        q += 1
    return q * per_interval + connection