[Freeswitch-users] [freeswitch-users] play_and_get_digits is not blocking

Peter Olsson peter.olsson at visionutveckling.se
Tue Aug 10 12:57:19 PDT 2010


In outbound mode it's default sync mode. In inbound mode it's always async, and you will need to handle events.

/Peter

----- Reply message -----
Från: "Paulo Vicentini" <vizentini at hotmail.com>
Datum: tis, aug 10, 2010 21:44
Rubrik: [Freeswitch-users] [freeswitch-users] play_and_get_digits is not blocking
Till: "freeswitch-users at lists.freeswitch.org" <freeswitch-users at lists.freeswitch.org>

Is there a way to explicitly set synchronous mode?
I am just running such commands as shown previously and I think it is already in sync mode.

Thanks

> From: peter.olsson at visionutveckling.se
> To: freeswitch-users at lists.freeswitch.org
> Date: Tue, 10 Aug 2010 21:00:31 +0200
> Subject: Re: [Freeswitch-users] [freeswitch-users] play_and_get_digits is not blocking
>
> Sorry - I meant synchronous mode...
>
> 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.
>
> /Peter
> ________________________________________
> Från: freeswitch-users-bounces at lists.freeswitch.org [freeswitch-users-bounces at lists.freeswitch.org] f&#246;r Peter Olsson [peter.olsson at visionutveckling.se]
> Skickat: den 10 augusti 2010 20:44
> Till: FreeSWITCH Users Help
> Ämne: Re: [Freeswitch-users] [freeswitch-users] play_and_get_digits is not blocking
>
> 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.
>
> /Peter
> ________________________________________
> Från: freeswitch-users-bounces at lists.freeswitch.org [freeswitch-users-bounces at lists.freeswitch.org] f&#246;r Paulo Vicentini [vizentini at hotmail.com]
> Skickat: den 10 augusti 2010 20:07
> Till: freeswitch-users at lists.freeswitch.org
> Ämne: Re: [Freeswitch-users] [freeswitch-users] play_and_get_digits is not blocking
>
> Hi,
> Basically:
> con.api("originate" ,"{ignore_early_media=true,absolute_codec_string=\'PCMA\'}sofia/test/phone at IP &park ");
> con.execute("play_and_get_digits", "3 5 3 5000 # welcome.wav sorry.wav myDigits \\d+",uuid);
> and then uuid_getvar uuid myDigits
>
> But con.execute("
> play_and_get_digits" is not blocking so that I can't grab
> myDigits.
> 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
> #3 0x00cf2d08 in switch_core_session_execute_application_get_flags (
> session=0xb76b5530, app=0xb76793b0 "play_and_get_digits",
> arg=0xb764ef68 "3 15 3 5000 # ivr-enter_ext_pound.wav sorry.wav myDigits \\d+", flags=0x0) at src/switch_core_session.c:1780
> #4 0x00d43d73 in switch_ivr_parse_event (session=0xb76b5530, event=0xb7652198)
>
> So that it seems a kind of race condition between ESL and the
> core
> core event system
>
> PV
>
> ________________________________
> Date: Mon, 9 Aug 2010 17:42:42 -0700
> From: msc at freeswitch.org
> To: freeswitch-users at lists.freeswitch.org
> Subject: Re: [Freeswitch-users] [freeswitch-users] play_and_get_digits is not blocking
>
>
>
> On Mon, Aug 9, 2010 at 5:24 PM, Paulo Vicentini <vizentini at hotmail.com<mailto:vizentini at hotmail.com>> wrote:
> Hi, With ESL: this->execute ( 'play_and_get_digits',... $var .. $digits = $this->api_uuid_getvar ( $uuid, $var );
>
> 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.
> -MC
>
>
> _______________________________________________ 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
>
>
> _______________________________________________
> 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
>
>
>
>
> _______________________________________________
> 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:4c61ac3032936707717627!



More information about the FreeSWITCH-users mailing list