# IVoiceSessionStore

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.ivoicesessionstore/
> Summary: IVoiceSessionStore: Stores the summary record of real-time voice connections.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

Stores the summary record of real-time voice connections.

```csharp
public interface IVoiceSessionStore
```

## Remarks

The store is **for observability** and does not break
functionality: a write error does not interrupt the conversation, it is only logged.

The contract lives in `Tracon.Abstractions` because the HTTP
layer sees these types while serving the voice endpoints.

## Methods

### <a id="Tracon_IVoiceSessionStore_QueryAsync_System_String_Tracon_VoiceSessionQuery_System_Threading_CancellationToken_"></a> QueryAsync\(string, VoiceSessionQuery, CancellationToken\)

Lists a tenant's voice session records, newest first.

```csharp
ValueTask<IReadOnlyList<VoiceSessionRecord>> QueryAsync(string tenantId, VoiceSessionQuery query, CancellationToken cancellationToken = default)
```

#### Parameters

`tenantId` [string](https://learn.microsoft.com/dotnet/api/system.string)

The tenant.

`query` [VoiceSessionQuery](/api/tracon.voicesessionquery/)

The filter.

`cancellationToken` [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken)

The cancellation token.

#### Returns

 [ValueTask](https://learn.microsoft.com/dotnet/api/system.threading.tasks.valuetask\-1)<[IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[VoiceSessionRecord](/api/tracon.voicesessionrecord/)\>\>

The records.

### <a id="Tracon_IVoiceSessionStore_SaveAsync_Tracon_VoiceSessionRecord_System_Threading_CancellationToken_"></a> SaveAsync\(VoiceSessionRecord, CancellationToken\)

Adds or updates a voice session record.

```csharp
ValueTask SaveAsync(VoiceSessionRecord record, CancellationToken cancellationToken = default)
```

#### Parameters

`record` [VoiceSessionRecord](/api/tracon.voicesessionrecord/)

The record.

`cancellationToken` [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken)

The cancellation token.

#### Returns

 [ValueTask](https://learn.microsoft.com/dotnet/api/system.threading.tasks.valuetask)

The completion task.
