Overview
Thedial 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
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
phone
phone
Sends the call to a telephone number using one of your provisioned Carriers.
sip
sip
Sends the call to a SIP URI. Use the
auth property if the SIP trunk requires username/password.user
user
Sends the call to a registered WebRTC or SIP user.
teams
teams
If Microsoft Teams integration is configured, you can dial out to Teams users.
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
Whenamd 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
TheexitMediaPath 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 aproxy value on the target, Graine will use it as the SIP Proxy for the outgoing INVITE (e.g. sip:192.168.0.1:5060).