📞
API Docs
  • Welcome
  • NUMBERS / ORDERING
    • List Areas
    • List Numbers
    • Order Numbers - No Cart
    • Delete Numbers
    • Change Call Forward
    • Vanity Tollfree - Search
    • Vanity Toll Free - Order
  • Shopping Cart Ordering
    • Add Number to Cart
    • List Numbers in Cart
    • Delete Number from Cart
    • Complete Order Cart
  • MY INVENTORY
    • List My Nmbers
    • List Call Flows
    • Change CallFlow
    • CDR Records
  • SMS/MMS
    • Send SMS
    • Send MMS
    • Receive SMS/MMS
    • Receive Delivery Receipts
  • Campaigns
    • Submit TollFree Campaign
  • CALL APIS
    • Calls
    • Set Incoming URL
    • Incoming Calls
    • Listing Calls
    • Making Calls
      • Example Code
        • Outbound to Tel#
        • Outbound to SIP Device
        • Example Responses
    • Modifying Live Calls
      • Examples
    • Recordings
      • Get List of Recordings
      • Delete a Recording
  • CALL API MARKUP
    • API Call Markup Language
      • Say
      • Dial
        • Number
        • Client
        • SIP
      • Play
      • Gather
      • Record
      • Hangup
      • Pause
      • Reject
      • Redirect
  • LOOKUPS
    • Carrier and CNAM
  • Number Portability
    • Validate Portability
    • Lookup Port Request
    • Submit Port Request
  • FAXING
    • Create Outbound Fax
    • Lookup Outbound Fax Status
    • List Faxes
    • Download File
  • registered agent
    • List Companies
    • List Registered Agents
    • List Documents
    • Download Document
    • Create Company
    • Delete Company
    • Create Registered Agent
    • Modify Registered Agent
Powered by GitBook
On this page
  • Play Attributes
  • Supported Audio Formats
  • Media Server Audio File Format
  • Technical Specification and Capacity
  • How to Convert a Wav File to the Correct Bitrate
  • Nesting
  • Examples
  1. CALL API MARKUP
  2. API Call Markup Language

Play

The Play verb is used to play an audio file to the remote party.

Play Attributes

Name

Allowed Values

Default Value

Loop

integer > 1

1

loop. The 'loop' attribute specifies how many times you’d like the audio file to be repeated. Specifying '0' will cause the the <Play> verb to loop until the call is hung up.

Supported Audio Formats

MIME type

Description

audio/wav

wav format audio

audio/mp3

mp3 format audio

audio/wave

wav format audio

audio/x-wav

wav format audio

Media Server Audio File Format

Technical Specification and Capacity

The callapi Media Server is capable of:

Media and Codecs:

  • G711 (a-Law, u-Law);

  • GSM;

  • Linear PCM(L16);

  • G729;

  • DTMF(RFC 2833, INBAND)

Media Files:

  • Wav (Sample rate 8000Hz, bit rate of 16, Mono);

  • mp3 (Any sample rate)

  • GSM

How to Convert a Wav File to the Correct Bitrate

You can use a software call ffmpeg as follows:

ffmpeg -i source_file.wav -acodec pcm_s16le -ac 1 -ar 8000 result_file.wav

Nesting

The verb can not have any other verbs or nouns nested. Only a URL.

Examples

Example of how to use the verb:

<Response>
    <Play>http://foobar.com/demo.wav</Play>
</Response>
<Response>
    <Play>http://foobar.com/demo.mp4</Play>
</Response>
PreviousSIPNextGather

Last updated 1 year ago