[Freeswitch-users] Dialplan/PHP esl variable problem.

Peter Olsson peter.olsson at visionutveckling.se
Sun Apr 1 14:26:18 MSD 2012


In your sample you're actually queuing "sleep(1000)" to the channel. So first it will queue play_and_get_digits, inside that loop it will find more commands in the queue, and exeute them, so in the end it will only execute a bunch of "sleep(1000)".

You're better of using a sleep in your module directly (not tell FS to sleep). Also you will need to poll the events in the loop somehow., checkout the perl sample here: http://wiki.freeswitch.org/wiki/Esl#Simple_Perl_Example

/Peter
________________________________________
Från: freeswitch-users-bounces at lists.freeswitch.org [freeswitch-users-bounces at lists.freeswitch.org] för Alex Crow [acrow at integrafin.co.uk]
Skickat: den 1 april 2012 11:50
Till: FreeSWITCH Users Help
Ämne: Re: [Freeswitch-users] Dialplan/PHP esl variable problem.

On 01/04/12 10:33, Peter Olsson wrote:
> I believe that it's only sync in outbound mode. Maybe it would be easier to do what you want in outbound mode instead?
>
> /Peter
>
> ________________________________
Thanks Peter,

I was thinking about that but since I'm not having much luck listening
for events in inbound mode, I think I'd be running before I could walk
(ie I'd have to listen for incoming calls rather than just using the
dialplan to do that, and I don't want to risk breaking all the other
calls on the system).

This isn't working for instance (after the execute):

while ($event->getType() != 'CHANNEL_EXECUTE_COMPLETE' ) {
                 $esl->execute("&sleep",1000);
         }

It actually seems to stop the call working completely, ie the caller
doesn't hear the "enter the phone number". Not sure why, since that's
executed before!

Cheers

Alex





_________________________________________________________________________
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

!DSPAM:4f7824ba32766551348335!




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