A small helpdesk system: an office Pixel running a patched GrapheneOS Dialer answers technician calls, records both call legs as separate channels, and a Ruby backend transcribes them through Whisper and files an AI summary against the caller. Squashed to a single commit for sharing. No credentials are included; secrets live outside the repo in /etc/helpdesk/env on the server or a gitignored .claude/env.local locally. See .claude/env.local.example for the shape. Start at README.md, then docs/architecture.md.
29 lines
1.3 KiB
Ruby
29 lines
1.3 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
# Seed a Service with sample operators, people, DIDs, and campaigns.
|
|
# Used by the server and the test suite. Pure data — no I/O.
|
|
require_relative "lib/helpdesk/domain"
|
|
|
|
module Helpdesk
|
|
module Seed
|
|
module_function
|
|
|
|
def call(svc = Service.new)
|
|
# DIDs we own -> operator/campaign context (the dialed number says who gets the screen-pop)
|
|
c_tm = svc.add_campaign(name: "T-Mobile jamt", operator: "tmobile")
|
|
c_vf = svc.add_campaign(name: "Vodafone jamt", operator: "vodafone")
|
|
svc.add_did(e164: "+420800111222", operator: "tmobile", campaign_id: c_tm)
|
|
svc.add_did(e164: "+420800333444", operator: "vodafone", campaign_id: c_vf)
|
|
|
|
svc.add_person(name: "Jan Novák", operator: "tmobile", position: "Terénní technik",
|
|
numbers: ["+420601234567", "601 234 567"],
|
|
context: "Terénní technik, region Beroun. Řeší hlavně elektroměry a jejich konektivitu. " \
|
|
"Preferuje mobilní yamt a ping přes název sady místo IP. Potvrzení posílat SMS.")
|
|
svc.add_person(name: "Petr Svoboda", operator: "vodafone", position: "Servisní technik",
|
|
numbers: ["+420602345678"])
|
|
svc
|
|
end
|
|
end
|
|
end
|
|
|
|
Helpdesk::Seed.call(Helpdesk::Service.new) if $PROGRAM_NAME == __FILE__
|