<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Is there a way to&nbsp;explicitly&nbsp;set&nbsp;synchronous mode?<div>I am just running such commands as shown previously and I think it is already in sync mode.</div><div><br></div><div>Thanks<br><br>&gt; From: peter.olsson@visionutveckling.se<br>&gt; To: freeswitch-users@lists.freeswitch.org<br>&gt; Date: Tue, 10 Aug 2010 21:00:31 +0200<br>&gt; Subject: Re: [Freeswitch-users] [freeswitch-users] play_and_get_digits is not blocking<br>&gt; <br>&gt; Sorry - I meant synchronous mode...<br>&gt; <br>&gt; sync mode waits for the command to complete. async mode returns imediately and you will have to wait for the right event to show up.<br>&gt; <br>&gt; /Peter<br>&gt; ________________________________________<br>&gt; Från: freeswitch-users-bounces@lists.freeswitch.org [freeswitch-users-bounces@lists.freeswitch.org] f&amp;#246;r Peter Olsson [peter.olsson@visionutveckling.se]<br>&gt; Skickat: den 10 augusti 2010 20:44<br>&gt; Till: FreeSWITCH Users Help<br>&gt; Ämne: Re: [Freeswitch-users] [freeswitch-users] play_and_get_digits is not blocking<br>&gt; <br>&gt; Are you using sockets in asynchronous mode? If not, execute() will just queue up to the internal queue and then return imediately. In that case you will need to get the event when the execution has actually been done.<br>&gt; <br>&gt; /Peter<br>&gt; ________________________________________<br>&gt; Från: freeswitch-users-bounces@lists.freeswitch.org [freeswitch-users-bounces@lists.freeswitch.org] f&amp;#246;r Paulo Vicentini [vizentini@hotmail.com]<br>&gt; Skickat: den 10 augusti 2010 20:07<br>&gt; Till: freeswitch-users@lists.freeswitch.org<br>&gt; Ämne: Re: [Freeswitch-users] [freeswitch-users] play_and_get_digits is not blocking<br>&gt; <br>&gt; Hi,<br>&gt; Basically:<br>&gt; con.api("originate" ,"{ignore_early_media=true,absolute_codec_string=\'PCMA\'}sofia/test/phone@IP  &amp;park ");<br>&gt; con.execute("play_and_get_digits", "3 5 3 5000 # welcome.wav sorry.wav myDigits \\d+",uuid);<br>&gt; and then uuid_getvar uuid myDigits<br>&gt; <br>&gt; But con.execute("<br>&gt; play_and_get_digits"  is not blocking so that I can't grab<br>&gt; myDigits.<br>&gt; I put a  breakpoint at switch_play_and_get_digits (session=0x90d5c18, min_digits=3,.. nevertheless con.execute("play_and_get_digits" returned and with extra debugging I realized that switch_api_execute (cmd=0xb76e2b5c "uuid_getvar"...happens before than<br>&gt; #3  0x00cf2d08 in switch_core_session_execute_application_get_flags (<br>&gt;     session=0xb76b5530, app=0xb76793b0 "play_and_get_digits",<br>&gt;     arg=0xb764ef68 "3 15 3 5000 # ivr-enter_ext_pound.wav sorry.wav myDigits \\d+", flags=0x0) at src/switch_core_session.c:1780<br>&gt; #4  0x00d43d73 in switch_ivr_parse_event (session=0xb76b5530, event=0xb7652198)<br>&gt; <br>&gt; So that it seems a kind of race condition between ESL and the<br>&gt; core<br>&gt; core event system<br>&gt; <br>&gt; PV<br>&gt; <br>&gt; ________________________________<br>&gt; Date: Mon, 9 Aug 2010 17:42:42 -0700<br>&gt; From: msc@freeswitch.org<br>&gt; To: freeswitch-users@lists.freeswitch.org<br>&gt; Subject: Re: [Freeswitch-users] [freeswitch-users] play_and_get_digits is not blocking<br>&gt; <br>&gt; <br>&gt; <br>&gt; On Mon, Aug 9, 2010 at 5:24 PM, Paulo Vicentini &lt;vizentini@hotmail.com&lt;mailto:vizentini@hotmail.com&gt;&gt; wrote:<br>&gt; Hi, With ESL: this-&gt;execute ( 'play_and_get_digits',... $var .. $digits = $this-&gt;api_uuid_getvar ( $uuid, $var );<br>&gt; <br>&gt; Paste your entire script, or at least a simple example that demonstrates the issue so that we can try it ourselves. Personally, I've not experienced this issue so I would like to know more about the circumstances where you're seeing this.<br>&gt; -MC<br>&gt; <br>&gt; <br>&gt; _______________________________________________ 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<br>&gt; <br>&gt; <br>&gt; _______________________________________________<br>&gt; FreeSWITCH-users mailing list<br>&gt; FreeSWITCH-users@lists.freeswitch.org<br>&gt; http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>&gt; UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>&gt; http://www.freeswitch.org<br>&gt; <br>&gt; !DSPAM:4c619f6232936662915155!<br>&gt; <br>&gt; <br>&gt; _______________________________________________<br>&gt; FreeSWITCH-users mailing list<br>&gt; FreeSWITCH-users@lists.freeswitch.org<br>&gt; http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>&gt; UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>&gt; http://www.freeswitch.org<br></div>                                               </body>
</html>