static switch_mutex_t *MUTEX = NULL;
-
struct enum_record {
int order;
int preference;
switch_mutex_unlock(MUTEX);
}
-
static switch_status_t load_config(void)
{
char *cf = "enum.conf";
}
return status;
-
}
-
static char *reverse_number(char *in, char *root)
{
switch_size_t len;
q->errs++;
}
-
static void add_result(enum_query_t *q, int order, int preference, char *service, char *route, int supported)
{
enum_record_t *new_result, *rp, *prev = NULL;
}
}
-
static void free_results(enum_record_t **results)
{
enum_record_t *fp, *rp;
return;
xperr:
- //printf("<parse error>\n");
+
return;
}
free(result);
}
-
static switch_status_t enum_lookup(char *root, char *in, enum_record_t **results)
{
switch_status_t sstatus = SWITCH_STATUS_SUCCESS;
return sstatus;
}
-
SWITCH_STANDARD_DIALPLAN(enum_dialplan_hunt)
{
switch_caller_extension_t *extension = NULL;
}
return extension;
-
}
SWITCH_STANDARD_APP(enum_app_function)
free_results(&results);
}
}
-
}
-
SWITCH_STANDARD_API(enum_api)
{
int argc = 0;
return SWITCH_STATUS_SUCCESS;
}
-
static void do_load(void)
{
switch_mutex_lock(MUTEX);
}
-
-
SWITCH_STANDARD_API(enum_function)
{
int argc = 0;
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_enum_shutdown)
{
-
switch_event_unbind(&NODE);
if (globals.pool) {
uint32_t ip;
uint32_t port;
};
+
typedef struct ls_control_packet ls_control_packet_t;
typedef enum {
char *mcast_port_str = "34567";
const char *esf_broadcast_ip = NULL, *var;
-
if (!switch_strlen_zero((char *) data)) {
mydata = switch_core_session_strdup(session, data);
assert(mydata != NULL);
}
}
-
if (switch_true(switch_channel_get_variable(channel, SWITCH_BYPASS_MEDIA_VARIABLE))) {
switch_core_session_message_t msg = { 0 };
return;
}
-
SWITCH_MODULE_LOAD_FUNCTION(mod_esf_load)
{
switch_application_interface_t *app_interface;
typedef struct fifo_node fifo_node_t;
-
-
-
static switch_status_t on_dtmf(switch_core_session_t *session, void *input, switch_input_type_t itype, void *buf, unsigned int buflen)
{
switch_core_session_t *bleg = (switch_core_session_t *) buf;
return SWITCH_STATUS_SUCCESS;
}
-
static switch_status_t moh_on_dtmf(switch_core_session_t *session, void *input, switch_input_type_t itype, void *buf, unsigned int buflen)
{
-
switch (itype) {
case SWITCH_INPUT_TYPE_DTMF:
{
int do_orbit;
char *orbit_exten;
};
-typedef struct fifo_chime_data fifo_chime_data_t;
-
+typedef struct fifo_chime_data fifo_chime_data_t;
static switch_status_t caller_read_frame_callback(switch_core_session_t *session, switch_frame_t *frame, void *user_data)
{
return SWITCH_STATUS_SUCCESS;
}
-
static switch_status_t consumer_read_frame_callback(switch_core_session_t *session, switch_frame_t *frame, void *user_data)
{
fifo_node_t *node, **node_list = (fifo_node_t **) user_data;
switch_event_node_t *node;
} globals;
-
static fifo_node_t *create_node(const char *name, uint32_t importance)
{
fifo_node_t *node;
}
}
-
static void pres_event_handler(switch_event_t *event)
{
char *to = switch_event_get_header(event, "to");
if (argc > 4) {
moh = argv[4];
}
-
} else {
if (argc > 2) {
announce = argv[2];
}
}
-
if (chime_freq) {
ftmp = atoi(chime_freq);
if (ftmp > 0) {
}
}
-
-
switch_channel_answer(channel);
switch_mutex_lock(node->mutex);
switch_core_hash_insert(node->caller_hash, uuid, session);
-
if ((pri = switch_channel_get_variable(channel, "fifo_priority"))) {
p = atoi(pri);
}
}
}
-
if (argc > 2) {
if (!strcasecmp(argv[2], "nowait")) {
do_wait = 0;
}
}
-
if (!(my_id = switch_channel_get_variable(channel, "fifo_consumer_id"))) {
my_id = switch_core_session_get_uuid(session);
}
-
if (do_wait) {
for (i = 0; i < node_count; i++) {
if (!(node = node_list[i])) {
importance = node->importance;
}
}
-
}
if (winner > -1) {
}
}
-
if (!pop) {
if (!do_wait) {
break;
switch_ivr_sleep(session, 500, NULL);
}
-
switch_channel_set_variable(other_channel, "fifo_serviced_by", my_id);
switch_channel_set_variable(other_channel, "fifo_serviced_uuid", switch_core_session_get_uuid(session));
break;
}
-
switch_channel_answer(channel);
cloned_profile = switch_caller_profile_clone(other_session, switch_channel_get_caller_profile(channel));
switch_assert(cloned_profile);
send_presence(node);
switch_core_session_rwunlock(other_session);
-
if (!do_wait) {
done = 1;
}
switch_mutex_unlock(node->mutex);
}
}
-
}
}
switch_ivr_set_xml_chan_vars(variables, channel, c_off);
}
-
}
return cc_off;
static void list_node(fifo_node_t *node, switch_xml_t x_report, int *off, int verbose)
{
-
switch_xml_t x_fifo;
int cc_off = 0;
char buffer[35];
cc_off = xml_hash(x_fifo, node->caller_hash, "callers", "caller", cc_off, verbose);
cc_off = xml_hash(x_fifo, node->consumer_hash, "consumers", "consumer", cc_off, verbose);
-
}
#define FIFO_API_SYNTAX "list|list_verbose|count|importance [<fifo name>]"
const void *var;
int x = 0, verbose = 0;
-
if (!globals.running) {
return SWITCH_STATUS_FALSE;
}
return SWITCH_STATUS_SUCCESS;
}
-
SWITCH_MODULE_LOAD_FUNCTION(mod_fifo_load)
{
switch_application_interface_t *app_interface;
switch_api_interface_t *commands_api_interface;
-
/* create/register custom event message type */
if (switch_event_reserve_subclass(FIFO_EVENT) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!", FIFO_EVENT);
return SWITCH_STATUS_SUCCESS;
}
-
/* For Emacs:
* Local Variables:
* mode:c
"CREATE TABLE limit_data (\n"
" hostname VARCHAR(255),\n" " realm VARCHAR(255),\n" " id VARCHAR(255),\n" " uuid VARCHAR(255)\n" ");\n";
-
static char db_sql[] =
"CREATE TABLE db_data (\n"
" hostname VARCHAR(255),\n" " realm VARCHAR(255),\n" " data_key VARCHAR(255),\n" " data VARCHAR(255)\n" ");\n";
-
static char group_sql[] =
"CREATE TABLE group_data (\n" " hostname VARCHAR(255),\n" " groupname VARCHAR(255),\n" " url VARCHAR(255)\n" ");\n";
-
-
static switch_status_t limit_execute_sql(char *sql, switch_mutex_t *mutex)
{
switch_core_db_t *db;
}
#endif
-
end:
if (mutex) {
switch_mutex_unlock(mutex);
return status;
}
-
static switch_bool_t limit_execute_sql_callback(switch_mutex_t *mutex, char *sql, switch_core_db_callback_func_t callback, void *pdata)
{
switch_bool_t ret = SWITCH_FALSE;
}
return ret;
-
}
-
static switch_status_t do_config()
{
char *cf = "limit.conf";
#else
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ODBC IS NOT AVAILABLE!\n");
#endif
-
}
}
}
switch_xml_free(xml);
return status;
-
}
static switch_status_t hanguphook(switch_core_session_t *session)
size_t len;
int matches;
};
+
typedef struct callback callback_t;
+
static int sql2str_callback(void *pArg, int argc, char **argv, char **columnNames)
{
callback_t *cbt = (callback_t *) pArg;
return 0;
}
-
static int group_callback(void *pArg, int argc, char **argv, char **columnNames)
{
callback_t *cbt = (callback_t *) pArg;
return 0;
}
-
SWITCH_STANDARD_API(db_api_function)
{
int argc = 0;
goto done;
}
-
error:
stream->write_function(stream, "!err!");
switch_mutex_unlock(globals.mutex);
switch_safe_free(mydata);
return SWITCH_STATUS_SUCCESS;
-
}
-
#define DB_USAGE "[insert|delete]/<realm>/<key>/<val>"
#define DB_DESC "save data"
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "USAGE: db %s\n", DB_USAGE);
}
-
-
SWITCH_STANDARD_API(group_api_function)
{
int argc = 0;
switch_mutex_unlock(globals.mutex);
switch_safe_free(mydata);
return SWITCH_STATUS_SUCCESS;
-
}
#define GROUP_USAGE "[insert|delete]:<group name>:<val>"
limit_execute_sql(sql, globals.mutex);
switch_safe_free(sql);
}
-
}
#define LIMIT_USAGE "<realm> <id> <max> [transfer_destination_number]"
switch_mutex_unlock(globals.mutex);
}
-
SWITCH_MODULE_LOAD_FUNCTION(mod_limit_load)
{
switch_status_t status;
return SWITCH_STATUS_SUCCESS;
}
-
-
/* For Emacs:
* Local Variables:
* mode:c