[Freeswitch-dev] playback in background
Hi, I didn't find a way to playback in background in normal dialplan/lua scripts. I know how to use event socket to do async, but I still think it's useful in the following scenario and don't need a socket. - start playback in background - long time query (http or db query) - explicitly stop background playback, or implicitly stop when any further app executes(or when new data writes to the channel) - do other things using the query result Is there any existing solutions? or how hart to make a patch? if I make a patch to achieve that, would it be better to make in mod_commands or should I make a new module? What I'm thinking is to make a BUG in another thread and feed sound data to the channel. Is that the right approach? Thanks. -- Blog: http://www.dujinfang.com Proj: http://www.freeswitch.org.cn
Lookup displace and uuid_displace On Oct 30, 2010 8:14 PM, "Seven Du" <dujinfang@gmail.com> wrote:
Hi,
I didn't find a way to playback in background in normal dialplan/lua scripts. I know how to use event socket to do async, but I still think it's useful in the following scenario and don't need a socket.
- start playback in background - long time query (http or db query) - explicitly stop background playback, or implicitly stop when any further app executes(or when new data writes to the channel) - do other things using the query result
Is there any existing solutions? or how hart to make a patch? if I make a patch to achieve that, would it be better to make in mod_commands or should I make a new module?
What I'm thinking is to make a BUG in another thread and feed sound data to the channel. Is that the right approach?
Thanks.
-- Blog: http://www.dujinfang.com Proj: http://www.freeswitch.org.cn
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
Cool. Thank you Anthony. Sorry I didn't look much hard. And, I found a few problems: 1) instead of displace, it's called displace_session. 2) the calling party hear nothing before echo, with or without the m flag. I want to hear MOH while waiting in the sleep. <condition> <action application="answer"/> <action application="playback" data="tone_stream://%(100,1000,800);loops=1"/> <action application="displace_session" data="local_stream://moh m"/> <action application="sleep" data="5000"/> <action application="echo"/> </condition> 3) inconsistent syntax: limit mux vs flags limit, with or without + uuid_displace,<uuid> [start|stop] <path> [<limit>] [mux],session displace,mod_commands displace_session: <path> [<flags>] [+time_limit_ms] I understand fix it might beak backward compatibilities, however, as they go to the same switch_ivr function it would be better if they looks like consistent. On Sun, Oct 31, 2010 at 11:16 AM, Anthony Minessale <anthony.minessale@gmail.com> wrote:
Lookup displace and uuid_displace
On Oct 30, 2010 8:14 PM, "Seven Du" <dujinfang@gmail.com> wrote:
Hi,
I didn't find a way to playback in background in normal dialplan/lua scripts. I know how to use event socket to do async, but I still think it's useful in the following scenario and don't need a socket.
- start playback in background - long time query (http or db query) - explicitly stop background playback, or implicitly stop when any further app executes(or when new data writes to the channel) - do other things using the query result
Is there any existing solutions? or how hart to make a patch? if I make a patch to achieve that, would it be better to make in mod_commands or should I make a new module?
What I'm thinking is to make a BUG in another thread and feed sound data to the channel. Is that the right approach?
Thanks.
-- Blog: http://www.dujinfang.com Proj: http://www.freeswitch.org.cn
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Blog: http://www.dujinfang.com Proj: http://www.freeswitch.org.cn
it doesn't work with sleep because sleep does not write any packets. send_silence_when_idle=400 On Sun, Oct 31, 2010 at 1:23 AM, Seven Du <dujinfang@gmail.com> wrote:
Cool. Thank you Anthony. Sorry I didn't look much hard.
And, I found a few problems:
1) instead of displace, it's called displace_session.
2) the calling party hear nothing before echo, with or without the m flag. I want to hear MOH while waiting in the sleep.
<condition> <action application="answer"/> <action application="playback" data="tone_stream://%(100,1000,800);loops=1"/> <action application="displace_session" data="local_stream://moh m"/> <action application="sleep" data="5000"/> <action application="echo"/> </condition>
3) inconsistent syntax: limit mux vs flags limit, with or without +
uuid_displace,<uuid> [start|stop] <path> [<limit>] [mux],session displace,mod_commands displace_session: <path> [<flags>] [+time_limit_ms]
I understand fix it might beak backward compatibilities, however, as they go to the same switch_ivr function it would be better if they looks like consistent.
On Sun, Oct 31, 2010 at 11:16 AM, Anthony Minessale <anthony.minessale@gmail.com> wrote:
Lookup displace and uuid_displace
On Oct 30, 2010 8:14 PM, "Seven Du" <dujinfang@gmail.com> wrote:
Hi,
I didn't find a way to playback in background in normal dialplan/lua scripts. I know how to use event socket to do async, but I still think it's useful in the following scenario and don't need a socket.
- start playback in background - long time query (http or db query) - explicitly stop background playback, or implicitly stop when any further app executes(or when new data writes to the channel) - do other things using the query result
Is there any existing solutions? or how hart to make a patch? if I make a patch to achieve that, would it be better to make in mod_commands or should I make a new module?
What I'm thinking is to make a BUG in another thread and feed sound data to the channel. Is that the right approach?
Thanks.
-- Blog: http://www.dujinfang.com Proj: http://www.freeswitch.org.cn
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Blog: http://www.dujinfang.com Proj: http://www.freeswitch.org.cn
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
That works, thanks a lot. On Tue, Nov 2, 2010 at 12:19 AM, Anthony Minessale <anthony.minessale@gmail.com> wrote:
it doesn't work with sleep because sleep does not write any packets.
send_silence_when_idle=400
On Sun, Oct 31, 2010 at 1:23 AM, Seven Du <dujinfang@gmail.com> wrote:
Cool. Thank you Anthony. Sorry I didn't look much hard.
And, I found a few problems:
1) instead of displace, it's called displace_session.
2) the calling party hear nothing before echo, with or without the m flag. I want to hear MOH while waiting in the sleep.
<condition> <action application="answer"/> <action application="playback" data="tone_stream://%(100,1000,800);loops=1"/> <action application="displace_session" data="local_stream://moh m"/> <action application="sleep" data="5000"/> <action application="echo"/> </condition>
3) inconsistent syntax: limit mux vs flags limit, with or without +
uuid_displace,<uuid> [start|stop] <path> [<limit>] [mux],session displace,mod_commands displace_session: <path> [<flags>] [+time_limit_ms]
I understand fix it might beak backward compatibilities, however, as they go to the same switch_ivr function it would be better if they looks like consistent.
On Sun, Oct 31, 2010 at 11:16 AM, Anthony Minessale <anthony.minessale@gmail.com> wrote:
Lookup displace and uuid_displace
On Oct 30, 2010 8:14 PM, "Seven Du" <dujinfang@gmail.com> wrote:
Hi,
I didn't find a way to playback in background in normal dialplan/lua scripts. I know how to use event socket to do async, but I still think it's useful in the following scenario and don't need a socket.
- start playback in background - long time query (http or db query) - explicitly stop background playback, or implicitly stop when any further app executes(or when new data writes to the channel) - do other things using the query result
Is there any existing solutions? or how hart to make a patch? if I make a patch to achieve that, would it be better to make in mod_commands or should I make a new module?
What I'm thinking is to make a BUG in another thread and feed sound data to the channel. Is that the right approach?
Thanks.
-- Blog: http://www.dujinfang.com Proj: http://www.freeswitch.org.cn
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Blog: http://www.dujinfang.com Proj: http://www.freeswitch.org.cn
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Blog: http://www.dujinfang.com Proj: http://www.freeswitch.org.cn
participants (2)
-
Anthony Minessale
-
Seven Du