提交 d138ed71 authored 作者: Anthony Minessale's avatar Anthony Minessale

adjustments to the core do a make sure

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3504 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 92bd5358
......@@ -88,6 +88,9 @@ struct switch_caller_profile {
char *context;
/*! flags */
switch_caller_profile_flag_t flags;
struct switch_caller_profile *originator_caller_profile;
struct switch_caller_profile *originatee_caller_profile;
struct switch_channel_timetable *times;
struct switch_caller_profile *next;
};
......
......@@ -46,6 +46,7 @@ struct switch_channel_timetable {
switch_time_t created;
switch_time_t answered;
switch_time_t hungup;
switch_time_t transferred;
struct switch_channel_timetable *next;
};
......@@ -428,9 +429,6 @@ SWITCH_DECLARE(void) switch_channel_event_set_data(switch_channel_t *channel, sw
*/
SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel, char *in);
// These may go away
SWITCH_DECLARE(switch_status_t) switch_channel_set_raw_mode (switch_channel_t *channel, int freq, int bits, int channels, int ms, int kbps);
SWITCH_DECLARE(switch_status_t) switch_channel_get_raw_mode (switch_channel_t *channel, int *freq, int *bits, int *channels, int *ms, int *kbps);
/** @} */
SWITCH_END_EXTERN_C
......
......@@ -570,7 +570,7 @@ static void enum_app_function(switch_core_session_t *session, char *data)
char vbuf[1024] = "";
char *rbp = rbuf;
switch_size_t l = 0, rbl = sizeof(rbuf);
uint32_t cnt = 0;
uint32_t cnt = 1;
switch_channel_t *channel = switch_core_session_get_channel(session);
assert(channel != NULL);
......@@ -583,10 +583,21 @@ static void enum_app_function(switch_core_session_t *session, char *data)
dest = argv[0];
root = argv[1] ? argv[1] : globals.root;
if (enum_lookup(root, data, &results) == SWITCH_STATUS_SUCCESS) {
switch_hash_index_t *hi;
void *vval;
const void *vvar;
for (hi = switch_channel_variable_first(channel, switch_core_session_get_pool(session)); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, &vvar, NULL, &vval);
if (vvar && !strncmp(vvar, "enum_", 5)) {
switch_channel_set_variable(channel, (char *) vvar, NULL);
}
}
for(rtp = globals.route_order; rtp; rtp = rtp->next) {
for(rp = results; rp; rp = rp->next) {
if (!strcmp(rtp->service, rp->service)) {
snprintf(vbuf, sizeof(vbuf), "enum_route_%d", ++cnt);
snprintf(vbuf, sizeof(vbuf), "enum_route_%d", cnt++);
switch_channel_set_variable(channel, vbuf, rp->route);
snprintf(rbp, rbl, "%s|", rp->route);
......@@ -596,6 +607,8 @@ static void enum_app_function(switch_core_session_t *session, char *data)
}
}
}
snprintf(vbuf, sizeof(vbuf), "%d", cnt);
switch_channel_set_variable(channel, "enum_route_count", vbuf);
*(rbuf+strlen(rbuf)-1) = '\0';
switch_channel_set_variable(channel, "enum_auto_route", rbuf);
free_results(&results);
......
......@@ -862,14 +862,14 @@ static JSBool session_recordfile(JSContext *cx, JSObject *obj, uintN argc, jsval
}
if (argc > 4) {
int32_t thresh;
JS_ValueToInt32(cx, argv[4], &(int32)thresh);
int32 thresh;
JS_ValueToInt32(cx, argv[4], &thresh);
fh.thresh = thresh;
}
if (argc > 5) {
int32_t silence_hits;
JS_ValueToInt32(cx, argv[5], &(int32)silence_hits);
int32 silence_hits;
JS_ValueToInt32(cx, argv[5], &silence_hits);
fh.silence_hits = silence_hits;
}
}
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论