Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] LUA: Independent control of each call leg.


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
msc at freeswitch.org
Guest





PostPosted: Fri Jul 31, 2009 1:59 pm    Post subject: [Freeswitch-users] LUA: Independent control of each call leg Reply with quote

The level of control you need really isn't served by doing scripting from the dialplan. I highly recommend using ESL and the event socket. It will mean a bit of a paradigm shift in your coding, but with that shift comes a lot of power and control over what you can do with the calls - really limited only by your imagination.

-MC

On Fri, Jul 31, 2009 at 8:01 AM, peely <freeswitch@peely.com (freeswitch@peely.com)> wrote:
Quote:

Hi,

I'm trying to develop an application using lua and need to control the
inbound and outbound legs independently, even when they are switched
together.

I can initiate the outbound session but I can't seem to bridge without
losing control of the script.

For example, if I use:


       local api = freeswitch.API();
       inSession = session;
       inSession:answer();
       inSession:setAutoHangup(false);


       egSession = freeswitch.Session("sofia/default/mynum@mydomain.com (mynum@mydomain.com)");
       egSession:setAutoHangup(false);

       if egSession:ready() then
               api:execute("uuid_bridge",inSession.uuid .. " " .. egSession.uuid);
       end

       while egSession:ready() do
               inSession:sleep(1000);
       end

Then I lose the script entirely, and if I use:

       inSession:execute("bridge", "sofia/default/mynum@mydomain.com (mynum@mydomain.com)")

Then I lose the ability to control the call whilst the outbound is in
progress.

Does anyone know a way I can allow ingress to egress calling whilst still
maintaining script control mid-call? I also need to ingress to hear
provisional speech during outbound connect. I've looked at conferencing but
there seems to be quite a lot of automated messaging.



Thanks,


Neil.

--
View this message in context: http://www.nabble.com/LUA%3A-Independent-control-of-each-call-leg.-tp24744087p24744087.html
Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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
Back to top
freeswitch at peely.com
Guest





PostPosted: Sat Aug 01, 2009 5:48 am    Post subject: [Freeswitch-users] LUA: Independent control of each call leg Reply with quote

Hi,

Thanks for your response. It's a real shame I can't get the async behavior I
want from Freeswitch/LUA as this is exactly the kind of abstraction layer I
hoped for in a SIP Application Server.

Most of the apps I want to develop would be served using the LUA environment
as-is but if a few scenarios I want to be able to perform a small amount of
activity whilst both legs are in a connected state, a prime example is a
b-leg "whisper" where you are still playing "ringing" to the a-party while
the b-party answers and hears a message just before connection to the
a-party.

Regards,


Neil.



mercutioviz wrote:
Quote:

The level of control you need really isn't served by doing scripting from
the dialplan. I highly recommend using ESL and the event socket. It will
mean a bit of a paradigm shift in your coding, but with that shift comes a
lot of power and control over what you can do with the calls - really
limited only by your imagination.

-MC

On Fri, Jul 31, 2009 at 8:01 AM, peely <freeswitch@peely.com> wrote:

Quote:

Hi,

I'm trying to develop an application using lua and need to control the
inbound and outbound legs independently, even when they are switched
together.

I can initiate the outbound session but I can't seem to bridge without
losing control of the script.

Does anyone know a way I can allow ingress to egress calling whilst still
maintaining script control mid-call? I also need to ingress to hear
provisional speech during outbound connect. I've looked at conferencing
but
there seems to be quite a lot of automated messaging.



Thanks,


Neil.





--
View this message in context: http://www.nabble.com/LUA%3A-Independent-control-of-each-call-leg.-tp24744087p24767998.html
Sent from the Freeswitch-users mailing list archive at Nabble.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
Back to top
brian at freeswitch.org
Guest





PostPosted: Sat Aug 01, 2009 11:13 am    Post subject: [Freeswitch-users] LUA: Independent control of each call leg Reply with quote

You can do all this via ESL-Lua cd libs/esl; make luamod

/b

On Aug 1, 2009, at 5:36 AM, peely wrote:

Quote:

Hi,

Thanks for your response. It's a real shame I can't get the async
behavior I
want from Freeswitch/LUA as this is exactly the kind of abstraction
layer I
hoped for in a SIP Application Server.

Most of the apps I want to develop would be served using the LUA
environment
as-is but if a few scenarios I want to be able to perform a small
amount of
activity whilst both legs are in a connected state, a prime example
is a
b-leg "whisper" where you are still playing "ringing" to the a-party
while
the b-party answers and hears a message just before connection to the
a-party.

Regards,


Neil.


_______________________________________________
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
Back to top
pjintheusa at gmail.com
Guest





PostPosted: Sat Aug 01, 2009 2:46 pm    Post subject: [Freeswitch-users] LUA: Independent control of each call leg Reply with quote

Quote:
Quote:
a prime example is a b-leg "whisper" where you are still playing "ringing" to the a-party while
the b-party answers and hears a message just before connection to the
a-party.

You should be able to do this particular function using group_confirm. See this page in the wiki.

http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate#exec_in_answer_confirm

In your case the test.js would contain the whisper. Note that you can send args to this script.


On Fri, Jul 31, 2009 at 11:01 AM, peely <freeswitch@peely.com (freeswitch@peely.com)> wrote:
Quote:

Hi,

I'm trying to develop an application using lua and need to control the
inbound and outbound legs independently, even when they are switched
together.

I can initiate the outbound session but I can't seem to bridge without
losing control of the script.

For example, if I use:


       local api = freeswitch.API();
       inSession = session;
       inSession:answer();
       inSession:setAutoHangup(false);


       egSession = freeswitch.Session("sofia/default/mynum@mydomain.com (mynum@mydomain.com)");
       egSession:setAutoHangup(false);

       if egSession:ready() then
               api:execute("uuid_bridge",inSession.uuid .. " " .. egSession.uuid);
       end

       while egSession:ready() do
               inSession:sleep(1000);
       end

Then I lose the script entirely, and if I use:

       inSession:execute("bridge", "sofia/default/mynum@mydomain.com (mynum@mydomain.com)")

Then I lose the ability to control the call whilst the outbound is in
progress.

Does anyone know a way I can allow ingress to egress calling whilst still
maintaining script control mid-call? I also need to ingress to hear
provisional speech during outbound connect. I've looked at conferencing but
there seems to be quite a lot of automated messaging.



Thanks,


Neil.

--
View this message in context: http://www.nabble.com/LUA%3A-Independent-control-of-each-call-leg.-tp24744087p24744087.html
Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services