[asterisk-commits] russell: branch russell/chan_console r49079 - in
/team/russell/chan_console: ...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Dec 30 23:50:19 MST 2006
Author: russell
Date: Sun Dec 31 00:50:18 2006
New Revision: 49079
URL: http://svn.digium.com/view/asterisk?view=rev&rev=49079
Log:
Add support for setting the default language.
Modified:
team/russell/chan_console/channels/chan_console.c
team/russell/chan_console/configs/console.conf.sample
Modified: team/russell/chan_console/channels/chan_console.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_console/channels/chan_console.c?view=diff&rev=49079&r1=49078&r2=49079
==============================================================================
--- team/russell/chan_console/channels/chan_console.c (original)
+++ team/russell/chan_console/channels/chan_console.c Sun Dec 31 00:50:18 2006
@@ -116,6 +116,8 @@
* - No MOH class set on the channel
* - Peer channel putting this device on hold did not suggest a class */
char mohinterpret[MAX_MUSICCLASS];
+ /*! Default language */
+ char language[MAX_LANGUAGE];
/*! A frame for preparing to queue on to the channel */
struct ast_frame fr;
/*! Buffer to hold outgoing audio with the standard offset */
@@ -248,11 +250,12 @@
chan->tech_pvt = pvt;
pvt->owner = chan;
+ if (!ast_strlen_zero(ctx))
+ ast_copy_string(chan->context, ctx, sizeof(chan->context));
if (!ast_strlen_zero(ext))
ast_copy_string(chan->exten, ext, sizeof(chan->exten));
- if (!ast_strlen_zero(ctx))
- ast_copy_string(chan->context, ctx, sizeof(chan->context));
-
+ if (!ast_strlen_zero(pvt->language))
+ ast_string_field_set(chan, language, pvt->language);
/* Don't use ast_set_callerid() here because it will
* generate a needless NewCallerID event */
chan->cid.cid_num = ast_strdup(pvt->cid_num);
@@ -721,6 +724,9 @@
/* default values */
memcpy(&global_jbconf, &default_jbconf, sizeof(global_jbconf));
strcpy(pvt.mohinterpret, "default");
+ pvt.language[0] = '\0';
+ pvt.cid_num[0] = '\0';
+ pvt.cid_name[0] = '\0';
pvt.overridecontext = 0;
if (!(cfg = ast_config_load(CONFIG_FILE))) {
@@ -735,6 +741,8 @@
ast_copy_string(pvt.mohinterpret, v->value, sizeof(pvt.mohinterpret));
else if (!strcasecmp(v->name, "overridecontext"))
pvt.overridecontext = ast_true(v->value) ? 1 : 0;
+ else if (!strcasecmp(v->name, "language"))
+ ast_copy_string(pvt.language, v->value, sizeof(pvt.language));
else if (!strcasecmp(v->name, "callerid")) {
ast_callerid_split(v->value, pvt.cid_name, sizeof(pvt.cid_name),
pvt.cid_num, sizeof(pvt.cid_num));
Modified: team/russell/chan_console/configs/console.conf.sample
URL: http://svn.digium.com/view/asterisk/team/russell/chan_console/configs/console.conf.sample?view=diff&rev=49079&r1=49078&r2=49079
==============================================================================
--- team/russell/chan_console/configs/console.conf.sample (original)
+++ team/russell/chan_console/configs/console.conf.sample Sun Dec 31 00:50:18 2006
@@ -4,9 +4,13 @@
[general]
-; Set the default CallerID.
+; Set the default CallerID for created channels.
;
; callerid=MyName Here <(256) 428-6000>
+
+; Set the default language for created channels.
+;
+; language=en
; If you set overridecontext to 'yes', then the whole dial string
; will be interpreted as an extension, which is extremely useful
More information about the asterisk-commits
mailing list