How do I dial an extension on an outbound call?
# support
j
I need to dial an extension- is that available in the UI or do I need to use the API?
v
@James You can dial an extension using the VAPI interface. When setting up your outbound call, you can include the extension number after the main phone number, usually separated by a comma or a semicolon, which represents a pause before dialing the extension. If you're having trouble finding where to input the extension in the UI, please let me know, and I can guide you through the process. If the UI does not support this feature, you may need to use the API to programmatically include the extension in your call setup.
You can continue this conversation by mentioning me in the message.
j
Ok, it looks like the UI does not support this feature
Using the API, I have customer.extension set, but it is not being dialed.
Ok, it looks like I have to have the Dial Keypad Function enabled, but then it seems to randomly hit keys throughout the call, despite the system prompt telling them not to. Can I dial an extension without allowing the assistant to use it?
s
@James can you pleae eloborate your use case to help you better.
j
Sure. There is a local number set up to call to get information. It is essentially an answering machine with different mailboxes, and the message is updated daily. I would like to call the number and get a transcript. So I need to select mailbox 1 initially, but pressing other numbers causes issues.
s
you can use dtmf tool for this to send key presses.
j
Ok, is there any trick to getting
dtmf
to work consistently? I see this in my logs but it only sometimes actually selects option 1-
Copy code
{
        "role": "tool_calls",
        "time": 1726686132994,
        "message": "",
        "toolCalls": [
          {
            "id": "call_s6tPG3t7BD3Pn77Op5BRKlQs",
            "type": "function",
            "function": { "name": "dtmf", "arguments": "{\"keys\": \"1\"}" }
          }
        ],
        "secondsFromStart": 8.119
      },
      {
        "name": "dtmf",
        "role": "tool_call_result",
        "time": 1726686132997,
        "result": "Success.",
        "toolCallId": "call_s6tPG3t7BD3Pn77Op5BRKlQs",
        "secondsFromStart": 8.122
      },
j
what does dtmf do?
s
try this
trigger the dtmf tool with 1
j
It hasn't worked the last 5 times I attempted it with that string, but it has worked occasionally other times.
I see
Model called tool: dtmf({"keys":"1"})
in the logs but it doesn't do anything
s
can you share the call id pls?
j
9fb3bf3e-0e60-4935-8498-af74ab8d2fdd
s
hey @James tool call was susucesful but looks like it didn't reached the other end. can you try using external tool call?
j
What do you mean by external tool call?
s
use tools for sending DTMF tones directly to twilio.
j
Before I get to that, can you confirm on that call that it is dialing the extension that I specify in
customer.extension
? Ideally I don't even have to have the model send the DTMF tone, I would think that it should be able to dial the extension directly
s
no the transfer tool call wan't triggered.
Copy code
{
        "role": "tool_calls",
        "time": 1727106889712,
        "message": "",
        "toolCalls": [
          {
            "id": "call_0oL1PUA1ljwUrxnypOHv8eXC",
            "type": "function",
            "function": {"name": "dtmf", "arguments": "{\"keys\": \"1\"}"}
          }
        ],
        "secondsFromStart": 5.453
      },
8 Views