[Freeswitch-users] play back and moh
Leo Lau
ningliuxd at gmail.com
Wed Aug 13 05:44:45 MSD 2014
In the original mail,
> Assume that Bob calls Alice, before Bob here the ringtone of Alice,may be a
> clip of music. When bob use voip phone, after he dials,
> maybe there will be a bit longer time before he receives the ringtone. I want
> to play some music in this period.
――― the ringtone means the color ring of Alice. So, is there any way I can
play my own music before the color ring?
发件人: Michael Jerris <mike at jerris.com>
答复: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org>
日期: 2014年8月13日 星期三 5:01
至: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org>
主题: Re: [Freeswitch-users] play back and moh
I don't think we have any way to do this, you can use color ring back and
you can ignore progress and play it right away, but you can not then have
real ring indication take over. I'm not sure the feature makes any sense as
it should never be more than a few seconds, in practice it would be a very
strange effect to call someone and immediately get music, then a couple
seconds later get ringing.
On Aug 12, 2014, at 12:11 PM, 刘宁 <ningliuxd at gmail.com> wrote:
> Hi all
>
> Sorry to trouble you ,but I really came across a problem still remaining
> unsolved when using freeswitch to develop some features.
> Assume that Bob calls Alice, before Bob here the ringtone of Alice,may be a
> clip of music. When bob use voip phone, after he dials,
> maybe there will be a bit longer time before he receives the ringtone. I want
> to play some music in this period.
>
> Here is the diaplan config
> The path is :/usr/local/freeswitch/conf/dialplan/default/call.xml
>
> Here is the content:
>
> </extension>
> <extension name="testlua">
> <condition field="destination_number" expression="^(\d{4}\d+)$">
> <action application="playback" data="voicemail/qav_video_incoming.wav"/> <!--
> just for test replace it later-->
> <action application="lua" data="gen_dialplan_xml.lua"/>
> </condition>
> </extension>
> </include>
>
>
> The lua scripts “gen_dialplan_xml.lua" have to set some arguments for the
> session and finally it calls freeswitch.bridge(session,newsession)
>
> Assume that the time when entering the bridge function is t1, and the time
> when the ringtone of Alice arrives is t2, thus a time of (t1― t2) exists.
> I want to play a music to Bob during this time. But the action of “playback”
> and “lua” seem to be applied sequentially, that means ,the music is not played
> during the (t1―t2)time.
>
> I also tried
>
> <extension name="testlua">
> <condition field="destination_number" expression="^(\d{4}\d+)$">
> <!--action application="playback" data="voicemail/qav_video_incoming.wav"/-->
> <!-- just for test replace it later-->
> <action application="set"
> data="hold_music=${sound_prefix}/voicemail/qav_video_incoming.wav"/> <!-- just
> for test replace it later-->
> <action application="set"
> data="tmp_hold_music=${sound_prefix}/voicemail/qav_video_incoming.wav"/> <!--
> just for test replace it later-->
> <action application="lua" data="gen_dialplan_xml.lua"/>
> </condition>
> </extension>
> </include>
>
>
> And the music file does exist, but it still did not work.
>
>
> How could I complete this feature?Do I have to complete this in the lua
> scripts?
>
>
> Than you in advance,looking forward to your reply.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140813/146efdd7/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list