Queries the duration of the call.

        If the call has not ended then the current duration will
        be returned.

        Returns
        ---------
        datetime.timedelta
            The timedelta object representing the duration.

def duration(self):
        """Queries the duration of the call.

        If the call has not ended then the current duration will
        be returned.

        Returns
        ---------
        datetime.timedelta
            The timedelta object representing the duration.
        """
        if self.ended_timestamp is None:
            return datetime.datetime.utcnow() - self.message.created_at
        else:
            return self.ended_timestamp - self.message.created_at