https://vcc.live/wp-content/uploads/2022/03/vcclive_main_logo.svg
  • Product
    Back to all pages
    https://vcc.live/wp-content/uploads/2023/09/omnichannel-test-3.svg
    Omnichannel

    Instantly switch between your customer's preferred channels and handle multiple conversations at once.

    Key channels VCC Live supports

    Voice SMS Email Live chat software Instant messaging apps Social media

    Email, social and more for SYKES and Huawei

    https://vcc.live/wp-content/uploads/2023/09/sykes-topnav-menu.svg
    WhatsApp > Messenger > Case studies >
    https://vcc.live/wp-content/uploads/2023/10/ai-topnav-icon-2.svg
    AI and automation

    Drive intelligent productivity and efficiency with VCC Live's suite of AI and automation tools.

    https://vcc.live/wp-content/uploads/2023/09/call-cetner-software-test-7.svg
    Call center

    Explore our call center software for driving productivity, fueling automation, and delivering exceptional CX.

    Powering Decathlon's call center

    https://vcc.live/wp-content/uploads/2022/09/Decathlon_Austria_Thumbnail.jpg
    Why VCC Brochure Security
    https://vcc.live/wp-content/uploads/2023/09/outbound-test-3.svg
    Outbound

    Handle more live calls, boost talk time, and automate outreach with a feature-filled outbound solution.

    Features to boost outbound activities

    Automatic dialing Voicemail detection Outbound IVR Over-the-phone payments

    Fueling your outbound sales

    https://vcc.live/wp-content/uploads/2023/09/boosting-sales-thumbnail-image.jpg
    Sales teams > Case studies > Collections >
    https://vcc.live/wp-content/uploads/2023/09/inbound-icon-3.svg
    Inbound

    Swiftly resolve issues, empower omnichannel, and handle volume with ease with our CX-focused solution.

    VCC live for inbound contact centers

    IVR systems Distributing calls (ACD) Call center scripting KPI dashboard

    Transforming customer service for tbi bank

    https://vcc.live/wp-content/uploads/2023/05/tbi-interview-banking.jpg
    Customer service > Case studies > Multichannel >
    vcc live 360 webagent menu icon
    VCC Live 360 Agent

    It's faster without installation! VCC Live works from your agents' browser wherever they are, powered by the latest AI technology.

    https://vcc.live/wp-content/uploads/2023/09/integrations-test-4.svg
    Integrations

    Connect VCC Live with any of your trusted business tools, including CRMs, payment tools, and much more.

    Selected integrations for VCC Live users

    Salesforce Hubspot Looker (Data Studio) Docusign Dialogflow Zapier

    Handle calls without leaving Salesforce

    https://vcc.live/wp-content/uploads/2023/06/salesforce-video-1.jpg
    Looker case study > Release center > Security >
  • Solutions
    Back to all pages
    https://vcc.live/wp-content/uploads/2023/08/sales-call-center-icon.svg
    Sales teams

    Connect and sell more than ever before with an automation-led solution for driving sales success.

    Powerful BI for next-level sales

    https://vcc.live/wp-content/uploads/2023/09/effective-communicatio-case-study-topnav.png
    https://vcc.live/wp-content/uploads/2023/08/customer-service-call-center-icon.svg
    Customer service

    Orchestrate a high-volume handling and resolution-focused approach that delights customers.

    92% of calls within SLA

    https://vcc.live/wp-content/uploads/2023/09/decathlon-case-study-topnav-2.png
    https://vcc.live/wp-content/uploads/2023/08/debt-collection-call-center-icon.svg
    Debt collection

    Make collections faster and simpler to speed up repayments and recover like never before.

    94% voicemail detection rate

    https://vcc.live/wp-content/uploads/2023/09/delfin-group-case-study-topnav.png
  • Industries
    Back to all pages
    https://vcc.live/wp-content/uploads/2025/11/bpo-call-center-icon2.svg
    BPO

    Deliver consistent, high-quality customer interactions at scale with a flexible, automation-ready contact center platform.

    2,000+ hours of active monthly talk time

    https://vcc.live/wp-content/uploads/2023/09/effective-communicatio-case-study-topnav.png
    https://vcc.live/wp-content/uploads/2025/11/retail-call-center-icon2.svg
    Retail

    Create seamless omnichannel shopping experiences and resolve customer inquiries faster across every touchpoint.

    92% of calls handled within SLA

    https://vcc.live/wp-content/uploads/2023/09/decathlon-case-study-topnav-2.png
    https://vcc.live/wp-content/uploads/2025/11/banking-call-center-icon2.svg
    Banking

    Support secure, compliant customer communications while speeding up loan processing, onboarding, and resolution workflows.

    Over 50% increase in efficiency

    https://vcc.live/wp-content/uploads/2025/11/tbi-bank-2.png
    https://vcc.live/wp-content/uploads/2025/11/insurance-call-center-icon2.svg
    Insurance

    Enhance policyholder engagement with efficient claims handling, smooth onboarding, and proactive communication.

    20% of workforce saved with automation

    https://vcc.live/wp-content/uploads/2025/11/waberer_topnav.png
    https://vcc.live/wp-content/uploads/2025/11/consumer-lending-call-center-icon2.svg
    Consumer Lending

    Accelerate loan servicing and repayments, and ensure reliable outreach with automated, compliant workflows.

    Higher efficiency and 30% more calls handled

    https://vcc.live/wp-content/uploads/2025/11/4finance_2.png
    https://vcc.live/wp-content/uploads/2025/11/healthcare-call-center-icon2.svg
    Healthcare

    Strengthen patient experience with secure, timely communication and streamlined scheduling, reminders, and support workflows.

    Improved CX and CSAT scores

    https://vcc.live/wp-content/uploads/2025/11/healthcare-teladoc-2.png
  • Packages
  • Resources
    Back to all pages
    Blog Case Studies Ebooks KPI library Webinars Call Center Courses Customer Interviews Information Security Telco Services Learning Center Developers Release Center Download here
  • Company
    Back to all pages

    Explore more

    About us Why VCC Live Careers News Partners

    Check out our history

    https://vcc.live/wp-content/uploads/2023/09/20yrs-anniversary-thumbnail.jpg
  • Partners
  • Become a partner
  • Email us
CONTACT US VIEW DEMO
Developer GuidesScript SDKFunctionsclearDtmf
  • Overview
    • About Script SDK
    • Examples
  • Constants
    • CONTROLLER_HELPERS
    • DISPOSITION_ASSESMENTS
    • FIELD_QUOTAS
    • FIELD_TYPES
  • Variables
    • fields
    • isAgent
    • isInbound
    • isTest
    • ticketId
    • ticketRelations
  • Functions
    • addVoicefileTag
    • alert
    • callCustomerApi
    • clearDtmf
    • confirm
    • contains
    • dump
    • getChannelVariable
    • getCommission
    • getController
    • getCurrentPage
    • getFieldNames
    • getFieldProp
    • getFieldValue
    • getFieldValues
    • getGoogleAccessToken
    • getMicrosoftAccessToken
    • getPages
    • getPrice
    • getQuotaFieldData
    • getScriptVariable
    • getTabs
    • goNext
    • goTab
    • httpRequest
    • inArray
    • isSelected
    • isVoiceRecordingActive
    • openURLInDefaultBrowser
    • runApplication
    • salesforce.getAccessToken
    • searchObject
    • setDisposition
    • setDispositionPrefUserId
    • setEventListener
    • setFieldValue
    • setTimeout
    • startVoiceRecording
    • stopVoiceRecording
    • toggleVoiceRecording
    • transfer
  • Events
    • controller.afterSetData
    • controller.onLoadData
    • global.beforeSetDisposition
    • global.beforeValidation
    • global.beforeSaveTicket
    • global.onCall
    • global.onLoad
    • global.onHangup
    • page.checkBeforeLoad
    • page.onLoad
    • page.onNext
    • ticketpage.onLoad
  • Objects
    • CONTROLLER_OBJECT
    • DISPOSITION_OBJECT
    • FIELD_PROPERTY_OBJECT
    • FIELD_VALUE_OBJECT
    • QUOTA_DATA_OBJECT
Back to Support and Learning Center
English Hungarian

clearDtmf

The vcc.clearDtmf() function is used within the VCC Live Contact Center Script module to clear the Dual-Tone Multi-Frequency (DTMF) buffer. When processing caller keypad inputs during an active call, the system stores pressed keys in the global.dtmf script variable. Calling this function empties the buffer, ensuring that any subsequent DTMF capture starts fresh without interference from previous, unwanted, or accidental keypad presses.

Description

vcc.clearDtmf(): void

You can save the DTMF data, then ask the client for another DTMF input.

Parameters

This function does not accept any parameters.

Return values

This function does not return a value (returns undefined). Its sole purpose is to perform the action of clearing the internal DTMF input cache.

Use cases with explanation

Use case 1. Preparing a Clean State for a New Input Sequence

When requesting secure input from a caller, such as a verification code or a credit card PIN, it is vital to ensure that old key presses from earlier in the call are wiped out. Calling vcc.clearDtmf() before you begin polling for new digits guarantees you are only reading the digits pressed exactly when requested.

// Example: Starting a secure capture for a 4-digit PIN
function startPinCapture() {
  // Clear any residual DTMF digits from previous script elements
  vcc.clearDtmf();
  
  // Define a recurring loop to check for the required 4 digits
  checkPinInterval = vcc.setTimeout(checkPinInput, 1000);
}

function checkPinInput() {
  let dtmfInput = vcc.getScriptVariable("global.dtmf");
  if (dtmfInput.length === 4) {
    vcc.setFieldValue("pin_field", dtmfInput);
    // Proceed to validate or process the PIN
  } else {
    checkPinInterval = vcc.setTimeout(checkPinInput, 1000);
  }
}

Use case 2. Handling Input that Exceeds the Maximum Allowed Length

If a caller continuously presses keys and inputs more digits than expected (for instance, 6 digits when only 5 are needed), the input is effectively invalid. vcc.clearDtmf() can be utilized to gracefully reset the buffer so the caller is forced to start over, avoiding the need to prune the string manually.

// Example: Validating DTMF length against an expected number of digits
function validateInputLength(expectedLength) {
  let currentDtmf = vcc.getScriptVariable("global.dtmf");
  
  if (currentDtmf.length === expectedLength) {
    // Exact length reached, enable the submit button for the agent
    vcc.getController("payment_form", "submit_button").disabled = false;
  } else if (currentDtmf.length > expectedLength) {
    // Too many digits entered. Clear the buffer entirely so the caller tries again
    vcc.clearDtmf();
    // Also notify the agent
    vcc.setFieldValue("status_msg", "Too many digits. Buffer cleared. Please ask the caller to try again.");
    vcc.getController("payment_form", "status_msg").refresh();
    vcc.getController("payment_form", "submit_button").disabled = true;
  } else {
    // Still waiting for more digits
    vcc.getController("payment_form", "submit_button").disabled = true;
  }
}

Use case 3. Resetting Input State on Script Page Changes

When a contact center script guides agents and callers through multiple different pages (e.g., from generic support branching to a protected transaction page), ensuring that stray DTMF inputs do not act as accidental submissions on a new page is good practice. Utilizing vcc.clearDtmf() on the page’s onLoad hook establishes a safe baseline.

// Example: Clearing buffer upon entering a secure transaction page
$("transaction_page").onLoad = function () {
  // Wipe out any accidental button presses from previous menus
  vcc.clearDtmf();
  
  // Initialize standard display values for the new page
  vcc.setFieldValue("transaction_status", "Ready to capture new digits...");
  vcc.getController("transaction_page", "transaction_status").refresh();
};

Notes

  • Variable Relationship: Executing vcc.clearDtmf() directly mutates the state tracked by vcc.getScriptVariable("global.dtmf"). Querying this variable immediately after clearing will yield an empty string ("").
  • Timing Best Practices: Always use this function proactively before initiating asynchronous timer functions (e.g., setTimeout) that read the buffer. This mitigates race conditions where a caller might press a key just milliseconds before your polling loop begins.
Back to Support and Learning Center

Comments

Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.


There are no comments yet.

Click here to cancel reply.

Please note that by clicking on the Submit button, you agree to a member of VCC Live team contacting you with business offers. You can find detailed information on how we can establish contact with you in our Privacy Policy

illustration

Product

  • Call center
  • Omnichannel
  • Outbound
  • Inbound
  • Channels
  • Integrations
  • More on VCC

Main Features

  • IVR system
  • Auto dialer
  • Call queuing software
  • Automatic Call Distribution
  • Call center scripting tool
  • Outbound IVR
  • Predictive dialer
  • Voicemail detection
  • Contact center dashboard

Solutions

  • Customer Service
  • AI and Automation
  • Sales Teams
  • Debt Collection
  • BPO
  • Retail
  • Financial Services
  • Banking
  • Insurance
  • Consumer Lending
  • Healthcare

Resources

  • Blog
  • Case Studies
  • Ebooks
  • Call Center Courses
  • Information Security
  • Learning Center
  • Download
  • Telco services
  • Call center KPI library

Company

  • About us
  • Why VCC Live
  • Careers
  • News
  • Partners
https://vcc.live/wp-content/uploads/2022/03/iso-cert-1-min.png https://vcc.live/wp-content/uploads/2022/03/iso-cert-2-min.png https://vcc.live/wp-content/uploads/2022/03/iso-cert-3-min.png https://vcc.live/wp-content/uploads/2025/04/SOC2-website-e1745483442463.png

Social Media

https://vcc.live/wp-content/uploads/2022/03/linkedin-footer.svg https://vcc.live/wp-content/uploads/2022/03/twitter-footer.svg https://vcc.live/wp-content/uploads/2022/03/facebook-footer.svg https://vcc.live/wp-content/uploads/2022/03/instagram-footer.svg

Call us

https://vcc.live/wp-content/uploads/2022/03/flag-hu.png Hungary
+36 19996400
https://vcc.live/wp-content/uploads/2022/03/flag-en.png UK
+44 2086380169
https://vcc.live/wp-content/uploads/2022/03/flag-de.png Germany
+49 3021782516
https://vcc.live/wp-content/uploads/2022/03/flag-pl.png Poland
+48 123950886
https://vcc.live/wp-content/uploads/2022/03/flag-ro.png Romania
+40 31706167
https://vcc.live/wp-content/uploads/2022/03/flag-usa.png USA
+1 3024988337
  • Privacy Policy
  • Cookie Policy
  • Legal Statement
  • General Terms of Agreement
  • Magyar nyelvű jogi dokumentumok
illustration