An0nC0d3r
An0nC0d3r

Reputation: 1303

Asterisk: recording the end time of a ConfBridge recording

When recording a conference with ConfBridge, the files are being created successfully and I am able to listen to them etc. The filename is currently being saved in the following format...

confbridge-1234-1448640948.wav.

Given this format, I am able to extract which conference this recording belongs to (1234), as well as the start time of the recording from the timestamp (1448640948).

This format is the default used when setting record_conference=yes in confbridge.conf. Now, I know I am able to use the Set() method instead to do things like specify a different format or save location etc, such as...

SET(CONFBRIDGE(bridge,record_conference)=yes)
SET(CONFBRIDGE(bridge,record_file)=/var/spool/asterisk/confbridge/${WHATEVER}.wav) 

But I don't know a) how to get hold of the time that the conference ended and b) how to add that end time to the file name or at what point?

At what point is the file actually saved? I know I can listen for ConfbridgeEnd for example, and create a new timestamp, but I don't know how I would then amend the file name format with the end timestamp?

Any ideas?

Upvotes: 0

Views: 1123

Answers (1)

arheops
arheops

Reputation: 15259

You can't change filename to value not availible yet.

End of conference is not availible at conference start.

So only method is rename conference recording file.

Simplest variant: save conference start time and calculate file lenght, after that add it to start time.

You can use AMI events or just watch file change date by script.

Upvotes: 1

Related Questions