aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_h323.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-01 16:47:28 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-01 16:47:28 +0000
commitf796193575703618e2b05e84545e3354543a8276 (patch)
tree65c18318da656f3d8bdc20876d5774763985c46a /channels/chan_h323.c
parent9f95248be1f852e3b6d2171eb0d95c715471f881 (diff)
- add the ability to configure forced jitterbuffers on h323, jingle,
and mgcp channels - remove the jitterbuffer configuration from the pvt structures in the sip, zap, and skinny channel drivers, as copying the same global configuration into each pvt structure has no benefit. - update and fix some typos in jitterbuffer related documentation (issue #7257, north, with additional updates and modifications) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@31413 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_h323.c')
-rw-r--r--channels/chan_h323.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/channels/chan_h323.c b/channels/chan_h323.c
index 2714d78c1..a252f4e64 100644
--- a/channels/chan_h323.c
+++ b/channels/chan_h323.c
@@ -83,6 +83,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/dsp.h"
#include "asterisk/causes.h"
#include "asterisk/stringfields.h"
+#include "asterisk/abstract_jb.h"
#ifdef __cplusplus
}
#endif
@@ -105,6 +106,16 @@ setcapabilities_cb on_setcapabilities;
/* global debug flag */
int h323debug;
+/*! Global jitterbuffer configuration - by default, jb is disabled */
+static struct ast_jb_conf default_jbconf =
+{
+ .flags = 0,
+ .max_size = -1,
+ .resync_threshold = -1,
+ .impl = ""
+};
+static struct ast_jb_conf global_jbconf;
+
/** Variables required by Asterisk */
static const char desc[] = "The NuFone Network's Open H.323 Channel Driver";
static const char tdesc[] = "The NuFone Network's Open H.323 Channel Driver";
@@ -788,6 +799,10 @@ static struct ast_channel *__oh323_new(struct oh323_pvt *pvt, int state, const c
ch = NULL;
}
}
+
+ /* Configure the new channel jb */
+ if (ch && pvt && pvt->rtp)
+ ast_jb_configure(ch, &global_jbconf);
} else {
ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
}
@@ -2020,8 +2035,18 @@ int reload_config(void)
global_options.dtmfmode = H323_DTMF_RFC2833;
global_options.capability = GLOBAL_CAPABILITY;
global_options.bridge = 1; /* Do native bridging by default */
+
+ /* Copy the default jb config over global_jbconf */
+ memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf));
+
v = ast_variable_browse(cfg, "general");
- while(v) {
+ while (v) {
+ /* handle jb conf */
+ if (!ast_jb_read_conf(&global_jbconf, v->name, v->value)) {
+ v = v->next;
+ continue;
+ }
+
/* Create the interface list */
if (!strcasecmp(v->name, "port")) {
h323_signalling_port = (int)strtol(v->value, NULL, 10);