Skip to content

Codecs, DTMF & transfer

Beyond streaming audio, a phone agent often needs to navigate an IVR, key in digits, or hand the caller off. Syrinx exposes these as bus packets that map to each carrier’s control API.

Syrinx transcodes narrowband and wideband telephony codecs to and from your pipeline’s PCM16:

CodecRateCarrier
μ-law (PCMU)8 kHzTwilio, Telnyx, SmartPBX
A-law (PCMA)8 kHzTelnyx
G.72216 kHzTelnyx
L1616 kHzTelnyx

G.722 is the one worth reaching for: it’s wideband, so your STT sees the full speech band instead of the narrowband μ-law cut. Syrinx keeps it at 16 kHz all the way to the transcriber. The codecs are pure and run identically on Node and the Cloudflare Workers edge.

Send touch-tones — to navigate an IVR you called into, for example — with a dtmf.send packet. Digits are 0-9, *, #, plus pause markers w (0.5 s) and W (1 s):

import { Route, dtmfSend } from '@kuralle-syrinx/core';
bus.push(Route.Main, dtmfSend(contextId, Date.now(), '1w234#'));

Syrinx builds the carrier command for you — Twilio’s <Play digits> (or the Calls API sendDigits), or Telnyx Call Control send_dtmf. Inbound DTMF arrives as dtmf.received.

Hand the caller off with a call.transfer packet:

import { Route, callTransfer } from '@kuralle-syrinx/core';
bus.push(Route.Main, callTransfer(
contextId,
Date.now(),
'warm',
'+15551234567',
'Caller wants a refund on order 4821; verified identity.',
));
ModeBehavior
warmAnnounce the caller (with the optional summary, generated from the conversation) before connecting
coldConnect immediately
sip_referSIP REFER

Syrinx prefers a carrier Call Control transfer over SIP REFER where answer rates matter (REFER can lower STIR/SHAKEN attestation).