lua session() is blocking...
Hi all, I was trying from a lua script call a remote destination and when it starts ringing i want to bridged it with another destination. The problem is that the freswitch.session is blocking and it only returns when the call is already answer... Is there a way, beside doing it by events, to get the complete status of a session? the lua script: dialstring = "{ignore_early_media=true}loopback/100/outgoing" session = freeswitch.Session(dialstring); -- check if is ringing... uuid = session:getVariable('uuid') state = api:executeString('eval uuid:' .. uuid .. ' ${Channel-Call-State}') mlog.warning(state) while (session:ready() == true) do session:sleep(500) mlog.debug('in session') end
You told it to do exactly that when you said ignore_early_media=true -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH_Wire , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED) On Sep 30, 2013, at 7:31 AM, Antonio Silva <asilva@wirelessmundi.com> wrote:
The problem is that the freswitch.session is blocking and it only returns when the call is already answer...
hum... just try without ignore_early_media=true... same behaviour... then i tried with a minimum FS configuration and it work with and without ignore_early_media=true... so it's a different problem... I'm trying to figure out... but thanks for the tip. Regards, António On Mon, 2013-09-30 at 07:48 -0500, Brian West wrote:
You told it to do exactly that when you said ignore_early_media=true
-- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH_Wire , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Sep 30, 2013, at 7:31 AM, Antonio Silva <asilva@wirelessmundi.com> wrote:
The problem is that the freswitch.session is blocking and it only returns when the call is already answer...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
I found it.. it's always blocking if no media is received... in this case the destination reply with a SIP/180 and the session is waiting for media to continue in the script... I put a pastebin where you can see the output and the lua script, http://pastebin.freeswitch.org/21474 (in my minimum configuration i had the action answer before doing the bridge... my bad...) Regards, António On Mon, 2013-09-30 at 16:14 +0200, Antonio Silva wrote:
hum...
just try without ignore_early_media=true... same behaviour...
then i tried with a minimum FS configuration and it work with and without ignore_early_media=true... so it's a different problem...
I'm trying to figure out... but thanks for the tip.
Regards, António
On Mon, 2013-09-30 at 07:48 -0500, Brian West wrote:
You told it to do exactly that when you said ignore_early_media=true
-- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH_Wire , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Sep 30, 2013, at 7:31 AM, Antonio Silva <asilva@wirelessmundi.com> wrote:
The problem is that the freswitch.session is blocking and it only returns when the call is already answer...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
Yes, this is expected, that's that way it works. /Peter 2013/9/30 Antonio Silva <asilva@wirelessmundi.com>
** I found it..
it's always blocking if no media is received... in this case the destination reply with a SIP/180 and the session is waiting for media to continue in the script...
I put a pastebin where you can see the output and the lua script, http://pastebin.freeswitch.org/21474
(in my minimum configuration i had the action answer before doing the bridge... my bad...)
Regards, António
On Mon, 2013-09-30 at 16:14 +0200, Antonio Silva wrote:
hum...
just try without ignore_early_media=true... same behaviour...
then i tried with a minimum FS configuration and it work with and without ignore_early_media=true... so it's a different problem...
I'm trying to figure out... but thanks for the tip.
Regards, António
On Mon, 2013-09-30 at 07:48 -0500, Brian West wrote:
You told it to do exactly that when you said ignore_early_media=true
-- Brian Westbrian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH_Wire , @briankwesthttp://www.freeswitchbook.comhttp://www.freeswitchcookbook.com
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Sep 30, 2013, at 7:31 AM, Antonio Silva <asilva@wirelessmundi.com> wrote:
The problem is that the freswitch.session is blocking and it only returns when the call is already answer...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
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.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
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
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
Ok... so the only way to trigger a second call from the ringing state is doing it with events... or is there another way? On Tue, 2013-10-01 at 08:38 +0200, Peter Olsson wrote:
Yes, this is expected, that's that way it works.
/Peter
2013/9/30 Antonio Silva <asilva@wirelessmundi.com>
I found it..
it's always blocking if no media is received... in this case the destination reply with a SIP/180 and the session is waiting for media to continue in the script...
I put a pastebin where you can see the output and the lua script, http://pastebin.freeswitch.org/21474
(in my minimum configuration i had the action answer before doing the bridge... my bad...)
Regards, António
On Mon, 2013-09-30 at 16:14 +0200, Antonio Silva wrote:
> hum... > > just try without ignore_early_media=true... same > behaviour... > > then i tried with a minimum FS configuration and it work > with and without ignore_early_media=true... so it's a > different problem... > > I'm trying to figure out... but thanks for the tip. > > > Regards, > António > > > > > On Mon, 2013-09-30 at 07:48 -0500, Brian West wrote: > > > You told it to do exactly that when you said ignore_early_media=true > > > > -- > > Brian West > > brian@freeswitch.org > > FreeSWITCH Solutions, LLC > > PO BOX PO BOX 2531 > > Brookfield, WI 53008-2531 > > Twitter: @FreeSWITCH_Wire , @briankwest > > http://www.freeswitchbook.com > > http://www.freeswitchcookbook.com > > > > T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST > > iNUM: +883 5100 1420 9001 > > ISN: 410*543 > > Skype:briankwest > > PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED) > > > > > > > > > > > > > > > > > > > > > > > > On Sep 30, 2013, at 7:31 AM, Antonio Silva <asilva@wirelessmundi.com> wrote: > > > > > The problem is that the freswitch.session is blocking and it only returns when the call is already answer... > > > > _________________________________________________________________________ > > Professional FreeSWITCH Consulting Services: > > consulting@freeswitch.org > > http://www.freeswitchsolutions.com > > > > FreeSWITCH-powered IP PBX: The CudaTel Communication Server > > http://www.cudatel.com > > > > Official FreeSWITCH Sites > > http://www.freeswitch.org > > http://wiki.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 > > FreeSWITCH-powered IP PBX: The CudaTel Communication Server > http://www.cudatel.com > > Official FreeSWITCH Sites > http://www.freeswitch.org > http://wiki.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
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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 (3)
-
Antonio Silva
-
Brian West
-
Peter Olsson