Hi Colin,
In BigBlueButton, the term 'ended' has a meeting related to its internal state.
When users are in a meeting, the meeting is active and getMeetingInfo will return the list of users. As long as there is at least one user in the meeting, the meeting is active.
What happens when the meeting ends? It depends on how it's 'ended, and not all cases leave the meeting in memory for query by getMeetingInfo..
Case #1: The last person has left the meeting.
After the last person leaves the meeting, the meeting still in memory. A subsequent query to the getMeetingInfo will return data as long as the meeting remains in memory. For example,
<response>
<returncode>SUCCESS</returncode>
<meetingName>Test</meetingName>
<meetingID>1234567890</meetingID>
<createTime>1345086099329</createTime>
<voiceBridge>22304</voiceBridge>
<attendeePW>ap</attendeePW>
<moderatorPW>mp</moderatorPW>
<running>false</running>
<recording>false</recording>
<hasBeenForciblyEnded>false</hasBeenForciblyEnded>
<startTime>1345086103689</startTime>
<endTime>1345086123406</endTime>
<participantCount>0</participantCount>
<maxUsers>20</maxUsers>
<moderatorCount>0</moderatorCount>
<attendees/>
<metadata/>
<messageKey/>
<message/>
</response>
You can see that BigBlueButton marked the meeting as ended (by endTime) at 1345086123406 (unix epoch time). How long does the meeting remain in memory? That is determined by this parameter in bigbluebutton.properties
Which is defined as default
# The number of minutes before the system removes the meeting from memory.
defaultMeetingExpireDuration=1
On the BigBlueButton server, a background process runs every 30 seconds to look for meetings with an endTime. Once the startTime - endTime > defaultMeetingExpireDuration*60, the background process will remove the meeting from memory. Once removed from memory, getMeetingInfo will return the empty.
<response>
<returncode>FAILED</returncode>
<messageKey>notFound</messageKey>
<message>We could not find a meeting with that meeting ID</message>
</response>
To answer your question: why is there an endTime?
The general idea is that a meeting lingers in memory for a few minutes (depending on the setting for defaultMeetingExpireDuration) to enable 3rd party applications to query the endTime and determine how long the meeting had lasted.
However, there is a problem with this approach: a subsequent call to create a meeting with the same meetingID will fail if any of the parameters in the 'create' call differ from the original 'create' call that created the meeting in the first place.
In other words, the 'create' API call is idempotent: you can call it repeatedly without side effects, but the parameters must match exactly.
This logic simplifies the implementation of a create & join scenario. A 3rd party application does not need to query the BigBlueButton server to see if a meeting exists -- it can just call 'create' and then immediately return a join URL for a user. The first 'create' call will actually create the meeting. Any subsequent 'create' calls will also return success, but have no side effects -- the meeting is already created, no need to create it again.
While this simplifies the implementation of the create & join scenario, a problem occurs when a 3rd party integration needs to restart the meeting with new parameters. There was this pesky minute (or so) that the meeting lingered in memory. Any call to 'create' with different parameters would fail.
This lead us to introduce the 'end' API call in BigBlueButton 0.71.
Case #2: The 'end' API was called on a meeting.
Calling 'end' immediately causes BigBlueButton to end the meeting and remove it from memory. There is no background process involved -- the meeting is immediately finished.
This means a subsequent call to getMeetingInfo returns notFound. It also means that a subsequent call to create a meeting with the same meetingID can proceed (the meeting does not exist in memory anymore).
Case #3: The meeting has reached its duration
This has the same effect as calling 'end'.
Regards,... Fred
--
BigBlueButton Developer
BigBlueButton on twitter: @bigbluebutton