Re Event Priority setting and effect?
To FreeSWITCH Users, I noticed the following inside FreeSWITCH Confluence: setPriority setPriority([$number]) Sets the priority of an event to $number in case it's fired. I assume this matches the Lua function: event:setPriority(x)
From switch_types.h:
typedef enum { SWITCH_PRIORITY_NORMAL, SWITCH_PRIORITY_LOW, SWITCH_PRIORITY_HIGH } switch_priority_t; I have a couple of questions: If I have setup the remote end of an ESL connection to FreeSWITCH to listen for the following: event plain CUSTOM MY-EVENT log 5 event plain BACKGROUND_JOB 1. If I fire a CUSTOM event (MY-EVENT) from a Lua script on FreeSWITCH does using event:setPriority(x) have any effect on packet ordering received at the remote ESL end (ie. If I set the Priority to 2 (for SWITCH_PRIORITY_HIGH) will the CUSTOM event come before any "log" events or "BACKGROUND_JOB" events)? 2. Can I confirm that the only options available to my Lua script using event:setPriority is 0 (for SWITCH_PRIORITY_NORMAL (which I assume is the default)), 1 (for SWITCH_PRIORITY_LOW) and 2 (for SWITCH_PRIORITY_HIGH)? Thanks in advance, Andrew Keil
To FreeSWITCH Users, Quick follow-up question to add to my questions below.... How do I use event:setPriority(...) inside my Lua script since everything I try returns the error "Error in Event::setPriority (arg 2), expected 'switch_priority_t' ...." Thanks, Andrew From: FreeSWITCH-users [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Andrew Keil Sent: Friday, 15 December 2017 2:52 PM To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: [Freeswitch-users] Re Event Priority setting and effect? To FreeSWITCH Users, I noticed the following inside FreeSWITCH Confluence: setPriority setPriority([$number]) Sets the priority of an event to $number in case it's fired. I assume this matches the Lua function: event:setPriority(x)
From switch_types.h:
typedef enum { SWITCH_PRIORITY_NORMAL, SWITCH_PRIORITY_LOW, SWITCH_PRIORITY_HIGH } switch_priority_t; I have a couple of questions: If I have setup the remote end of an ESL connection to FreeSWITCH to listen for the following: event plain CUSTOM MY-EVENT log 5 event plain BACKGROUND_JOB 1. If I fire a CUSTOM event (MY-EVENT) from a Lua script on FreeSWITCH does using event:setPriority(x) have any effect on packet ordering received at the remote ESL end (ie. If I set the Priority to 2 (for SWITCH_PRIORITY_HIGH) will the CUSTOM event come before any "log" events or "BACKGROUND_JOB" events)? 2. Can I confirm that the only options available to my Lua script using event:setPriority is 0 (for SWITCH_PRIORITY_NORMAL (which I assume is the default)), 1 (for SWITCH_PRIORITY_LOW) and 2 (for SWITCH_PRIORITY_HIGH)? Thanks in advance, Andrew Keil
participants (1)
-
Andrew Keil