add presence to mod_valet_parking subscribe to the lot name for general stats or individual slots to monitor with park+ prefix *note* this used to be used in mod_fifo which now will use queue+ going forward

This commit is contained in:
Anthony Minessale
2011-10-18 11:53:49 -05:00
parent 34ddeb754f
commit 9daa42c1b5
4 changed files with 299 additions and 11 deletions
+14 -1
View File
@@ -1298,7 +1298,7 @@ static char *translate_rpid(char *in)
}
if (!strcasecmp(in, "idle")) {
r = "busy";
r = "online";
}
end:
@@ -1555,6 +1555,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
const char *force_direction = switch_str_nil(switch_event_get_header(helper->event, "force-direction"));
const char *uuid = switch_str_nil(switch_event_get_header(helper->event, "unique-id"));
const char *event_status = switch_str_nil(switch_event_get_header(helper->event, "status"));
const char *force_event_status = switch_str_nil(switch_event_get_header(helper->event, "force-status"));
const char *astate = switch_str_nil(switch_event_get_header(helper->event, "astate"));
const char *answer_state = switch_str_nil(switch_event_get_header(helper->event, "answer-state"));
const char *dft_state;
@@ -1565,6 +1566,11 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
char *clean_from_user = NULL;
int force_status = 0;
if (force_event_status && !event_status) {
event_status = force_event_status;
}
if (!strcasecmp(direction, "inbound")) {
from_id = switch_str_nil(switch_event_get_header(helper->event, "Caller-Destination-Number"));
} else {
@@ -1767,6 +1773,13 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
status = dialog_status;
switch_set_string(status_line, status);
}
if (!zstr(force_event_status)) {
switch_set_string(status_line, force_event_status);
}
if (!zstr(dialog_rpid)) {
prpid = rpid = dialog_rpid;