[Freeswitch-users] Event-lock, sync/async on outbound ESL and execute() tagging question

Dmitry Sytchev kbdfck at gmail.com
Wed Mar 23 23:41:24 MSK 2011


I understand this. I use outbound async full ESL mode, launching socket app
from dialplan, because in sync mode I have some problems with bridge app and
I need to catch parent channel hangup and server disconnection.

I written wrapper around ESL.pm to implement executeSync which waits for
CHANNEL_EXECUTE_COMPLETE while in async mode, works for now.
But of course it is not the best way, because of possible error when
'execute' is used before my 'executeSync' by mistake and without proper
event handling so that CHANNEL_EXECUTE_COMPLETE from previous app is catched
by my wrapper and it returns prematurely. This is why I want to have some
tag I can mark execute call to filter its events later... Maybe there is
better way?

2011/3/23 Michael Collins <msc at freeswitch.org>

>
>
> On Wed, Mar 23, 2011 at 6:48 AM, lakshmanan ganapathy <
> lakindia89 at gmail.com> wrote:
>
>> Hi,
>> Eventlock is used to say "Whether to queue the commands or not".
>>
>> Assume I'm giving playback and bridge command via outbound socket to
>> freeswitch.
>>
>> If eventlock is "true" then, first "playback will be executed" and then
>> only the bridge will be executed.
>>
>> If eventlock is "false", then order of execution is not guaranteed.
>>
>> I'm also using Outbound event socket. I'll run it in async mode. After
>> each execute() statement, if I need the output for that event, I will wait
>> for the event and then only I'll proceed. If I don't need event, ( playback
>> ), I just do the other operations.
>>
>> This works well for me.
>>
>> Be sure that you are using the terms "inbound" and "outbound" event socket
> correctly. It's inbound or outbound from the perspective of FreeSWITCH, not
> from the perspective of your script. An easy rule of thumb is this: if you
> use the 'socket' application in your dialplan then you are using "outbound
> event socket" because FS has to make an outbound connection to your script.
>
> http://wiki.freeswitch.org/wiki/Event_socket
>
> -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
>
>


-- 
Best regards,

Dmitry Sytchev,
IT Engineer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110323/32cede9a/attachment.html 


More information about the FreeSWITCH-users mailing list