If session:ready() becomes false, can't you just exit the script (as you should if it becomes false), and the bridge will be completed? /Peter -----Ursprungligt meddelande----- Från: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] För Michael Lutz Skickat: den 23 mars 2012 11:47 Till: FreeSWITCH Users Help Ämne: Re: [Freeswitch-users] Originate using inbound socket connection Thanks used the &park() and it worked!, except.... It seemed the bridge did not take place while my aleg is inside the lua script. I had to finish the script and the the calls where bridged (even the bridge command was allready send), the weird thing is that while I am still inside the lua script after the uuid_bridge, mys session:ready() immedeately becomes [false] while I am still inside the script. The bridge is now initiated on the non-lua side (ESL Connection). Would be an idea to move that to the Luascript using a session:bridge() however I have no session object of the bleg ... Only way to go there is calling the api to do a uuid_bridge as I know the uuid of the bleg, but by using the uuid_bridge in Lua instead of the session:bridge() would problably lead to the same.... Mike. 2012/3/22 Hector Geraldino <Hector.Geraldino@ipsoft.com>:
So the problem seems to be with the parameters you're using for the uuid_bridge command, not your implementation :)
Can you do a '>show channels' from the fs cli and see what are the uuid's of the active channels in FS? Then use those uuids to perform the uuid_bridge and see what happens.
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Michael Lutz Sent: Wednesday, March 21, 2012 6:05 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Originate using inbound socket connection
Nope, it's the same, it only says OK, but nothing else...
2012/3/21 Hector Geraldino <Hector.Geraldino@ipsoft.com>:
What happens if you try to do the same operation from the fs_cli ?
uuid_bridge legA_uuid legB_uuid
Works on the console and not when you call it from your app?
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Michael Lutz Sent: Wednesday, March 21, 2012 5:20 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Originate using inbound socket connection
Thanks, that worked.
Now my next problem occurs... ;-)
I am trying to bridge these calls to another allready established session in the switch (in a Lua script).
I can reach all data of the newly created session using my created uuid which I specified in the originate.
However, the uuid_bridge does not seem to work. (it says +OK and the the uuid of the bleg) but everything stays silent and no message is being wrtitten to console.
When I check console, I do notice that the new session seems to use a different uuid than I specified, (which seems strange as i can access al sesssion data uusing uuid_ commands...)
string cDialString = "{origination_uuid=" + legb_uuid + ",origination_caller_id_number=" + thisAni + ",origination_caller_id_name=" + thisAniName + "}sofia/external/" + thisDestination + " &park()";
var eslEvent = eslDial.Api("originate", cDialString); dispo = eslDial.Api("uuid_getvar", legb_uuid + " endpoint_disposition").GetBody(); while (eslDial.Api("uuid_exists", thisFrom).GetBody() == "true" && eslDial.Api("uuid_exists", legb_uuid).GetBody() == "true" && dispo != "ANSWER") { .. blabla }
when I am connected I just do a "uuid_bridge <the other uuid> legb_uuid"
I get a response: +OK <legb_uuid>
My console says: New Channel sofia/external/316.......@xxx.xxx.xxx.xxx[7cb13e5d-1dfe-483e-a8da-ec3 a592700c7]
and is a completely different uuid than my legb uuid i specified and use to get to the data......
Any ideas?
Thanks, Mike
2012/3/21 Peter Olsson <peter.olsson@visionutveckling.se>:
You need to put the other end of the call somewhere
The correct string is (example) "originate sofia/gateway/test/1002 &park()"
This will call 1002 and then park the call.
/Peter
-----Ursprungligt meddelande----- Från: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] För Michael Lutz Skickat: den 21 mars 2012 14:49 Till: FreeSWITCH Users Help Ämne: [Freeswitch-users] Originate using inbound socket connection
Hi Guys,
I am working on a .net ESL host (inbound mode) and connect to the ESL using ESLConnection. Now I am trying to originate a call using the ESLConnection.Api() function. But it does't work as expected.
It always returns: === Content-Type: api/response Content-Length: 125 Content-Length: 125
-USAGE: <call url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>] ===
But I am pretty sure my string is right:
{origination_caller_id_number=31341.....,origination_caller_id_name= 31341......}sofia/external/31634258...@xxx.xxx.xxx.xxx
I also tried with double {{ and }} but same result. Even if I take out the whole {} string and just use "sofia/external/etc.." I get the same message back.
My code:
ESLconnection eslDial = new ESLconnection("x.x.x.x", "8021", "x"); if (eslDial.Connected() == ESL_SUCCESS) { // Create a uuid used to identify the b-leg. string legb_uuid = eslDial.Api("create_uuid", "").GetBody(); string cDialString = "{{origination_uuid=" + legb_uuid + ",origination_caller_id_number=" + thisAni + ",origination_caller_id_name=" + thisAniName + "}}sofia/external/" + thisDestination;
// Send the command var eslEvent = eslDial.Api("originate", cDialString);
// Write the result to the console Console.WriteLine(eslEvent.Serialize(string.Empty)); return true; }
Thanks for your help!,
Regards, Michael Lutz
____________________________________________________________________ _____ 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-u sers 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-u sers 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-us ers 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-us ers 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-use rs 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-use rs 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 !DSPAM:4f6c547e32761029518556!