`

Playback(1.0+)

 
阅读更多

Playback: Play a sound file. (1.0)

功能:

Play a sound and/or video file

播放一个声音或视频文件

语法:

 Playback(filename1[&filename2...][,options])

描述:

播放指定的声音或视频文件(你需要省略文件拓展名)。声音文件默认被保存在/var/lib/asterisk/sounds目录下(该目录路径可以在asterisk.conf被改变)

 

Plays the specified sound or video file(s) (you need to omit the filename extension). Sound files are stored in the /var/lib/asterisk/sounds directory by default (the directory path can be changed in asterisk.conf). 

Playback是一个可以多国语言选择的应用。它将寻找与当前语言相符的子文件夹,(就是使用SetLanguage命令或通道的默认语言编码。如果失败,它将播放没有语言指定的部分)

Playback is Multi-Language-compliant. It will look in a subdirectory corresponding with the current language code (as set by the SetLanguage command, or the channel's default language code. Failing that, it will play the non-language-specific edition. 
Playback
将播放整个语音文件,只有播放结束才把控制权归还给。对Background相比,Background不仅播放语音文件还可以立即返回控制权,允许asterisk在当前通道播放语音文件时,执行其他的命令。

Playback will play the whole sound file(s), and when complete, return control. Compare with the Background command, which plays a sound file but returns control immediately, allowing Asterisk to perform other commands on this channel while the sound file is playing. 

参数

[options]有如下选项:

Skip:只有当通道被应答了才可播放声音文件。如果通道还没有被应答,Playback命令将不做任何操作,直接返回

skip: Play the sound file only if the channel has already been answered. If the channel has not yet been answered, the Playback command will return immediately without playing anything.

 

Noanswer:播放声音文件,但是不用事先应答(如果还没有应答)。不是所有的通道支持在通道还没有被应答时播放声音文件的。

noanswer: Play the sound file, but don't answer the channel first (if hasn't been answered already). Not all channels support playing messages while still on hook.

 

J:如果该选项被指定了,当指定声音文件不存在,该应用将跳转到n+101处(如果存在优先级n+101

j: If option is specified, the application will jump to priority n+101 if present when a file specified to be played does not exist.

 

Say:使用say.conf来说明当前字符串。

say: Use say.conf to interpret the string

 

如果skipnoasnwer选项两者都没有指定, Playback命令将首先应答通道(如果当前通道还没有被应答),才会播放声音文件。

If neither skip nor noanswer options are specified, then the Playback command will first answer the channel (if it hasn't been answered already) and then play the sound file.

 

Note: The options wont work if there are spaces between the filename, the comma and the option(s). 

示例1

   exten => 500,1,Playback(tt-weasels,skip)

 

返回值

一旦结束, ${PLAYBACKSTATUS}会被设置成"FAILED"或者"SUCCESS"

On completion, ${PLAYBACKSTATUS} contains either "FAILED" or "SUCCESS".

 

Playback不会被时间影响,除非internal_timingasterisk.conf中被开启。

Playback is not affected by timing, unless internal_timing is turned on in asterisk.conf.

 

分享到:
评论

相关推荐

    Kent - From Rec-Playback To FrameworksV1.0

    软件自动测试文献英文版 John Kent M. SC.

    Scalable Polyphony MIDI (SP-MIDI) Version 1.0b

    Scalable Polyphony MIDI (SP-MIDI) Version 1.0b Scalable Polyphony MIDI Specification SP-MIDI Device 5-24 Note Profile for 3GPP The Scalable Polyphony MIDI Specification (SP-MIDI) provides the ...

    CM8826_Datasheet_v1.0.pdf

    The 8 outgoing channels are composed of 2 playback DMA’s, which are multi-channel DMA (24 bits, 6 channels, 96k), S/PDIF (each 24 bits, 2 channels, 96k). The 6 ingoing channels are spread in 2 ...

    Native FLV Playback-crx插件

    语言:English 允许浏览器“本地”播放FLV视频网址(flv) ...在设置中的flv.js 1.5.x,1.4.x,1.3.x,1.2.x,1.1.x,1.0.x之间切换。 此处的代码存储库:https://github.com/klouskingsley/chrome-flv

    mpg123

    It supports MPEG 1.0/2.0 layers 1, 2 and 3 (those famous "mp3" files), and it has been tested on a wide variety of platforms, including Linux, FreeBSD, NetBSD, SunOS, Solaris, IRIX, HP-UX and others...

    IBM Rational 全套 License 支持 7.0、7.1 有效期至 2020-10-31日

    COMPONENTS="PerformanceStudioSuite:1.0:1 LTmaster:7.1:1 \ LTgui:7.1:10 LTvu:7.1:100 LTjolt:7.1:1 LTtux:7.1:1 LTsql:7.1:1 \ LThttp:7.1:1 LTsap:7.1:1 LTcorba:7.1:1 LTdcom:7.1:1" PACKAGE RSPS_Base_...

    rational 全套licence 可用于7.1

    LT_Playback_100000VU rational 7.5 uncounted \ 28D086A1F873 HOSTID=ANY ISSUER="THE FORCE TEAM" NOTICE="The \ Force Team - 2007" ck=90 LT_All_VU_Protocols rational 7.5 uncounted \ AD87056FFA1A HOSTID...

    IBM Rational 全套 License 支持 v7.1 有效期至 2020-1-6日

    PACKAGE LT_Playback_100000VU rational 7.5 51E6DD992302 \ COMPONENTS="LTvu:7.1:100000 LT_100000VT:8.0:10000" PACKAGE RSPS_TLA_500VU rational 1.5 F36CDEAC264E \ COMPONENTS="PerformanceStudioSuite:1.0:...

    NVP6124B Datasheet

    playback. The 4-Channels Coaxial Communication Protocol communicates between controller(DVR) and camera on the video signal through coaxial cable. It was includes Tx for transfer especially signals ...

    Chrome playback speed controller-crx插件

    控制您的youtube或udemy视频的播放速度 如果当前选项卡不是Youtube或Udemy视频,则扩展程序图标将显示为灰色,并将...-滑块控制视频速度,从0.0到15.9-重置按钮会将视频速度设置为1.0 支持语言:English (United States)

    STM32F401-Discovery_FW_F4_V1.5.0:用于编译来自 STM32Cube_FW_F4_V1.5.0 的 STM32F401-Discovery 示例的 GNU ARM makefile

    须藤 apt-get install autoconf pkg-config libusb-1.0 git 工具链 mkdir 工具链光盘工具链wget tar xvf gcc-arm-none-eabi-4_9-2015q1-20150306-linux.tar.bz2 光盘.. 斯特林克 git 克隆 光盘链./autogen.sh 。/...

    Wrox.Professional.Android.Application.Development

    * Details for using Android hardware, including media recording and playback, using the camera, accelerometers, and compass sensors. * Advanced development topics including security, IPC, advanced ...

    支持IE6的HTML5播放器

    请照如下方式整合: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ... title="No video playback capabilities." /> <object> <video> </body> </html>

    BURNINTEST--硬件检测工具

    - PassMark Firewire Plugin V1.0 1000 (or higher) and a 揔anguru FireFlash?drive for Plugin Firewire testing. (*) Windows 2000 does not support the CD-RW burn test. The advanced RAM test is only ...

    esp8266 mp3

    //playback rate, deleted samples means we increase playout speed a bit. This returns an //8.24 fixed-point number int recalcAddDelSamp(int oldVal) { int ret; long prevUdr=0; static int cnt; int i;...

    Rave Player网页视频播放器

    - Corrected issue with "Limit playback time (tl)" for MP3 files. v 4.0.117 (Nov. 20, 2009) - Added m4v extension to video list. v 4.0.116 (Nov. 7, 2009) - Updated wasp.js - Standardized DOM - ...

    HGE_系列教材(1-9)

    <3> 音频支持和音乐回放(music playback):支持WAV, MP3, MP2, MP1 an d OGG 音频文件格式(audio file formats),支持MO3, IT, XM, S3M, MTM, MO D and UMX 音乐文件格式(music file formats),支持压缩流的...

    基于mediastreamer2的网络电话实现流程以及源码库

    我使用1.0版本 pulseaudio-1.0.tar.gz 然后通过winshare(Windows和Linux的通信)把下载好的库文件拷贝到Linux下, 然后解压 tar zxvf pulseaudio-1.0.tar.gz 注意这个时候可能会发生错误,是没有权限的问题,那么就...

Global site tag (gtag.js) - Google Analytics