Javascript Outbound Event Socket - Event Locking
Hi, I'm continuing to make progress with the development of some dialplan applications using the Outbound Javascript Event Socket Library. The new challenge I've encountered is (I believe) related to event locking. I'm using the Outbound event socket in async mode. A simplified example of what I want to do is to play an announcement, wait for it to finish, then hangup the channel. Announcements are working fine in other parts of the application, but I'm having trouble forcing the announcement to play before the channel is disconnected. I believe this can be solved by activating event locking per: http://wiki.freeswitch.org/wiki/Event_Socket_Library#setEventLock However, I cannot find an example of this being implemented within javascript... I thought there would be a means of appending it to the execute command, but have been unable to determine how. req.execute('playback', 'conference/conf-enter_conf_number.wav'); Any help would be sincerely appreciated. I'm in the process of writing a guide describing basic examples of using Javascript with outbound event sockets. I'll add this to the list of hints for the newbies like myself once I've got to the bottom of it. Kind regards, Sara.
you just need the header Event-Lock: true present in the message you send out On Mon, May 14, 2012 at 11:47 AM, Sara Higfler <sarahig1985@gmail.com> wrote:
Hi,
I'm continuing to make progress with the development of some dialplan applications using the Outbound Javascript Event Socket Library. The new challenge I've encountered is (I believe) related to event locking. I'm using the Outbound event socket in async mode. A simplified example of what I want to do is to play an announcement, wait for it to finish, then hangup the channel. Announcements are working fine in other parts of the application, but I'm having trouble forcing the announcement to play before the channel is disconnected. I believe this can be solved by activating event locking per:
http://wiki.freeswitch.org/wiki/Event_Socket_Library#setEventLock
However, I cannot find an example of this being implemented within javascript... I thought there would be a means of appending it to the execute command, but have been unable to determine how.
req.execute('playback', 'conference/conf-enter_conf_number.wav'); Any help would be sincerely appreciated. I'm in the process of writing a guide describing basic examples of using Javascript with outbound event sockets. I'll add this to the list of hints for the newbies like myself once I've got to the bottom of it.
Kind regards, Sara.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
participants (2)
-
Anthony Minessale
-
Sara Higfler