问题描述
我正在开发一个应用程序,该应用程序应允许用户使用手机访问其邮箱.我开发了一个IVR菜单,用户可以利用该菜单来检索他们的邮件.更具体地说,我在perl中编写了一个AGI来检索邮件.问题是AGI执行需要很长时间,为此,我需要让我的用户在执行agi时听到一些在后台播放的音乐.也就是说,我需要使我的拨号计划中的"AGI"和"MusicOnHold"应用程序同时执行.任何线索,我怎么能做到这一点?您可以从AGI
应用程序中发布SET MUSIC ON
,处理您的计算,然后发布SET MUSIC OFF
.
如果您希望音乐可中断,请发出以下命令:
CONTROL STREAM FILE <filename> "0123456789*#" "0" "" "" ""
第二个参数是能够中断音乐的数字列表.
最好不要混用AGI
和Dialplan命令.
AGI
具备Dialplan所能提供的一切,但是AGI
是用完整的编程语言实现的,因此可以使您对执行逻辑有更多的控制.
i am developing an application that shall allow users to access their mail boxes using their phones.I developped an IVR menu of which users will make use to retrieve their mails. More specifically I write an AGI in perl to retrieve the mails. The issue is that the AGI execution takes quite a long time.To this end, I need to make my users hear some music played back in the background while the agi being executed. That is, i need to make the "AGI" and "MusicOnHold" applications in my dialplan execute simultaneously. Any clue how I can achieve this?
You can issue SET MUSIC ON
from you AGI
applications, process your calculations, then issue SET MUSIC OFF
.
If you want the music to be interruptable, issue this:
CONTROL STREAM FILE <filename> "0123456789*#" "0" "" "" ""
The second parameter is the list of digits able to interrupt the music.
It's better not to mix AGI
and dialplan commands.
AGI
is capable of everything dialplan is capable of, but AGI
is implemented in a full fledged programming language and therefore gives you more control over the execution logic.
这篇关于星号拨号计划(extensions.conf)应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!