Unbridge and send to queue
Hello Guys, I receive a call from side A and send it out to side B. I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that? I'm doing everything with lua and I've tried: on my dialplan I have: <action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/> in check_answered-lua, after checking the call was in fact answered I do: session:execute("transfer", "-bleg 9999 XML default"); and on my dialplan I have: <extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE
>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
queue.lua: session:execute("sched_hangup","+50 alloted_timeout"); session:execute("callcenter","agents_queue"); session:execute("sleep",my_dur); But this doesn't seem to work at all... Can anyone give me a hand? thanks! -- DVG
Any ideas? On Dec 23, 2014 5:48 PM, "David Villasmil Govea" <david.villasmil@gmail.com> wrote:
Hello Guys,
I receive a call from side A and send it out to side B. I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that?
I'm doing everything with lua and I've tried:
on my dialplan I have:
<action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/>
in check_answered-lua, after checking the call was in fact answered I do:
session:execute("transfer", "-bleg 9999 XML default");
and on my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE
>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
queue.lua:
session:execute("sched_hangup","+50 alloted_timeout"); session:execute("callcenter","agents_queue");
session:execute("sleep",my_dur);
But this doesn't seem to work at all...
Can anyone give me a hand? thanks!
-- DVG
If you need to un-bridge it as soon as its answered, why not just send it to the right destination in the first place?
On Dec 23, 2014, at 11:48 AM, David Villasmil Govea <david.villasmil@gmail.com> wrote:
Hello Guys,
I receive a call from side A and send it out to side B. I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that?
I'm doing everything with lua and I've tried:
on my dialplan I have:
<action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/>
in check_answered-lua, after checking the call was in fact answered I do:
session:execute("transfer", "-bleg 9999 XML default");
and on my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE >>>>>>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
queue.lua:
session:execute("sched_hangup","+50 alloted_timeout"); session:execute("callcenter","agents_queue");
session:execute("sleep",my_dur);
But this doesn't seem to work at all...
Can anyone give me a hand? thanks!
-- DVG _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hello, Thanks for answering. Not as soon as it is answered, but after doing some checks I do with lua. regards, David On Tue, Dec 23, 2014 at 9:08 PM, Michael Jerris <mike@jerris.com> wrote:
If you need to un-bridge it as soon as its answered, why not just send it to the right destination in the first place?
On Dec 23, 2014, at 11:48 AM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
Hello Guys,
I receive a call from side A and send it out to side B. I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that?
I'm doing everything with lua and I've tried:
on my dialplan I have:
<action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/>
in check_answered-lua, after checking the call was in fact answered I do:
session:execute("transfer", "-bleg 9999 XML default");
and on my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE
>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
queue.lua:
session:execute("sched_hangup","+50 alloted_timeout"); session:execute("callcenter","agents_queue");
session:execute("sleep",my_dur);
But this doesn't seem to work at all...
Can anyone give me a hand? thanks!
-- DVG _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG -- Imagination is more important than knowledge Albert Einstein
can anyone help me out with this? On Tue, Dec 23, 2014 at 5:48 PM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
Hello Guys,
I receive a call from side A and send it out to side B. I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that?
I'm doing everything with lua and I've tried:
on my dialplan I have:
<action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/>
in check_answered-lua, after checking the call was in fact answered I do:
session:execute("transfer", "-bleg 9999 XML default");
and on my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE
>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
queue.lua:
session:execute("sched_hangup","+50 alloted_timeout"); session:execute("callcenter","agents_queue");
session:execute("sleep",my_dur);
But this doesn't seem to work at all...
Can anyone give me a hand? thanks!
-- DVG
-- DVG -- Imagination is more important than knowledge Albert Einstein
Maybe you can set leg b transfer_after_bridge and hang up on leg a. From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of David Villasmil Govea Sent: Wednesday, December 31, 2014 2:41 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Unbridge and send to queue can anyone help me out with this? On Tue, Dec 23, 2014 at 5:48 PM, David Villasmil Govea <david.villasmil@gmail.com <mailto:david.villasmil@gmail.com> > wrote: Hello Guys, I receive a call from side A and send it out to side B. I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that? I'm doing everything with lua and I've tried: on my dialplan I have: <action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/> in check_answered-lua, after checking the call was in fact answered I do: session:execute("transfer", "-bleg 9999 XML default"); and on my dialplan I have: <extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE >>>>>>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension> queue.lua: session:execute("sched_hangup","+50 alloted_timeout"); session:execute("callcenter","agents_queue"); session:execute("sleep",my_dur); But this doesn't seem to work at all... Can anyone give me a hand? thanks! -- DVG -- DVG -- Imagination is more important than knowledge Albert Einstein
Hello, I don't think that would work, I need to launch a lua script before transferring the B-leg. I need to transfer it from the lua script, but session:execute("transfer", "-bleg 9999 XML default"); Doesn't work... On Wed, Dec 31, 2014 at 9:13 PM, Andrew <aademattia@comcast.net> wrote:
Maybe you can set leg b transfer_after_bridge and hang up on leg a.
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *David Villasmil Govea *Sent:* Wednesday, December 31, 2014 2:41 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Unbridge and send to queue
can anyone help me out with this?
On Tue, Dec 23, 2014 at 5:48 PM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
Hello Guys,
I receive a call from side A and send it out to side B. I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that?
I'm doing everything with lua and I've tried:
on my dialplan I have:
<action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/>
in check_answered-lua, after checking the call was in fact answered I do:
session:execute("transfer", "-bleg 9999 XML default");
and on my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE
>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
queue.lua:
session:execute("sched_hangup","+50 alloted_timeout"); session:execute("callcenter","agents_queue");
session:execute("sleep",my_dur);
But this doesn't seem to work at all...
Can anyone give me a hand? thanks!
-- DVG
--
DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG -- Imagination is more important than knowledge Albert Einstein
Can you try doing the execute_on_answer w/o the Lua script? Reason I ask is the items you're executing on the session aren't very special and could simply be done with some dialplan XML. Try doing an execute_extension in your execute_on_answer and have that extension have the sched_hangup, callcenter, and sleep apps. Sometimes adding a dp script (Lua, Perl, etc.) can introduce unanticipated effects. A good rule of thumb is that if you can do it just with XML dialplan you probably should*.* At the very least you should see what happens without the Lua script involved. -Michael On Wed, Dec 31, 2014 at 12:46 PM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
Hello,
I don't think that would work, I need to launch a lua script before transferring the B-leg.
I need to transfer it from the lua script, but
session:execute("transfer", "-bleg 9999 XML default");
Doesn't work...
On Wed, Dec 31, 2014 at 9:13 PM, Andrew <aademattia@comcast.net> wrote:
Maybe you can set leg b transfer_after_bridge and hang up on leg a.
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *David Villasmil Govea *Sent:* Wednesday, December 31, 2014 2:41 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Unbridge and send to queue
can anyone help me out with this?
On Tue, Dec 23, 2014 at 5:48 PM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
Hello Guys,
I receive a call from side A and send it out to side B. I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that?
I'm doing everything with lua and I've tried:
on my dialplan I have:
<action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/>
in check_answered-lua, after checking the call was in fact answered I do:
session:execute("transfer", "-bleg 9999 XML default");
and on my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE
>>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
queue.lua:
session:execute("sched_hangup","+50 alloted_timeout"); session:execute("callcenter","agents_queue");
session:execute("sleep",my_dur);
But this doesn't seem to work at all...
Can anyone give me a hand? thanks!
-- DVG
--
DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hello, Problem is transfer's not working from the lua, and I need to execute a lua script before sending the b-leg to the queue. The whole flow is the following: - Receive from A side - Launch a lua to get a destination number, and send the call to the B-side. - When the call is answered, I launch another lua which make a few checks and set a maximum call duration. Then it needs to send only the b-side to the queue. I do the following: <extension name="wholesale" continue="true"> <condition field="destination_number" expression="^.*$"> <action application="info"/> <action application="set" data="inherit_codec=true"/> <action application="set" data="continue_on_fail=true"/> <action application="set" data="hangup_after_bridge=false"/> <action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/> <action application="lua" data="/usr/local/freeswitch/scripts/script.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </condition> </extension> The luas work fine EXCEPT the transfer. which I execute like: session:execute("sched_hangup","+" .. (my_dur/1000) .. " alloted_timeout"); session:execute("transfer", "-bleg 9999 XML default"); but the transfer doesn't work properly. In my dialplan I have: <extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE
>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
Please give me a hand with this David On Fri, Jan 2, 2015 at 2:06 AM, Michael Collins <msc@freeswitch.org> wrote:
Can you try doing the execute_on_answer w/o the Lua script? Reason I ask is the items you're executing on the session aren't very special and could simply be done with some dialplan XML. Try doing an execute_extension in your execute_on_answer and have that extension have the sched_hangup, callcenter, and sleep apps.
Sometimes adding a dp script (Lua, Perl, etc.) can introduce unanticipated effects. A good rule of thumb is that if you can do it just with XML dialplan you probably should*.* At the very least you should see what happens without the Lua script involved.
-Michael
On Wed, Dec 31, 2014 at 12:46 PM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
Hello,
I don't think that would work, I need to launch a lua script before transferring the B-leg.
I need to transfer it from the lua script, but
session:execute("transfer", "-bleg 9999 XML default");
Doesn't work...
On Wed, Dec 31, 2014 at 9:13 PM, Andrew <aademattia@comcast.net> wrote:
Maybe you can set leg b transfer_after_bridge and hang up on leg a.
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *David Villasmil Govea *Sent:* Wednesday, December 31, 2014 2:41 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Unbridge and send to queue
can anyone help me out with this?
On Tue, Dec 23, 2014 at 5:48 PM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
Hello Guys,
I receive a call from side A and send it out to side B. I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that?
I'm doing everything with lua and I've tried:
on my dialplan I have:
<action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/>
in check_answered-lua, after checking the call was in fact answered I do:
session:execute("transfer", "-bleg 9999 XML default");
and on my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE
>>>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
queue.lua:
session:execute("sched_hangup","+50 alloted_timeout"); session:execute("callcenter","agents_queue");
session:execute("sleep",my_dur);
But this doesn't seem to work at all...
Can anyone give me a hand? thanks!
-- DVG
--
DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG -- Imagination is more important than knowledge Albert Einstein
Can anyone help with this? On Jan 2, 2015 4:51 PM, "David Villasmil Govea" <david.villasmil@gmail.com> wrote:
Hello,
Problem is transfer's not working from the lua, and I need to execute a lua script before sending the b-leg to the queue.
The whole flow is the following:
- Receive from A side - Launch a lua to get a destination number, and send the call to the B-side. - When the call is answered, I launch another lua which make a few checks and set a maximum call duration. Then it needs to send only the b-side to the queue.
I do the following:
<extension name="wholesale" continue="true"> <condition field="destination_number" expression="^.*$"> <action application="info"/> <action application="set" data="inherit_codec=true"/> <action application="set" data="continue_on_fail=true"/> <action application="set" data="hangup_after_bridge=false"/> <action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/> <action application="lua" data="/usr/local/freeswitch/scripts/script.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </condition> </extension>
The luas work fine EXCEPT the transfer. which I execute like:
session:execute("sched_hangup","+" .. (my_dur/1000) .. " alloted_timeout"); session:execute("transfer", "-bleg 9999 XML default");
but the transfer doesn't work properly. In my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE
>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
Please give me a hand with this
David
On Fri, Jan 2, 2015 at 2:06 AM, Michael Collins <msc@freeswitch.org> wrote:
Can you try doing the execute_on_answer w/o the Lua script? Reason I ask is the items you're executing on the session aren't very special and could simply be done with some dialplan XML. Try doing an execute_extension in your execute_on_answer and have that extension have the sched_hangup, callcenter, and sleep apps.
Sometimes adding a dp script (Lua, Perl, etc.) can introduce unanticipated effects. A good rule of thumb is that if you can do it just with XML dialplan you probably should*.* At the very least you should see what happens without the Lua script involved.
-Michael
On Wed, Dec 31, 2014 at 12:46 PM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
Hello,
I don't think that would work, I need to launch a lua script before transferring the B-leg.
I need to transfer it from the lua script, but
session:execute("transfer", "-bleg 9999 XML default");
Doesn't work...
On Wed, Dec 31, 2014 at 9:13 PM, Andrew <aademattia@comcast.net> wrote:
Maybe you can set leg b transfer_after_bridge and hang up on leg a.
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *David Villasmil Govea *Sent:* Wednesday, December 31, 2014 2:41 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Unbridge and send to queue
can anyone help me out with this?
On Tue, Dec 23, 2014 at 5:48 PM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
Hello Guys,
I receive a call from side A and send it out to side B. I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that?
I'm doing everything with lua and I've tried:
on my dialplan I have:
<action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/>
in check_answered-lua, after checking the call was in fact answered I do:
session:execute("transfer", "-bleg 9999 XML default");
and on my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE
>>>>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
queue.lua:
session:execute("sched_hangup","+50 alloted_timeout"); session:execute("callcenter","agents_queue");
session:execute("sleep",my_dur);
But this doesn't seem to work at all...
Can anyone give me a hand? thanks!
-- DVG
--
DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG
-- Imagination is more important than knowledge Albert Einstein
What does "transfer doesn't work properly" means? What happens, now, with the call after the lua script finish executing? -------- Original Message -------- *Subject: *Re: [Freeswitch-users] Unbridge and send to queue *From: *David Villasmil Govea <david.villasmil@gmail.com> *To: *FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Date: *03.01.2015 20:57
Can anyone help with this?
On Jan 2, 2015 4:51 PM, "David Villasmil Govea" <david.villasmil@gmail.com <mailto:david.villasmil@gmail.com>> wrote:
Hello,
Problem is transfer's not working from the lua, and I need to execute a lua script before sending the b-leg to the queue.
The whole flow is the following:
- Receive from A side - Launch a lua to get a destination number, and send the call to the B-side. - When the call is answered, I launch another lua which make a few checks and set a maximum call duration. Then it needs to send only the b-side to the queue.
I do the following:
<extension name="wholesale" continue="true"> <condition field="destination_number" expression="^.*$"> <action application="info"/> <action application="set" data="inherit_codec=true"/> <action application="set" data="continue_on_fail=true"/> <action application="set" data="hangup_after_bridge=false"/> <action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/> <action application="lua" data="/usr/local/freeswitch/scripts/script.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </condition> </extension>
The luas work fine EXCEPT the transfer. which I execute like:
session:execute("sched_hangup","+" .. (my_dur/1000) .. " alloted_timeout"); session:execute("transfer", "-bleg 9999 XML default");
but the transfer doesn't work properly. In my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE >>>>>>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
Please give me a hand with this
David
On Fri, Jan 2, 2015 at 2:06 AM, Michael Collins <msc@freeswitch.org <mailto:msc@freeswitch.org>> wrote:
Can you try doing the execute_on_answer w/o the Lua script? Reason I ask is the items you're executing on the session aren't very special and could simply be done with some dialplan XML. Try doing an execute_extension in your execute_on_answer and have that extension have the sched_hangup, callcenter, and sleep apps.
Sometimes adding a dp script (Lua, Perl, etc.) can introduce unanticipated effects. A good rule of thumb is that if you can do it just with XML dialplan you probably should/./ At the very least you should see what happens without the Lua script involved.
-Michael
On Wed, Dec 31, 2014 at 12:46 PM, David Villasmil Govea <david.villasmil@gmail.com <mailto:david.villasmil@gmail.com>> wrote:
Hello,
I don't think that would work, I need to launch a lua script before transferring the B-leg.
I need to transfer it from the lua script, but
session:execute("transfer", "-bleg 9999 XML default");
Doesn't work...
On Wed, Dec 31, 2014 at 9:13 PM, Andrew <aademattia@comcast.net <mailto:aademattia@comcast.net>> wrote:
Maybe you can set leg b transfer_after_bridgeand hang up on leg a.
*From:*freeswitch-users-bounces@lists.freeswitch.org <mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org <mailto:freeswitch-users-bounces@lists.freeswitch.org>] *On Behalf Of *David Villasmil Govea *Sent:* Wednesday, December 31, 2014 2:41 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Unbridge and send to queue
can anyone help me out with this?
On Tue, Dec 23, 2014 at 5:48 PM, David Villasmil Govea <david.villasmil@gmail.com <mailto:david.villasmil@gmail.com>> wrote:
Hello Guys,
I receive a call from side A and send it out to side B. I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that?
I'm doing everything with lua and I've tried:
on my dialplan I have:
<action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/>
in check_answered-lua, after checking the call was in fact answered I do:
session:execute("transfer", "-bleg 9999 XML default");
and on my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE >>>>>>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
queue.lua:
session:execute("sched_hangup","+50 alloted_timeout"); session:execute("callcenter","agents_queue");
session:execute("sleep",my_dur);
But this doesn't seem to work at all...
Can anyone give me a hand? thanks!
-- DVG
--
DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hello, Fs doesn't transfer the call, script ends and call doesn't end, which is ok, I don't want it to end at the end of the script. But the transfer for some reason is not done, and nothing is shown on the logs. Regards Davjd5 On Jan 3, 2015 3:10 PM, "Bunea Lucian" <lucibunea@gmail.com> wrote:
What does "transfer doesn't work properly" means? What happens, now, with the call after the lua script finish executing?
-------- Original Message -------- *Subject: *Re: [Freeswitch-users] Unbridge and send to queue *From: *David Villasmil Govea <david.villasmil@gmail.com> <david.villasmil@gmail.com> *To: *FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> <freeswitch-users@lists.freeswitch.org> *Date: *03.01.2015 20:57
Can anyone help with this? On Jan 2, 2015 4:51 PM, "David Villasmil Govea" <david.villasmil@gmail.com> wrote:
Hello,
Problem is transfer's not working from the lua, and I need to execute a lua script before sending the b-leg to the queue.
The whole flow is the following:
- Receive from A side - Launch a lua to get a destination number, and send the call to the B-side. - When the call is answered, I launch another lua which make a few checks and set a maximum call duration. Then it needs to send only the b-side to the queue.
I do the following:
<extension name="wholesale" continue="true"> <condition field="destination_number" expression="^.*$"> <action application="info"/> <action application="set" data="inherit_codec=true"/> <action application="set" data="continue_on_fail=true"/> <action application="set" data="hangup_after_bridge=false"/> <action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/> <action application="lua" data="/usr/local/freeswitch/scripts/script.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </condition> </extension>
The luas work fine EXCEPT the transfer. which I execute like:
session:execute("sched_hangup","+" .. (my_dur/1000) .. " alloted_timeout"); session:execute("transfer", "-bleg 9999 XML default");
but the transfer doesn't work properly. In my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE
>>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
Please give me a hand with this
David
On Fri, Jan 2, 2015 at 2:06 AM, Michael Collins <msc@freeswitch.org> wrote:
Can you try doing the execute_on_answer w/o the Lua script? Reason I ask is the items you're executing on the session aren't very special and could simply be done with some dialplan XML. Try doing an execute_extension in your execute_on_answer and have that extension have the sched_hangup, callcenter, and sleep apps.
Sometimes adding a dp script (Lua, Perl, etc.) can introduce unanticipated effects. A good rule of thumb is that if you can do it just with XML dialplan you probably should*.* At the very least you should see what happens without the Lua script involved.
-Michael
On Wed, Dec 31, 2014 at 12:46 PM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
Hello,
I don't think that would work, I need to launch a lua script before transferring the B-leg.
I need to transfer it from the lua script, but
session:execute("transfer", "-bleg 9999 XML default");
Doesn't work...
On Wed, Dec 31, 2014 at 9:13 PM, Andrew <aademattia@comcast.net> wrote:
Maybe you can set leg b transfer_after_bridge and hang up on leg a.
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *David Villasmil Govea *Sent:* Wednesday, December 31, 2014 2:41 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Unbridge and send to queue
can anyone help me out with this?
On Tue, Dec 23, 2014 at 5:48 PM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
Hello Guys,
I receive a call from side A and send it out to side B. I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that?
I'm doing everything with lua and I've tried:
on my dialplan I have:
<action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/>
in check_answered-lua, after checking the call was in fact answered I do:
session:execute("transfer", "-bleg 9999 XML default");
and on my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE
>>>>>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
queue.lua:
session:execute("sched_hangup","+50 alloted_timeout"); session:execute("callcenter","agents_queue");
session:execute("sleep",my_dur);
But this doesn't seem to work at all...
Can anyone give me a hand? thanks!
-- DVG
--
DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.orghttp://www.freeswitchsolutions.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon....
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Does the 9999 extension show up in the default context in fs_cli? The command is "xml_locate dialplan", and should return something like : <section name="dialplan" description="Regex/XML Dialplan"> <context name="default"> [...] <extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE
>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension> [...] </context>
In what context is the wholesale extension defined? The condition field (^.*$) would match your transfer. Maybe you have some other condition set for other extensions that matches your transfer before reaching extension 9999.... Anyway, you are missing a condition field for the 9999 extension... -------- Original Message -------- *Subject: *Re: [Freeswitch-users] Unbridge and send to queue *From: *David Villasmil Govea <david.villasmil@gmail.com> *To: *FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Date: *03.01.2015 22:34
Hello,
Fs doesn't transfer the call, script ends and call doesn't end, which is ok, I don't want it to end at the end of the script. But the transfer for some reason is not done, and nothing is shown on the logs.
Regards
Davjd5
On Jan 3, 2015 3:10 PM, "Bunea Lucian" <lucibunea@gmail.com <mailto:lucibunea@gmail.com>> wrote:
What does "transfer doesn't work properly" means? What happens, now, with the call after the lua script finish executing?
-------- Original Message -------- *Subject: *Re: [Freeswitch-users] Unbridge and send to queue *From: *David Villasmil Govea <david.villasmil@gmail.com> <mailto:david.villasmil@gmail.com> *To: *FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> <mailto:freeswitch-users@lists.freeswitch.org> *Date: *03.01.2015 20:57
Can anyone help with this?
On Jan 2, 2015 4:51 PM, "David Villasmil Govea" <david.villasmil@gmail.com <mailto:david.villasmil@gmail.com>> wrote:
Hello,
Problem is transfer's not working from the lua, and I need to execute a lua script before sending the b-leg to the queue.
The whole flow is the following:
- Receive from A side - Launch a lua to get a destination number, and send the call to the B-side. - When the call is answered, I launch another lua which make a few checks and set a maximum call duration. Then it needs to send only the b-side to the queue.
I do the following:
<extension name="wholesale" continue="true"> <condition field="destination_number" expression="^.*$"> <action application="info"/> <action application="set" data="inherit_codec=true"/> <action application="set" data="continue_on_fail=true"/> <action application="set" data="hangup_after_bridge=false"/> <action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/> <action application="lua" data="/usr/local/freeswitch/scripts/script.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </condition> </extension>
The luas work fine EXCEPT the transfer. which I execute like:
session:execute("sched_hangup","+" .. (my_dur/1000) .. " alloted_timeout"); session:execute("transfer", "-bleg 9999 XML default");
but the transfer doesn't work properly. In my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE >>>>>>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
Please give me a hand with this
David
On Fri, Jan 2, 2015 at 2:06 AM, Michael Collins <msc@freeswitch.org <mailto:msc@freeswitch.org>> wrote:
Can you try doing the execute_on_answer w/o the Lua script? Reason I ask is the items you're executing on the session aren't very special and could simply be done with some dialplan XML. Try doing an execute_extension in your execute_on_answer and have that extension have the sched_hangup, callcenter, and sleep apps.
Sometimes adding a dp script (Lua, Perl, etc.) can introduce unanticipated effects. A good rule of thumb is that if you can do it just with XML dialplan you probably should/./ At the very least you should see what happens without the Lua script involved.
-Michael
On Wed, Dec 31, 2014 at 12:46 PM, David Villasmil Govea <david.villasmil@gmail.com <mailto:david.villasmil@gmail.com>> wrote:
Hello,
I don't think that would work, I need to launch a lua script before transferring the B-leg.
I need to transfer it from the lua script, but
session:execute("transfer", "-bleg 9999 XML default");
Doesn't work...
On Wed, Dec 31, 2014 at 9:13 PM, Andrew <aademattia@comcast.net <mailto:aademattia@comcast.net>> wrote:
Maybe you can set leg b transfer_after_bridgeand hang up on leg a.
*From:*freeswitch-users-bounces@lists.freeswitch.org <mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org <mailto:freeswitch-users-bounces@lists.freeswitch.org>] *On Behalf Of *David Villasmil Govea *Sent:* Wednesday, December 31, 2014 2:41 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Unbridge and send to queue
can anyone help me out with this?
On Tue, Dec 23, 2014 at 5:48 PM, David Villasmil Govea <david.villasmil@gmail.com <mailto:david.villasmil@gmail.com>> wrote:
Hello Guys,
I receive a call from side A and send it out to side B. I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that?
I'm doing everything with lua and I've tried:
on my dialplan I have:
<action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/>
in check_answered-lua, after checking the call was in fact answered I do:
session:execute("transfer", "-bleg 9999 XML default");
and on my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE >>>>>>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
queue.lua:
session:execute("sched_hangup","+50 alloted_timeout"); session:execute("callcenter","agents_queue");
session:execute("sleep",my_dur);
But this doesn't seem to work at all...
Can anyone give me a hand? thanks!
-- DVG
--
DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Good catch! I've been going crazy over this for days and days... I'll fix that... On Jan 3, 2015 4:12 PM, "Bunea Lucian" <lucibunea@gmail.com> wrote:
Does the 9999 extension show up in the default context in fs_cli?
The command is "xml_locate dialplan", and should return something like :
<section name="dialplan" description="Regex/XML Dialplan"> <context name="default"> [...] <extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE
>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension> [...] </context>
In what context is the wholesale extension defined? The condition field ( ^.*$) would match your transfer. Maybe you have some other condition set for other extensions that matches your transfer before reaching extension 9999....
Anyway, you are missing a condition field for the 9999 extension...
-------- Original Message -------- *Subject: *Re: [Freeswitch-users] Unbridge and send to queue *From: *David Villasmil Govea <david.villasmil@gmail.com> <david.villasmil@gmail.com> *To: *FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> <freeswitch-users@lists.freeswitch.org> *Date: *03.01.2015 22:34
Hello,
Fs doesn't transfer the call, script ends and call doesn't end, which is ok, I don't want it to end at the end of the script. But the transfer for some reason is not done, and nothing is shown on the logs.
Regards
Davjd5 On Jan 3, 2015 3:10 PM, "Bunea Lucian" <lucibunea@gmail.com> wrote:
What does "transfer doesn't work properly" means? What happens, now, with the call after the lua script finish executing?
-------- Original Message -------- *Subject: *Re: [Freeswitch-users] Unbridge and send to queue *From: *David Villasmil Govea <david.villasmil@gmail.com> <david.villasmil@gmail.com> *To: *FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> <freeswitch-users@lists.freeswitch.org> *Date: *03.01.2015 20:57
Can anyone help with this? On Jan 2, 2015 4:51 PM, "David Villasmil Govea" < david.villasmil@gmail.com> wrote:
Hello,
Problem is transfer's not working from the lua, and I need to execute a lua script before sending the b-leg to the queue.
The whole flow is the following:
- Receive from A side - Launch a lua to get a destination number, and send the call to the B-side. - When the call is answered, I launch another lua which make a few checks and set a maximum call duration. Then it needs to send only the b-side to the queue.
I do the following:
<extension name="wholesale" continue="true"> <condition field="destination_number" expression="^.*$"> <action application="info"/> <action application="set" data="inherit_codec=true"/> <action application="set" data="continue_on_fail=true"/> <action application="set" data="hangup_after_bridge=false"/> <action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/> <action application="lua" data="/usr/local/freeswitch/scripts/script.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </condition> </extension>
The luas work fine EXCEPT the transfer. which I execute like:
session:execute("sched_hangup","+" .. (my_dur/1000) .. " alloted_timeout"); session:execute("transfer", "-bleg 9999 XML default");
but the transfer doesn't work properly. In my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE
>>>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
Please give me a hand with this
David
On Fri, Jan 2, 2015 at 2:06 AM, Michael Collins <msc@freeswitch.org> wrote:
Can you try doing the execute_on_answer w/o the Lua script? Reason I ask is the items you're executing on the session aren't very special and could simply be done with some dialplan XML. Try doing an execute_extension in your execute_on_answer and have that extension have the sched_hangup, callcenter, and sleep apps.
Sometimes adding a dp script (Lua, Perl, etc.) can introduce unanticipated effects. A good rule of thumb is that if you can do it just with XML dialplan you probably should*.* At the very least you should see what happens without the Lua script involved.
-Michael
On Wed, Dec 31, 2014 at 12:46 PM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
Hello,
I don't think that would work, I need to launch a lua script before transferring the B-leg.
I need to transfer it from the lua script, but
session:execute("transfer", "-bleg 9999 XML default");
Doesn't work...
On Wed, Dec 31, 2014 at 9:13 PM, Andrew <aademattia@comcast.net> wrote:
Maybe you can set leg b transfer_after_bridge and hang up on leg a.
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *David Villasmil Govea *Sent:* Wednesday, December 31, 2014 2:41 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Unbridge and send to queue
can anyone help me out with this?
On Tue, Dec 23, 2014 at 5:48 PM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
Hello Guys,
I receive a call from side A and send it out to side B. I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that?
I'm doing everything with lua and I've tried:
on my dialplan I have:
<action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/>
in check_answered-lua, after checking the call was in fact answered I do:
session:execute("transfer", "-bleg 9999 XML default");
and on my dialplan I have:
<extension name="9999"> <action application="log" data="INFO SENDING CALL TO QUEUE >>>>>>>>>>>>>>>>>>"/> <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/> <action application="hangup" data="NORMAL_CLEARING"/> </extension>
queue.lua:
session:execute("sched_hangup","+50 alloted_timeout"); session:execute("callcenter","agents_queue");
session:execute("sleep",my_dur);
But this doesn't seem to work at all...
Can anyone give me a hand? thanks!
-- DVG
--
DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.orghttp://www.freeswitchsolutions.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon....
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.orghttp://www.freeswitchsolutions.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon....
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (5)
-
Andrew
-
Bunea Lucian
-
David Villasmil Govea
-
Michael Collins
-
Michael Jerris