[Freeswitch-users] Originate using inbound socket connection
Hector Geraldino
Hector.Geraldino at ipsoft.com
Thu Mar 22 00:34:32 MSK 2012
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 at lists.freeswitch.org [mailto:freeswitch-users-bounces at 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....... at xxx.xxx.xxx.xxx[7cb13e5d-1dfe-483e-a8da-ec3a592700c7]
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 at 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 at lists.freeswitch.org [mailto:freeswitch-users-bounces at 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... at 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 at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at 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:4f69dabc32766734014540!
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at 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 at freeswitch.org
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list