I am building a telephony agent using twilio + livekit agents, and I need to keep track of the call status in a database, as well as upload transcripts to an S3 bucket.
e.g. when the call starts and agent picks up, I want to add a database record with "call_status = in_progress". Then once the call is done, move the call to "completed" and upload the transcript JSON to an S3 bucket.
What is the best practice to place these asynchronous operations in the livekit agent? what are the alternative ways to manage state with livekit?