add new chatplan concept and mod_sms. Apps for chat messages: copy new base freeswitch.xml and chatplan dir if you are upgrading on existing config base

This commit is contained in:
Anthony Minessale committed 2011-09-21 14:31:18 -05:00
1 parent 5fe3a22d83
commit 7333d46d5b
35 files changed
+3263 -567

No files matched your search

+18 -2
View File
@@ -270,8 +270,9 @@ ESL_DECLARE(char *) esl_event_get_header_idx(esl_event_t *event, const char *hea
}
return hp->value;
}
} else if (!strcmp(header_name, "_body")) {
return event->body;
}
return NULL;
}
@@ -414,6 +415,10 @@ static esl_status_t esl_event_base_add_header(esl_event_t *event, esl_stack_t st
int index = 0;
char *real_header_name = NULL;
if (!strcmp(header_name, "_body")) {
esl_event_set_body(event, data);
}
if ((index_ptr = strchr(header_name, '['))) {
index_ptr++;
index = atoi(index_ptr);
@@ -604,6 +609,17 @@ ESL_DECLARE(esl_status_t) esl_event_add_header_string(esl_event_t *event, esl_st
return ESL_FAIL;
}
ESL_DECLARE(esl_status_t) esl_event_set_body(esl_event_t *event, const char *body)
{
esl_safe_free(event->body);
if (body) {
event->body = DUP(body);
}
return ESL_SUCCESS;
}
ESL_DECLARE(esl_status_t) esl_event_add_body(esl_event_t *event, const char *fmt, ...)
{
int ret = 0;
+1
View File
@@ -298,6 +298,7 @@ ESL_DECLARE(esl_status_t) esl_event_create_json(esl_event_t **event, const char
\note the body parameter can be shadowed by the esl_event_reserve_subclass_detailed function
*/
ESL_DECLARE(esl_status_t) esl_event_add_body(esl_event_t *event, const char *fmt, ...);
ESL_DECLARE(esl_status_t) esl_event_set_body(esl_event_t *event, const char *body);
/*!
\brief Create a new event assuming it will not be custom event and therefore hiding the unused parameters