[asterisk-commits] tilghman: trunk r140167 - in /trunk: apps/ configs/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Aug 26 13:05:58 CDT 2008
Author: tilghman
Date: Tue Aug 26 13:05:58 2008
New Revision: 140167
URL: http://svn.digium.com/view/asterisk?view=rev&rev=140167
Log:
Standardize the option names for consistency (but continue to work with the
existing names for backwards compatibility).
(closes issue #13370)
Reported by: jsturtevant
Modified:
trunk/apps/app_followme.c
trunk/configs/followme.conf.sample
Modified: trunk/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_followme.c?view=diff&rev=140167&r1=140166&r2=140167
==============================================================================
--- trunk/apps/app_followme.c (original)
+++ trunk/apps/app_followme.c Tue Aug 26 13:05:58 2008
@@ -313,37 +313,50 @@
featuredigittimeout = 5000;
}
- takecallstr = ast_variable_retrieve(cfg, "general", "takecall");
- if (!ast_strlen_zero(takecallstr))
+ if ((takecallstr = ast_variable_retrieve(cfg, "general", "takecall")) && !ast_strlen_zero(takecallstr)) {
ast_copy_string(takecall, takecallstr, sizeof(takecall));
-
- declinecallstr = ast_variable_retrieve(cfg, "general", "declinecall");
- if (!ast_strlen_zero(declinecallstr))
+ }
+
+ if ((declinecallstr = ast_variable_retrieve(cfg, "general", "declinecall")) && !ast_strlen_zero(declinecallstr)) {
ast_copy_string(nextindp, declinecallstr, sizeof(nextindp));
-
- tmpstr = ast_variable_retrieve(cfg, "general", "call-from-prompt");
- if (!ast_strlen_zero(tmpstr))
+ }
+
+ if ((tmpstr = ast_variable_retrieve(cfg, "general", "call-from-prompt")) && !ast_strlen_zero(tmpstr)) {
ast_copy_string(callfromprompt, tmpstr, sizeof(callfromprompt));
-
- tmpstr = ast_variable_retrieve(cfg, "general", "norecording-prompt");
- if (!ast_strlen_zero(tmpstr))
+ } else if ((tmpstr = ast_variable_retrieve(cfg, "general", "call_from_prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(callfromprompt, tmpstr, sizeof(callfromprompt));
+ }
+
+ if ((tmpstr = ast_variable_retrieve(cfg, "general", "norecording-prompt")) && !ast_strlen_zero(tmpstr)) {
ast_copy_string(norecordingprompt, tmpstr, sizeof(norecordingprompt));
-
- tmpstr = ast_variable_retrieve(cfg, "general", "options-prompt");
- if (!ast_strlen_zero(tmpstr))
+ } else if ((tmpstr = ast_variable_retrieve(cfg, "general", "norecording_prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(callfromprompt, tmpstr, sizeof(callfromprompt));
+ }
+
+
+ if ((tmpstr = ast_variable_retrieve(cfg, "general", "options-prompt")) && !ast_strlen_zero(tmpstr)) {
ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
-
- tmpstr = ast_variable_retrieve(cfg, "general", "pls-hold-prompt");
- if (!ast_strlen_zero(tmpstr))
- ast_copy_string(plsholdprompt, tmpstr, sizeof(plsholdprompt));
-
- tmpstr = ast_variable_retrieve(cfg, "general", "status-prompt");
- if (!ast_strlen_zero(tmpstr))
- ast_copy_string(statusprompt, tmpstr, sizeof(statusprompt));
-
- tmpstr = ast_variable_retrieve(cfg, "general", "sorry-prompt");
- if (!ast_strlen_zero(tmpstr))
- ast_copy_string(sorryprompt, tmpstr, sizeof(sorryprompt));
+ } else if ((tmpstr = ast_variable_retrieve(cfg, "general", "options_prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
+ }
+
+ if ((tmpstr = ast_variable_retrieve(cfg, "general", "pls-hold-prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
+ } else if ((tmpstr = ast_variable_retrieve(cfg, "general", "pls_hold_prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
+ }
+
+ if ((tmpstr = ast_variable_retrieve(cfg, "general", "status-prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
+ } else if ((tmpstr = ast_variable_retrieve(cfg, "general", "status_prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
+ }
+
+ if ((tmpstr = ast_variable_retrieve(cfg, "general", "sorry-prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
+ } else if ((tmpstr = ast_variable_retrieve(cfg, "general", "sorry_prompt")) && !ast_strlen_zero(tmpstr)) {
+ ast_copy_string(optionsprompt, tmpstr, sizeof(optionsprompt));
+ }
/* Chug through config file */
while ((cat = ast_category_browse(cfg, cat))) {
@@ -376,7 +389,7 @@
init_profile(f);
free_numbers(f);
var = ast_variable_browse(cfg, cat);
- while(var) {
+ while (var) {
if (!strcasecmp(var->name, "number")) {
int idx = 0;
Modified: trunk/configs/followme.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/followme.conf.sample?view=diff&rev=140167&r1=140166&r2=140167
==============================================================================
--- trunk/configs/followme.conf.sample (original)
+++ trunk/configs/followme.conf.sample Tue Aug 26 13:05:58 2008
@@ -13,23 +13,23 @@
; The global default keypress for the callee to decline taking the current call. This can
; be a single digit or multiple digits. Default is "2".
;
-call-from-prompt=>followme/call-from
+call_from_prompt=>followme/call-from
; The global default for the 'Incoming call from' message.
;
-norecording-prompt=>followme/no-recording
+norecording_prompt=>followme/no-recording
; The global default for the 'You have an incoming call' message when the caller elects
; not to leave their name or the option isn't set for them to do so.
;
-options-prompt=>followme/options
+options_prompt=>followme/options
; The global default for the 'Press 1 to accept this call or press 2 to decline it' message.
;
-pls-hold-prompt=>followme/pls-hold-while-try
+pls_hold_prompt=>followme/pls-hold-while-try
; The global default for 'Please hold while we try and connect your call' message.
;
-status-prompt=>followme/status
+status_prompt=>followme/status
; The global default for 'The party you're calling isn't at their desk' message.
;
-sorry-prompt=>followme/sorry
+sorry_prompt=>followme/sorry
; The global default for 'I'm sorry, but we were unable to locate your party' message.
;
;
@@ -59,27 +59,27 @@
; The keypress for the callee to decline taking the current call. This can
; be a single digit or multiple digits. Default is the global default.
;
-call-from-prompt=>followme/call-from
+call_from_prompt=>followme/call-from
; The 'Incoming call from' message prompt. Default is the global default.
;
-followme-norecording-prompt=>followme/no-recording
+norecording_prompt=>followme/no-recording
; The 'You have an incoming call' message prompt when the caller elects
; not to leave their name or the option isn't set for them to do so. Default
; is the global default.
;
-followme-options-prompt=>followme/options
+options_prompt=>followme/options
; The 'Press 1 to accept this call or press 2 to decline it' message prompt.
; Default is the global default.
;
-followme-pls-hold-prompt=>followme/pls-hold-while-try
+pls_hold_prompt=>followme/pls-hold-while-try
; The 'Please hold while we try and connect your call' message prompt.
; Default is the global default.
;
-followme-status-prompt=>followme/status
+status_prompt=>followme/status
; The 'The party you're calling isn't at their desk' message prompt.
; Default is the global default.
;
-followme-sorry-prompt=>followme/sorry
+sorry_prompt=>followme/sorry
; The 'I'm sorry, but we were unable to locate your party' message prompt. Default
; is the global default.
More information about the asterisk-commits
mailing list