switch_input_args_t args = { 0 }, *ap = NULL;
struct input_callback_state cb_state = { 0 };
switch_file_handle_t fh = { 0 };
+ char *prebuf;
sanity_check(-1);
cb_state.funcargs = funcargs;
ap = &args;
}
+ if ((prebuf = switch_channel_get_variable(this->channel, "stream_prebuffer"))) {
+ int maybe = atoi(prebuf);
+ if (maybe > 0) {
+ fh.prebuf = maybe;
+ }
+ }
+
this->begin_allow_threads();
cb_state.threadState = threadState; // pass threadState so the dtmfhandler can pick it up
switch_file_handle_t fh = { 0 };
JSFunction *function;
switch_input_args_t args = { 0 };
+ char *prebuf;
if (!jss || !jss->session) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "You must call the session.originate method before calling this method!\n");
JS_ValueToInt32(cx, argv[3], &samps);
fh.samples = samps;
}
+
+ if ((prebuf = switch_channel_get_variable(channel, "stream_prebuffer"))) {
+ int maybe = atoi(prebuf);
+ if (maybe > 0) {
+ fh.prebuf = maybe;
+ }
+ }
+
cb_state.extra = &fh;
cb_state.ret = BOOLEAN_TO_JSVAL(JS_FALSE);