🏆 1st Place ElevenLabs Hackathon – $20,000🚀 EBRD Star Venture Program🥈 2nd Place Sevan Startup Summit🚀 Google Cloud $25K Grant
Kallina AI
RO
Kallina Voice AI

DTMF Handling

Detecție și generare DTMF pentru interacțiune cu sisteme IVR.

Touch-Tone Communication

DTMF (Dual-Tone Multi-Frequency) permite utilizatorilor să interacționeze cu voice AI prin apăsarea tastelor telefonului.

DTMF Keypad

1
2
3
A
4
5
6
B
7
8
9
C
*
0
#
D

Each key produces two frequencies (one row + one column)

Row: 697Hz, 770Hz, 852Hz, 941Hz | Col: 1209Hz, 1336Hz, 1477Hz, 1633Hz

DTMF Transport Methods

In-Band

DTMF tones carried în audio stream.

  • • Traditional method
  • • Works everywhere
  • • Affected by codec compression
  • • May be misdetected
Legacy

RFC 2833 (Recommended)

DTMF events în RTP stream, separate from audio.

  • • Reliable detection
  • • Not affected by codecs
  • • Industry standard
  • • Payload type 101
Recommended

SIP INFO

DTMF sent as SIP INFO message.

  • • Separate from media
  • • Higher latency
  • • Less common
  • • Firewall friendly
Alternative

RFC 2833 Packet Structure

// RFC 2833 DTMF Event Packet
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     event     |E|R|  volume   |          duration             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

event:    0-9, 10=*, 11=#, 12-15=A-D
E (end):  1 = last packet for this event
R:        reserved
volume:   power level (0-63, -dBm0)
duration: in timestamp units
Example: Key "5" pressed
event=5, E=0, volume=10, duration=160
Example: Key "5" released
event=5, E=1, volume=10, duration=800

Voice AI DTMF Integration

// Handle DTMF in Voice AI
voiceAI.on('dtmf', (event) => {
  const { digit, duration } = event;

  switch (digit) {
    case '1':
      voiceAI.speak('You selected sales. Transferring...');
      voiceAI.transfer('sales-queue');
      break;

    case '2':
      voiceAI.speak('You selected support.');
      voiceAI.setContext({ intent: 'support' });
      break;

    case '0':
      voiceAI.speak('Connecting to a human agent.');
      voiceAI.transfer('human-agent');
      break;

    case '*':
      voiceAI.speak('Returning to main menu.');
      voiceAI.reset();
      break;

    default:
      voiceAI.speak(`You pressed ${digit}.`);
  }
});

// Generate DTMF (for outbound IVR navigation)
voiceAI.sendDTMF('1234#', { duration: 100, gap: 50 });

DTMF Use Cases

Inbound (Detection)

  • • IVR menu navigation
  • • Account/PIN entry
  • • Confirmation (Press 1 to confirm)
  • • Language selection
  • • Transfer request (0 for agent)

Outbound (Generation)

  • • Navigate external IVR systems
  • • Enter extension numbers
  • • Enter conference PIN
  • • Automated phone tree navigation
  • • Two-factor authentication

Configuration

DTMF Mode

Transport method

Min Duration

Minimum tone duration to detect

40ms
Inter-digit Timeout

Max gap between digits în sequence

3000ms
Terminator

End of input marker

# key

Every Keypress Counts

DTMF handling pentru interactivitate completă.

Vezi Demo →
Începe Astăzi

Transformă Comunicarea cu Clienții

Agenți vocali AI care răspund 24/7 în română și rusă. Implementare în 2 săptămâni, fără infrastructură specială.

Setup în 24 oreSuport dedicatGDPR compliant

Rămâi la curent

Obține cele mai recente știri despre tehnologia de apelare AI și actualizările platformei

Made with ♡ by Kallina AI Team — 2025