[Freeswitch-users] ESL originate retreiving dialresult.

Wesley Akio wesleyakio at tuntscorp.com
Thu Apr 12 18:41:29 MSD 2012


I guess what peter means is
http://wiki.freeswitch.org/wiki/Event_Socket#event, but I might be wrong.

Best,

Wesley Akio
TuntsCorp.com


On Thu, Apr 12, 2012 at 11:24 AM, Michael Lutz <mytemike72 at gmail.com> wrote:

> Peter, I know, I am doing this allready, that is how I check the
> disposition while dialing already, I am using uuid_getvar to reach it.****
>
> The problem is, that when it is not answered, ie Busy or congestion, the
> session is killed by the core and no longer exists.****
>
> So when it stops, I cannot do a uuid_getvar anymore as the session no
> longer exists.****
>
> ** **
>
> string cDialString = "{origination_uuid=" + thisDial.CallId_LegB // This
> my generated uuid****
>
> + ",origination_caller_id_number=" + thisDial.CLIP****
>
> + ",origination_caller_id_name=" + thisDial.CLIP****
>
> + "}sofia/external/" + thisExtension.Destination+'@'+ thisDial.Gateway****
>
> + " &park()";****
>
> ** **
>
> var eslEvent = thisFSConnection.Connection.Api("originate", cDialString);*
> ***
>
> dispo = thisFSConnection.Connection.Api("uuid_getvar",
> thisDial.CallId_LegB + " endpoint_disposition").GetBody();****
>
> ** **
>
> Stopwatch dialTimeout = new Stopwatch();****
>
> dialTimeout.Start();****
>
> while (CallIdExists(thisFSConnection, thisCall.callId) &&
> CallIdExists(thisFSConnection, thisDial.CallId_LegB) && dispo == "EARLY
> MEDIA" && dialTimeout.ElapsedMilliseconds <
> thisDial.DialAttemptDuration*1000 )****
>
> {****
>
> if (dispo != dispoLast)****
>
> {****
>
> dispoLast = dispo;****
>
> }****
>
> dispo = thisFSConnection.Connection.Api("uuid_getvar",
> thisDial.CallId_LegB + " endpoint_disposition").GetBody();****
>
> Thread.Sleep(100);****
>
> }****
>
> dialTimeout.Stop();****
>
> dispo = thisFSConnection.Connection.Api("uuid_getvar",
> thisDial.CallId_LegB + " endpoint_disposition").GetBody();****
>
> ** **
>
> if (dispo == "ANSWER")****
>
> ** **
>
> The last dispo is never filled correctly, because the session no longer
> exist, unless it was answered…****
>
> ** **
>
> Thanks,****
>
> Mike.****
>
> ** **
>
> ** **
>
> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
> freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of *Peter Olsson
> *Sent:* donderdag 12 april 2012 11:34
>
> *To:* 'FreeSWITCH Users Help'
> *Subject:* Re: [Freeswitch-users] ESL originate retreiving dialresult.****
>
> ** **
>
> If you’re already creating a uuid manually thats just fine (no, you can
> not use the same uuid for two channels). Now you just need to parse the
> events for that channel when you start the originate. As soon as the
> originate does any progress events will report this, using the uuid that
> you have defined.****
>
>  ****
>
> /Peter****
>
>  ****
>
> *Från:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
> freeswitch-users-bounces at lists.freeswitch.org] *För *Michael Lutz
> *Skickat:* den 12 april 2012 10:41
> *Till:* 'FreeSWITCH Users Help'
> *Ämne:* Re: [Freeswitch-users] ESL originate retreiving dialresult.****
>
>  ****
>
> I am allready using the origination_uuid and pass it with the originate
> command. I only create one now by using the create_uuid function.****
>
>  ****
>
> So you say, don’t create a new one and just use one of a session that
> already exists and is in progress? (so actually the session that is
> ‘connected’ to the inbound ESL session?  The originate/or system would not
> have a problem with that? I would be setting up two calls wioth the same
> UUID … and how would my other uuid functions respond to that? I can assume
> a uuid kill would suddenly kill two legs?****
>
>  ****
>
> Thanks,****
>
> Mike.****
>
>  ****
>
>  ****
>
> *From:* freeswitch-users-bounces at lists.freeswitch.org
> [mailto:freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of *Peter
> Olsson
> *Sent:* donderdag 12 april 2012 10:26
> *To:* 'FreeSWITCH Users Help'
> *Subject:* Re: [Freeswitch-users] ESL originate retreiving dialresult.****
>
>  ****
>
> Use the variable “origination_uuid”, and set to an uuid that you know.
> Then it’s possible to detect the events showing up for this channel uuid.*
> ***
>
>  ****
>
> /Peter****
>
>  ****
>
>  ****
>
> *Från:* freeswitch-users-bounces at lists.freeswitch.org
> [mailto:freeswitch-users-bounces at lists.freeswitch.org] *För *Michael Lutz
> *Skickat:* den 12 april 2012 10:11
> *Till:* 'FreeSWITCH Users Help'
> *Ämne:* [Freeswitch-users] ESL originate retreiving dialresult.****
>
>  ****
>
> Hi Guys,****
>
>  ****
>
> I am in an urgent matter an need help with something, I am using an ESL
> inbound connection to setup a new call.****
>
> It works fine on successful answered calls.****
>
>  ****
>
> I am using the uuid_getvar api function whilst dialing to get the
> endpoint_disposition of the dialing uuid to check when a call is answered.
> ****
>
> So when it’s answered it will return “ANSWER”.****
>
>  ****
>
> The problem with this is that if an attempt fails, the endpoint
> disposition cannot be read with the uuid_getvar function because the
> dialing session is already gone.****
>
>  ****
>
> What is the best way to get the result in realtime?, I really need to know
> the reason it failed.****
>
>  ****
>
>  ****
>
> Thanks for your help,****
>
> Mike.****
>
>  ****
>
> !DSPAM:4f8694bf32762366476345! ****
>
> _________________________________________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120412/11813184/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list