`

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

    ### 自动化测试:从录制/回放到框架 V1.0 #### 摘要 自动化测试工具,尤其是那些作用于用户界面(UI)的脚本驱动型工具,自20世纪90年代初就已出现。随着时间的发展,组织越来越意识到这些工具在“开箱即用”状态...

    General MIDI Lite Version 1.0

    ### General MIDI Lite (GML) Version 1.0 #### 1.... paving the way for the widespread adoption of MIDI in mobile devices and shaping the future of digital music creation and playback.

    Playback Speed-crx插件

    在默认情况下,大多数HTML5播放器只提供有限的播放速度选项,如1.0倍速(正常速度)和2.0倍速(双速)。然而,Playback Speed-crx插件允许用户在更宽的范围内调整播放速度,例如,可以设置为0.5倍速(慢速)、1.25...

    mac4linux v_1.0

    Mac4Lin includes a plugin for integrating Exaile with the Avant-Window Navigator, allowing users to control their music playback directly from the dock, much like in MacOSX. #### MacOSX Sounds ...

    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

    Android MediaPlayer Playback---多媒体开发应用程序接口

    - `setVolume()`方法可以调整媒体播放的音量,范围从0.0到1.0。 7. **生命周期管理**: - 在Activity或Fragment的生命周期中,需要适当地释放`MediaPlayer`资源,防止内存泄漏。通常在`onDestroy()`或`onStop()`...

    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)

    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 ...

    C#调用media player音乐播放器源码

    // 0.0为静音,1.0为最大音量 // 获取/设置播放位置(单位:秒) double currentPosition = mediaPlayer.Position.TotalSeconds; mediaPlayer.Position = new TimeSpan(0, 0, (int)currentPosition); ``` 在实际...

    安全性测试系统

    1. Audio Playback功能测试:检查音频设备对不同频段音频信号的播放性能,确保输出参数符合标准。 2. 收音机功能测试:测试FM/AM信号的调制解调和播放性能,验证音频输出参数。 3. 视频功能测试:评估视频输出图像的...

    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 。/...

    Broadcom Product Brief BCM7404

    - **HDMI 1.3a/DVI 1.0 MAC and PHY with HDCP:** Supports high-definition multimedia interface (HDMI) and digital visual interface (DVI) with high-bandwidth digital content protection (HDCP). ...

    USB协议分析工具

    5. **回放(Playback)**:将捕获的数据重新发送到USB总线,以重现问题场景或进行测试。 6. **报告(Reporting)**:生成详细的分析报告,帮助工程师诊断问题。 使用USB协议分析工具时,可能遇到的问题包括不兼容的...

Global site tag (gtag.js) - Google Analytics