[asterisk-commits] pabelanger: branch pabelanger/gtalk_show_settings r292665 - in /team/pabelang...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Oct 21 16:25:19 CDT 2010
Author: pabelanger
Date: Thu Oct 21 16:25:15 2010
New Revision: 292665
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=292665
Log:
Setup some default values.
Modified:
team/pabelanger/gtalk_show_settings/channels/chan_gtalk.c
team/pabelanger/gtalk_show_settings/configs/gtalk.conf.sample
Modified: team/pabelanger/gtalk_show_settings/channels/chan_gtalk.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/gtalk_show_settings/channels/chan_gtalk.c?view=diff&rev=292665&r1=292664&r2=292665
==============================================================================
--- team/pabelanger/gtalk_show_settings/channels/chan_gtalk.c (original)
+++ team/pabelanger/gtalk_show_settings/channels/chan_gtalk.c Thu Oct 21 16:25:15 2010
@@ -75,8 +75,11 @@
#include "asterisk/abstract_jb.h"
#include "asterisk/jabber.h"
#include "asterisk/jingle.h"
-
-#define GOOGLE_CONFIG "gtalk.conf"
+#include "asterisk/features.h"
+
+#define GOOGLE_CONFIG "gtalk.conf"
+#define DEFAULT_CONTEXT "default" /*!< The default context for [general] section as well as devices */
+#define DEFAULT_ALLOWGUEST 1
/*! Global jitterbuffer configuration - by default, jb is disabled */
static struct ast_jb_conf default_jbconf =
@@ -235,7 +238,7 @@
static char externip[16];
static char default_context[AST_MAX_CONTEXT];
static char default_parkinglot[AST_MAX_CONTEXT];
-static int default_allowguest = 1;
+static int default_allowguest;
static struct sockaddr_in stunaddr; /*!< the stun server we get the externip from */
static struct gtalk_container gtalk_list;
@@ -2083,12 +2086,16 @@
/* set defaults */
memset(&stunaddr, 0, sizeof(stunaddr));
+ default_allowguest = DEFAULT_ALLOWGUEST;
+ ast_copy_string(default_context, DEFAULT_CONTEXT, sizeof(default_context));
+ ast_copy_string(default_parkinglot, DEFAULT_PARKINGLOT, sizeof(default_parkinglot));
cat = ast_category_browse(cfg, NULL);
for (var = ast_variable_browse(cfg, "general"); var; var = var->next) {
/* handle jb conf */
- if (!ast_jb_read_conf(&global_jbconf, var->name, var->value))
+ if (!ast_jb_read_conf(&global_jbconf, var->name, var->value)) {
continue;
+ }
if (!strcasecmp(var->name, "allowguest")) {
default_allowguest = (ast_true(ast_variable_retrieve(cfg, "general", "allowguest"))) ? 1 : 0;
Modified: team/pabelanger/gtalk_show_settings/configs/gtalk.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/gtalk_show_settings/configs/gtalk.conf.sample?view=diff&rev=292665&r1=292664&r2=292665
==============================================================================
--- team/pabelanger/gtalk_show_settings/configs/gtalk.conf.sample (original)
+++ team/pabelanger/gtalk_show_settings/configs/gtalk.conf.sample Thu Oct 21 16:25:15 2010
@@ -1,4 +1,4 @@
-;[general]
+[general]
;context=default ; Context to dump call into
;bindaddr=0.0.0.0 ; Address to bind to
;externip=127.0.0.1 ; Set your external ip if you are behind a NAT.
@@ -6,6 +6,12 @@
; Note, if the STUN query is successful, this will
; replace any value placed in externip;
;allowguest=yes ; Allow calls from people not in list of peers
+;disallow=all
+;allow=gsm
+;allow=ulaw
+;parkinglot=soccer ; Sets the default parking lot for call parking
+ ; Parkinglots are configured in features.conf
+
;[guest] ; special account for options on guest account
;disallow=all
More information about the asterisk-commits
mailing list