1. ASP.NET Core minimal API dialer

using TeleQuick.SDK;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSingleton(new TeleQuickClient(
    "quic://engine.telequick.dev:9090",
    Environment.GetEnvironmentVariable("TELEQUICK_CREDENTIALS")!
));

var app = builder.Build();

app.MapPost("/dial", async (
    [FromBody] DialRequest req,
    TeleQuickClient client) =>
{{
    await client.DialAsync(req.To, req.Trunk);
    return Results.Ok(new {{ status = "dispatched" }});
}});

app.Run();

record DialRequest(string To, string Trunk);

2. Worker service for bulk campaigns

public class CampaignWorker(TeleQuickClient client, ILogger<CampaignWorker> log)
    : BackgroundService
{{
    protected override async Task ExecuteAsync(CancellationToken ct)
    {{
        client.OnCallEvent = raw =>
        {{
            // Decode + persist CDR (use DeserializeCallEvent).
            log.LogInformation("event: {{Bytes}}", raw.Length);
        }};

        await client.OriginateBulkAsync(
            csvUrl: "https://files.example.com/numbers.csv",
            trunkId: "default",
            callsPerSecond: 25,
            campaignId: $"campaign-{{DateOnly.FromDateTime(DateTime.UtcNow):yyyy-MM-dd}}"
        );

        await Task.Delay(Timeout.Infinite, ct);
    }}
}}
Wire it up:
builder.Services.AddSingleton(new TeleQuickClient(/* … */));
builder.Services.AddHostedService<CampaignWorker>();

3. Live transcription with Azure Cognitive Services

using Microsoft.CognitiveServices.Speech;
using Microsoft.CognitiveServices.Speech.Audio;

var client = new TeleQuickClient(/* … */);

var audioConfig = AudioConfig.FromStreamInput(
    AudioInputStream.CreatePushStream(AudioStreamFormat.GetWaveFormatPCM(8000, 16, 1))
);
var recognizer = new SpeechRecognizer(speechConfig, audioConfig);

client.OnAudioFrame = raw =>
{{
    // raw is the AudioFrame envelope — PCM bytes are the payload field.
    // For brevity, treat raw as PCMU; in production decode the envelope.
    audioConfig.AsPushAudioStream().Write(raw);
}};

recognizer.Recognized += (_, e) => Console.WriteLine($"text: {{e.Result.Text}}");
await recognizer.StartContinuousRecognitionAsync();

await client.DialAsync("sip:+15551234567@…", "default");

4. WPF agent dashboard

public partial class MainWindow : Window
{{
    private readonly TeleQuickClient _client;
    public ObservableCollection<string> Calls {{ get; }} = new();

    public MainWindow()
    {{
        InitializeComponent();
        DataContext = this;
        var ctx = SynchronizationContext.Current;

        _client = new TeleQuickClient("quic://engine.telequick.dev:9090", credPath);

        _client.OnCallEvent = raw =>
        {{
            ctx?.Post(_ =>
            {{
                Calls.Add($"event @ {{DateTime.Now:HH:mm:ss}} ({{raw.Length}} B)");
            }}, null);
        }};
    }}

    private async void DialButton_Click(object _, RoutedEventArgs __) =>
        await _client.DialAsync(ToBox.Text, TrunkBox.Text);

    private async void BargeButton_Click(object _, RoutedEventArgs __) =>
        await _client.BargeAsync(SidBox.Text);
}}

5. Inbound routing — auto-handoff to AI

await client.SetInboundRoutingAsync(
    trunkId: "main-did",
    rule: 3,                          // HANDLE_AI
    audioUrl: "",
    webhookUrl: "",
    aiWs: "wss://api.openai.com/v1/realtime?model=gpt-realtime",
    aiQuic: ""
);
After this, every PSTN call landing on main-did is auto-bridged to the configured AI endpoint without further client-side action — the gateway opens its own WebSocket to OpenAI.