mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-28 22:24:16 +00:00
tweaks and fixes
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@859 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
c5e3144711
commit
539ff39995
16 files changed
+289
-189
No files matched your search
@@ -1037,7 +1037,7 @@ static int on_restart(struct sangoma_pri *spri, sangoma_pri_event_t event_type,
|
||||
}
|
||||
|
||||
if ((fd = sangoma_create_socket_intr(spri->span, event->restart.channel)) < 0) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Can't open fd!\n");
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Can't open fd [%s]!\n", strerror(errno));
|
||||
} else {
|
||||
close(fd);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ static void event_handler(switch_event *event)
|
||||
msg = iks_make_msg(IKS_TYPE_NONE, globals.target_jid, buf);
|
||||
iks_insert_attrib(msg, "subject", "Event");
|
||||
iks_send(globals.session.parser, msg);
|
||||
|
||||
iks_delete(msg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -491,6 +491,7 @@ static JSBool session_speak(JSContext *cx, JSObject *obj, uintN argc, jsval *arg
|
||||
char *voice_name = NULL;
|
||||
char *text = NULL;
|
||||
char *dtmf_callback = NULL;
|
||||
char *timer_name = NULL;
|
||||
switch_codec *codec;
|
||||
void *bp = NULL;
|
||||
int len = 0;
|
||||
@@ -524,6 +525,10 @@ static JSBool session_speak(JSContext *cx, JSObject *obj, uintN argc, jsval *arg
|
||||
}
|
||||
}
|
||||
|
||||
if (argc > 4) {
|
||||
timer_name = JS_GetStringBytes(JS_ValueToString(cx, argv[4]));
|
||||
}
|
||||
|
||||
if (!tts_name && text) {
|
||||
return JS_FALSE;
|
||||
}
|
||||
@@ -532,7 +537,7 @@ static JSBool session_speak(JSContext *cx, JSObject *obj, uintN argc, jsval *arg
|
||||
switch_ivr_speak_text(jss->session,
|
||||
tts_name,
|
||||
voice_name && strlen(voice_name) ? voice_name : NULL,
|
||||
NULL,
|
||||
timer_name,
|
||||
codec->implementation->samples_per_second,
|
||||
dtmf_func,
|
||||
text,
|
||||
|
||||
Reference in new issue
Block a user