Skip to main content

Overview

The dial verb creates a new call by dialing out to a telephone number, a registered SIP user, a SIP URI, or a Microsoft Teams user.

Example

When you execute the dial command you are making one or more outbound call attempts in an effort to create one new call, which is bridged to a parent call. The target property specifies an array of call destinations that will be attempted simultaneously. If multiple endpoints are specified in the target array, all targets are outdialed at the same time (e.g., “simring”, or “blast outdial”) and the call will be connected to the first endpoint that answers the call (or, optionally, the first call that completes a call screening application as specified in the confirmHook property). Endpoint types you can dial:
  • Telephone number — sent out through your configured Carrier
  • WebRTC or SIP client — registered directly with your subdomain
  • SIP endpoint — identified by a SIP URI (and optionally authentication)
  • Microsoft Teams user

Parameters

Target types

Sends the call to a telephone number using one of your provisioned Carriers.
Sends the call to a SIP URI. Use the auth property if the SIP trunk requires username/password.
Sends the call to a registered WebRTC or SIP user.
If Microsoft Teams integration is configured, you can dial out to Teams users.
The confirmHook on a target is a web callback invoked when the outdial is answered. It should return an application to run on the outbound call before bridging. If the application completes with the outbound call still connected, the two calls will be bridged.
The confirmHook allows you to implement call screening (e.g. “You have a call from so-and-so. Press 1 to decline”).

actionHook properties

The actionHook invoked when the dial command ends will include:

amd.hook properties

When amd is included, this webhook is invoked when Graine has determined the type of called party (human or machine) or detected a tone or beep.

exitMediaPath

The exitMediaPath option supports use cases where the media path must not touch Graine—for example PCI-compliant credit card collection where the conversation must not be recorded or stored by Graine. Using dial with exitMediaPath: true ensures media does not flow through Graine. For more on controlling the media path during a call, see Managing media path during call.

proxy

If you set a proxy value on the target, Graine will use it as the SIP Proxy for the outgoing INVITE (e.g. sip:192.168.0.1:5060).