[Freeswitch-users] ESL code question
Anthony Minessale
anthony.minessale at gmail.com
Thu Apr 19 20:45:14 MSD 2012
when you supply pStrNewUUID as the 3rd arg to bgapi() you are
submitting it to be a manually specified job-uuid if you left it blank
a random one would be chosen.
ESLevent *ESLconnection::bgapi(const char *cmd, const char *arg, const
char *job_uuid)
On Thu, Apr 19, 2012 at 1:09 AM, Peter Olsson
<peter.olsson at visionutveckling.se> wrote:
> In this case yes, since you're sending the first uuid as the argument to bgapi. Try to send an empty string as the last argument for bgapi.
>
> /Peter
>
> 19 apr 2012 kl. 07:44 skrev "Malay Thakershi" <mthakershi at gmail.com<mailto:mthakershi at gmail.com>>:
>
> I checked. I get same UUID.
>
> ---------------
> //obtain new UUID from server
> string pStrNewUUID = pObjEslConn.Api("create_uuid", null).GetBody();
>
> ESLevent pObjESLEvOriginate = null;
> pObjESLEvOriginate =
> pObjEslConn.Bgapi(
> "originate",
> "{" +
> "origination_uuid=" + pStrNewUUID + "," +
> "ignore_early_media=true,origination_caller_id_name=..}sofia/gateway/v/1" + aStrPhNo + " 1056 XML default",
> pStrNewUUID);
>
> //if this remains the same, then no need to have this logic
> string pStrJobUUID = pObjESLEvOriginate.GetHeader("Job-UUID", -1);
> ---------------
>
> At this point, pStrJobUUID and pStrNewUUID are the same value.
>
> Is this normal?
>
> Thanks.
>
> Malay
>
> On Wed, Apr 18, 2012 at 12:43 AM, Peter Olsson <peter.olsson at visionutveckling.se<mailto:peter.olsson at visionutveckling.se>> wrote:
> Seems strange. These must be two different values. The first uuid is generated for the actual call, the second is a uuid to help you keep track of the background job. Are you sure they are the same, and not just very similar?
>
> /Peter
>
> 18 apr 2012 kl. 06:58 skrev "Malay Thakershi" <mthakershi at gmail.com<mailto:mthakershi at gmail.com><mailto:mthakershi at gmail.com<mailto:mthakershi at gmail.com>>>:
>
> I am using exact same code as given here: http://wiki.freeswitch.org/wiki/Esl#Examples
>
> bgapi to invoke "originate"
>
> Thanks.
>
> Malay
>
> On Tue, Apr 17, 2012 at 6:54 PM, Avi Marcus <avi at avimarcus.net<mailto:avi at avimarcus.net><mailto:avi at avimarcus.net<mailto:avi at avimarcus.net>>> wrote:
> Are you using the same bgapi or just a plain API?
> -Avi
>
>
> On Wed, Apr 18, 2012 at 2:30 AM, Malay Thakershi <mthakershi at gmail.com<mailto:mthakershi at gmail.com><mailto:mthakershi at gmail.com<mailto:mthakershi at gmail.com>>> wrote:
> Hello,
>
> Here is a code snippet from ESL example in wiki. http://wiki.freeswitch.org/wiki/Esl#Examples
>
> my $uuid = $con->api("create_uuid")->getBody();
> my $res =
> $con->bgapi("originate","{origination_uuid=$uuid}$target 9664");
> my $job_uuid = $res->getHeader("Job-UUID");
>
> I use same code but in ManagedELS. But, I always get uuid and job_uuid same value.
>
> My question is, if it is same value then is it necessary to get job_uuid from res?
>
> Thanks.
>
> Malay Thakershi
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org<mailto:consulting at freeswitch.org><mailto:consulting at freeswitch.org<mailto: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<mailto:FreeSWITCH-users at lists.freeswitch.org><mailto:FreeSWITCH-users at lists.freeswitch.org<mailto: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<mailto:consulting at freeswitch.org><mailto:consulting at freeswitch.org<mailto: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<mailto:FreeSWITCH-users at lists.freeswitch.org><mailto:FreeSWITCH-users at lists.freeswitch.org<mailto: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<mailto:consulting at freeswitch.org><mailto:consulting at freeswitch.org<mailto: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<mailto:FreeSWITCH-users at lists.freeswitch.org><mailto:FreeSWITCH-users at lists.freeswitch.org<mailto: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:4f8e476532761383613141!
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org<mailto: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<mailto: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:4f8fa39e32762076332727!
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org<mailto: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<mailto: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:4f8fa39e32762076332727!
>
> _________________________________________________________________________
> 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
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list