[Freeswitch-users] Re Event Priority setting and effect?

Andrew Keil andrew.keil at visytel.com
Fri Dec 15 06:26:25 UTC 2017


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 at lists.freeswitch.org] On Behalf Of Andrew Keil
Sent: Friday, 15 December 2017 2:52 PM
To: FreeSWITCH Users Help <freeswitch-users at 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20171215/8b1ffb92/attachment-0001.html>


More information about the FreeSWITCH-users mailing list