I guess what peter means is
<a href="http://wiki.freeswitch.org/wiki/Event_Socket#event">http://wiki.freeswitch.org/wiki/Event_Socket#event</a>, but I might be wrong.<div><br></div><div>Best,</div><div><br clear="all">Wesley Akio<br>TuntsCorp.com<br>
<br><br><div class="gmail_quote">On Thu, Apr 12, 2012 at 11:24 AM, Michael Lutz <span dir="ltr"><<a href="mailto:mytemike72@gmail.com">mytemike72@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="NL" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US" style="color:#1f497d">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1f497d">The problem is, that when it is not answered, ie Busy or congestion, the session is killed by the core and no longer exists.<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US" style="color:#1f497d">So when it stops, I cannot do a uuid_getvar anymore as the session no longer exists.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue">string</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> cDialString = <span style="color:#a31515">"{origination_uuid="</span> + thisDial.CallId_LegB // This my generated uuid<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:35.4pt;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">+ <span style="color:#a31515">",origination_caller_id_number="</span> + thisDial.CLIP<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:35.4pt;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">+ <span style="color:#a31515">",origination_caller_id_name="</span> + thisDial.CLIP<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:35.4pt;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">+ <span style="color:#a31515">"}sofia/external/"</span> + thisExtension.Destination+<span style="color:#a31515">'@'</span>+ thisDial.Gateway<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:35.4pt;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">+ <span style="color:#a31515">" &park()"</span>;<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue">var</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> eslEvent = thisFSConnection.Connection.Api(<span style="color:#a31515">"originate"</span>, cDialString);<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">dispo = thisFSConnection.Connection.Api(<span style="color:#a31515">"uuid_getvar"</span>, thisDial.CallId_LegB + <span style="color:#a31515">" endpoint_disposition"</span>).GetBody();<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2b91af">Stopwatch</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> dialTimeout = <span style="color:blue">new</span> <span style="color:#2b91af">Stopwatch</span>();<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">dialTimeout.Start();<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue">while</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> (CallIdExists(thisFSConnection, thisCall.callId) && CallIdExists(thisFSConnection, thisDial.CallId_LegB) && dispo == <span style="color:#a31515">"EARLY MEDIA"</span> && dialTimeout.ElapsedMilliseconds < thisDial.DialAttemptDuration*1000 )<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">{<u></u><u></u></span></p><p class="MsoNormal" style="text-indent:35.4pt;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue">if</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> (dispo != dispoLast)<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:35.4pt;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">{<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:35.4pt;text-indent:35.4pt;text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">dispoLast = dispo;<u></u><u></u></span></p><p class="MsoNormal" style="text-indent:35.4pt;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">}<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:35.4pt;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">dispo = thisFSConnection.Connection.Api(<span style="color:#a31515">"uuid_getvar"</span>, thisDial.CallId_LegB + <span style="color:#a31515">" endpoint_disposition"</span>).GetBody();<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:35.4pt;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2b91af">Thread</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">.Sleep(100);<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">}<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">dialTimeout.Stop();<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">dispo = thisFSConnection.Connection.Api(<span style="color:#a31515">"uuid_getvar"</span>, thisDial.CallId_LegB + <span style="color:#a31515">" endpoint_disposition"</span>).GetBody();<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue">if</span><span style="font-size:9.5pt;font-family:Consolas"> (dispo == <span style="color:#a31515">"ANSWER"</span>)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1f497d">The last dispo is never filled correctly, because the session no longer exist, unless it was answered…<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1f497d">Thanks,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1f497d">Mike.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1f497d"><u></u> <u></u></span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b>On Behalf Of </b>Peter Olsson<br>
<b>Sent:</b> donderdag 12 april 2012 11:34</span></p><div><div class="h5"><br><b>To:</b> 'FreeSWITCH Users Help'<br><b>Subject:</b> Re: [Freeswitch-users] ESL originate retreiving dialresult.<u></u><u></u></div></div>
<p></p></div></div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1f497d">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.</span><span lang="SV"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1f497d"> </span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1f497d">/Peter</span><span lang="SV"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="SV" style="font-size:10.0pt;color:#1f497d"> </span><span lang="SV"><u></u><u></u></span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal">
<b><span lang="SV" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Från:</span></b><span lang="SV" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b>För </b>Michael Lutz<br>
<b>Skickat:</b> den 12 april 2012 10:41<br><b>Till:</b> 'FreeSWITCH Users Help'<br><b>Ämne:</b> Re: [Freeswitch-users] ESL originate retreiving dialresult.</span><span lang="SV"><u></u><u></u></span></p></div></div>
<p class="MsoNormal"><span lang="SV"> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1f497d">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.</span><span lang="SV"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1f497d"> </span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1f497d">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?</span><span lang="SV"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1f497d"> </span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1f497d">Thanks,</span><span lang="SV"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1f497d">Mike.</span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1f497d"> </span><span lang="SV"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1f497d"> </span><span lang="SV"><u></u><u></u></span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> <a href="mailto:[mailto:freeswitch-users-bounces@lists.freeswitch.org]" target="_blank">[mailto:freeswitch-users-bounces@lists.freeswitch.org]</a> <b>On Behalf Of </b>Peter Olsson<br>
<b>Sent:</b> donderdag 12 april 2012 10:26<br><b>To:</b> 'FreeSWITCH Users Help'<br><b>Subject:</b> Re: [Freeswitch-users] ESL originate retreiving dialresult.</span><span lang="SV"><u></u><u></u></span></p></div>
</div><p class="MsoNormal"><span lang="EN-US"> </span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1f497d">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.</span><span lang="SV"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1f497d"> </span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1f497d">/Peter</span><span lang="SV"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1f497d"> </span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1f497d"> </span><span lang="SV"><u></u><u></u></span></p>
<div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="SV" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Från:</span></b><span lang="SV" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> <a href="mailto:[mailto:freeswitch-users-bounces@lists.freeswitch.org]" target="_blank">[mailto:freeswitch-users-bounces@lists.freeswitch.org]</a> <b>För </b>Michael Lutz<br>
<b>Skickat:</b> den 12 april 2012 10:11<br><b>Till:</b> 'FreeSWITCH Users Help'<br><b>Ämne:</b> [Freeswitch-users] ESL originate retreiving dialresult.</span><span lang="SV"><u></u><u></u></span></p></div></div><p class="MsoNormal">
<span lang="SV"> <u></u><u></u></span></p><p class="MsoNormal">Hi Guys,<span lang="SV"><u></u><u></u></span></p><p class="MsoNormal"> <span lang="SV"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">I am in an urgent matter an need help with something, I am using an ESL inbound connection to setup a new call.</span><span lang="SV"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">It works fine on successful answered calls.</span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> </span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US">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.</span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US">So when it’s answered it will return “ANSWER”.</span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> </span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US">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.</span><span lang="SV"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> </span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">What is the best way to get the result in realtime?, I really need to know the reason it failed.</span><span lang="SV"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> </span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> </span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Thanks for your help,</span><span lang="SV"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Mike.</span><span lang="SV"><u></u><u></u></span></p><p class="MsoNormal"><span lang="SV"> <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">!DSPAM:4f8694bf32762366476345! </span><span lang="SV"><u></u><u></u></span></p>
</div></div></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>