The open-source AI receptionist for businesses. Answers every call, books the appointment and hands over to a person when needed. You own the code and the data.
TypeScript ai-receptionistanswering-serviceappointment-bookinglivekitlocal-firstmcpopen-sourceself-hostedsiptelephonytypescriptvoice-agentvoice-ai
// One-time setup for the phone-to-phone call test (re-run it to repair or rotate the password):
// a Telnyx credential connection for outbound calls with the test caller's number, and the LiveKit
// SIP outbound trunk that uses it. Only objects named "linedesk-test-caller" are created or changed (at Telnyx with the
// install's LINEDESK_CARRIER_SUFFIX, e.g. "linedesk-test-caller-staging": SIP user names are unique across all Telnyx
// accounts, so two installs never share one; the LiveKit trunk keeps the plain name).
// Usage: pnpm --filter @linedesk/agent setup-test-caller (needs TELNYX_API_KEY, CALL_TEST_FROM, LiveKit env)
import { createTelnyxOutbound, installCarrierName, telnyxSpendLimits } from '@linedesk/telephony'
import { requireEnv, runScript } from './env.ts'
import { replaceOutboundTrunk, sipClient } from './sip-trunks.ts'
async function main() {
const env = requireEnv(['TELNYX_API_KEY', 'CALL_TEST_FROM'])
const name = installCarrierName('linedesk-test-caller')
const outbound = await createTelnyxOutbound({
apiKey: env.TELNYX_API_KEY,
name,
spendLimits: telnyxSpendLimits(process.env),
}).ensureOutboundSip(env.CALL_TEST_FROM)
const trunkId = await replaceOutboundTrunk(sipClient(), [env.CALL_TEST_FROM], outbound)
console.log(
`Telnyx: credential connection "${name}" with ${env.CALL_TEST_FROM} as caller ID (SIP user ${outbound.username}, new password set)`,
)
console.log(`LiveKit: outbound trunk ${trunkId} through ${outbound.address}`)
}
runScript(main)