Documentation for Developer/Administrators
HomeAccount PortalPricing
  • About this Documentation
  • Overview
    • Table of Content
    • Introduction
    • Welcome Kit
      • Add Balance
      • Buy New Phone Number
      • Voice configuration
      • SMS Configuration
        • SMS Forwarding
      • Reporting
        • CDR
        • SMS
        • FAX
  • DIDforSale Portal
    • Register a new account
    • Dashboard
    • Reporting
      • CDR
      • SMS
      • Inbound Calls
      • FAX
      • Group Usage
      • Voicemails
    • Phone Numbers
      • Phone Numbers
      • Channels
      • E911
      • Porting
      • Send FAX
      • FAX Emails
      • SMS Groups
      • Groups
      • CNAM
    • Interconnection
      • Manage IP
      • SIP Accounts
      • Testing Center
      • Phones and Devices
      • Custom Dialplan
      • Audio Files
    • Tools/Settings
      • Outbound Rates
      • API Control
      • Fraud Control
      • Postcalls
    • Account
      • Profile
      • Change Password
      • Add Balance
      • Payment History
      • Voucher
      • Invoices
      • Auto Refill
      • Charges
      • Contact Us
      • Global Settings
      • Logout
  • SIP Trunking
    • Configuration of Phone Numbers
      • Configuring SIP to IP Account
      • Configuring Custom Dial Plan to a Phone Number
      • Configure SIP to SIP Account
      • Set up Call Forwarding to a Phone Number
      • http URL Forwarding Setup
      • Webhook Setup
      • FAX
        • Receive FAX
        • Fax through SIP Account
        • Send FAX
    • Adding IP Address
    • Creating SIP Account
      • VoiceMails
    • SIP Trunk Interconnection Guide
      • 3CX
        • SIP-based Configuration
        • IP-based Configuration
      • Allworx
      • Asterisk
      • CISCO UCM
      • FreePBX
        • FreePBX PJSIP Configuration
          • IP-based
          • SIP-based
        • FreePBX ChanSIP Configuration
          • IP based
          • SIP based
      • FreeSwitch
      • FusionPBX
      • GoAutoDial
      • Grandstream Devices
        • GrandStream 6102 IPPBX
        • GrandStream 502
        • Grandstream 6104 IPPBX
      • HoduSoft PBX System
      • Microsoft Skype for Business
      • NEC Corporation
      • PBXinaFlash
      • Polycom OBi300
      • ShoreTel PBX
      • Vital PBX
      • Yealink Phones
      • ZYCOO
    • DIDForSale Softphone
    • Zoiper Softphone Application
      • Iphone App
    • Grandstream Wave Mobile Application
    • Enable Call Recording
    • Call Transcription
  • Voice and SMS APIs
    • Getting the API key and Token
    • Voice
      • Big Picture
      • Quick Start
        • Identify Caller
        • Collect Response
      • didML Reference Doc
        • Voice API Request Params
        • Voice API Response
      • didML Verbs
        • <dial>
          • <client>
          • <conference>
          • <number>
          • <queue>
          • <sip>
        • <enqueue>
        • <fax>
        • <gather>
        • <hangup>
        • <pause>
        • <play>
        • <postcall>
        • <record>
        • <recordcall>
        • <redirect>
        • <reject>
        • <say>
        • <sms>
    • SMS
      • Configure SMS
      • Send/Receive SMS via Email
      • SMS Forwarding
        • SMS forwarding to Phone Number
        • SMS forwarding to Email
        • SMS forwarding to a Webhook
      • SMS/MMS Desktop Application
      • SMS APIs
        • Activate SMS
        • Deactivate SMS API
        • Send SMS
        • SMS CDR
        • Set SMS Forwarding
      • Bulk SMS Feature
        • Creating SMS Campaign
        • Custom or Dynamic Text Sms
  • UC Editor
    • UC Editor
      • Features
      • How to configure/setup the Custom Call Flow
  • FAX via Email
    • Send & Receive FAX via Email
Powered by GitBook
On this page
  • Attributes
  • Troubleshooting

Was this helpful?

  1. Voice and SMS APIs
  2. Voice
  3. didML Verbs
  4. <dial>

<number>

Role: <number> keyword can be used to dial another number. This keyword can be used independently or it can be nested inside dial. Connecting to call to external number can cost extra depending on the service plan.

Use:

  • Connecting the call to another person based on time and location of the caller.

  • Using it along with IVR, where press 1 can go to sales person and press 1 can go to support number.

While there are no limitation on where <number> can be used, there is set of optional attributes to use with <number>. Below is a list of attributes to be used with <number>, each attribute has a specific function and can use certain values.

Attributes

Attribute

Value

Default

url

Callback URL

none

Method

POST/GET

POST

senddigits

any number digit

none

statusCallbackEvent

initiated, ringing, answered, completed

completed

statusCallback

status call back url

none

statusCallbackMethod

GET/POST

post

maxlength

integer value in seconds

4 hours

callerid

valid phone number

Caller’s ID

timout

Integer in seconds

30 seconds

record

on/off

off

Here is an example of how <number> is used within code.

<?xml version="1.0" encoding="UTF-8"?> 
<Response>
         <number>19499300360</number>
 </Response>

No another example, <number> can be nested inside the <dial> command.

<?xml version="1.0" encoding="UTF-8"?> 
<Response>
    <dial>
         <number maxlength=60 timeout=15>19499300360</number>
    </dial>
 </Response>

Attributes details:

url

If url is detected, phone system will execute the instruction set on the url to the called party. This happens only once the call is answered by the destination number and right before the call is connected to the original caller. This is useful if you want to play a small messaged to the called party. Remember caller is waiting for the call to be connected, so you might not want to make him wait for too long.

Sample callback URL

<?xml version="1.0" encoding="UTF-8"?> 
<Response>
    <dial>
         <number url="https://www.didforsale.com/apidemo/calledurl.xml">19499300360</number>
    </dial>
 </Response>

sendDigits

This attribute, send dtmf digits once the call is answered. For example if you know call is being answered by the IVR and you digits needs to be pressed to connect the call to the destination number. There are two special key ‘w’ and ‘W’. If detect ‘w’ phone system wait for 0.5 seconds and if ‘W’ system wait for 1 second before sending next digits. Example ‘WWWW101’ system will wait for 5 seconds before sending 101.

Sample Send Digits

<?xml version="1.0" encoding="UTF-8"?> 
<Response>
    <dial>
         <number sendDigits="www103">19499300360</number>
    </dial>
 </Response>

statusCallbackEvents

When the system made an outbound call, there are 4 things happens: “initiated”, means system is ready to make a call. “ringing” means end users phone is ringing, “answered”, enduser picked up the call, “completed”, end of the call. statusCallbackEvent event allows you to subscribe for for notifications for these events.

statusCallback

You must specify the users if you want to receive the events. This url will be calls for all the events.

statusCallback Parameters:

Here is list of parameters you receive for each event.

Parameter

Description

Called

Number Dialed

ParentCallSid

Call id of A Leg

CallStatus

One of the event “initiated, ringing, answered, completed”

Direction

Call Direction”Inbound/Outbound”

callSid

Orginal call ID

CallbackSource

call-progress-event

CallDurartion

Only on Completed Event

RecordingURL

If Recording Enabled and only on Completed Event

Example Call Status Events

<?xml version="1.0" encoding="UTF-8"?> 
<Response>
    <dial>
         <Number url="http://www.businessphoneservice.us/phone/index2.xml" 
          statusCallbackEvent="initiated ringing answered completed" 
           statusCallback="http://www.businessphoneservice.us/phone/event.php" 
           statusCallbackMethod="POST">+19499300360</Number>
    </dial>
 </Response>

Advanced Options:

  • With dial and number commands you can call multiple users at the same time. Whoever answers first wins. This is great for simultaneous dialing.

  • If the call is answered automatically answered with a Voicemail, call will be connected to that leg. So need to be careful while using simultaneous calling.

Example Dialing Multiple Numbers Simultaneously

<?xml version="1.0" encoding="UTF-8"?> 
<Response>
    <dial>
         <Number>+19499300360</Number>
         <number>18005797676</number>
    </dial>
 </Response>

Troubleshooting

  • Make sure attributes inside the nodes are in quotes " ".

Previous<conference>Next<queue>

Last updated 6 years ago

Was this helpful?

Running in any Issue? Need Help? team or email us contact-support@didforsale.com.

Contact our support