[asterisk-commits] branch oej/multiparking - r7722 in
/team/oej/multiparking: configs/ res/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Jan 2 14:45:44 CST 2006
Author: oej
Date: Mon Jan 2 14:45:41 2006
New Revision: 7722
URL: http://svn.digium.com/view/asterisk?rev=7722&view=rev
Log:
- Config done
- Parking done
- Patch done
- Need help testing!
----- :-) Thank you
Modified:
team/oej/multiparking/configs/features.conf.sample
team/oej/multiparking/res/res_features.c
Modified: team/oej/multiparking/configs/features.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/configs/features.conf.sample?rev=7722&r1=7721&r2=7722&view=diff
==============================================================================
--- team/oej/multiparking/configs/features.conf.sample (original)
+++ team/oej/multiparking/configs/features.conf.sample Mon Jan 2 14:45:41 2006
@@ -3,9 +3,10 @@
;
[general]
-parkext => 700 ; What ext. to dial to park
-parkpos => 701-720 ; What extensions to park calls on
-context => parkedcalls ; Which context parked calls are in
+parkext => 700 ; What ext. to dial to park (all parking lots)
+parkpos => 701-720 ; What extensions to park calls on (default parking lot)
+context => parkedcalls ; Which context parked calls are in (default parking lot)
+;findslot => next ; Continue to the 'next' parking space. Defaults to 'first' available (default parking lot)
;parkingtime => 45 ; Number of seconds a call can be parked for
; (default is 45 seconds)
;transferdigittimeout => 3 ; Number of seconds to wait between digits when transfering a call
@@ -15,7 +16,6 @@
;xfersound = beep ; to indicate an attended transfer is complete
;xferfailsound = beeperr ; to indicate a failed transfer
;adsipark = yes ; if you want ADSI parking announcements
-;findslot => next ; Continue to the 'next' parking space. Defaults to 'first' available
;pickupexten = *8 ; Configure the pickup extension. Default is *8
;featuredigittimeout = 500 ; Max time (ms) between digits for
; feature activation. Default is 500
@@ -31,3 +31,12 @@
;testfeature => #9,callee,Playback,tt-monkeys ;Play tt-monkeys to
;callee if #9 was pressed
+;*** Define another parking lot
+;
+; To use it set the channel variable PARKINGLOT
+; either in the dialplan or with the setvar option in the channel configuration
+;
+;[edvina]
+;context => edvinapark
+;parkpos => 800-850
+;findslot => next
Modified: team/oej/multiparking/res/res_features.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/res/res_features.c?rev=7722&r1=7721&r2=7722&view=diff
==============================================================================
--- team/oej/multiparking/res/res_features.c (original)
+++ team/oej/multiparking/res/res_features.c Mon Jan 2 14:45:41 2006
@@ -1904,6 +1904,7 @@
int fcount;
struct ast_call_feature *feature;
char format[] = "%-25s %-7s %-7s\n";
+ struct ast_parkinglot *parkinglot;
ast_cli(fd, format, "Builtin Feature", "Default", "Current");
ast_cli(fd, format, "---------------", "-------", "-------");
@@ -1933,8 +1934,13 @@
ast_cli(fd, "\nCall parking\n");
ast_cli(fd, "------------\n");
ast_cli(fd,"%-20s: %s\n", "Parking extension", parking_ext);
- //OEJ FIX ast_cli(fd,"%-20s: %s\n", "Parking context", parking_con);
- //OEJ FIX ast_cli(fd,"%-20s: %d-%d\n", "Parked call extensions", parking_start, parking_stop);
+
+ AST_LIST_TRAVERSE(&parkinglots, parkinglot, list) {
+ ast_cli(fd, "%-24s : %s\n", "Parking lot", parkinglot->name);
+ ast_cli(fd," %-24s: %s\n", "Parking context", parkinglot->parking_con);
+ ast_cli(fd," %-24s: %d-%d\n", "Parked call extensions", parkinglot->parking_start, parkinglot->parking_stop);
+
+ }
ast_cli(fd,"\n");
return RESULT_SUCCESS;
@@ -2119,6 +2125,8 @@
parkinglot = create_parkinglot(name);
if (!parkinglot)
return NULL;
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Building parking lot %s\n", name);
/* Do some config stuff */
while(confvar) {
@@ -2170,6 +2178,8 @@
destroy_parkinglot(parkinglot);
return NULL;
}
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Parking %s now open for business. (start exten %d end %d)\n", name, start, end);
/* Move it into the list */
AST_LIST_INSERT_TAIL(&parkinglots, parkinglot, list);
@@ -2185,6 +2195,7 @@
struct ast_context *con = NULL;
struct ast_config *cfg = NULL;
struct ast_variable *var = NULL;
+ char *section;
if (!default_parkinglot) {
@@ -2348,6 +2359,19 @@
}
/* Now, find parking lot definitions */
+ section = NULL;
+ while ((section = ast_category_browse(cfg, section))) {
+ ast_log(LOG_DEBUG, "*** Found section %s\n", section);
+ if (!strcasecmp(section, "general") || !strcasecmp(section, "featuremap") || !strcasecmp(section, "applicationmap") )
+ continue;
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Found configuration section %s, assume parking context\n", section);
+ if(!build_parkinglot(section, ast_variable_browse(cfg, section)))
+ ast_log(LOG_ERROR, "Could not build parking lot %s. Configuration error.\n", section);
+ else
+ ast_log(LOG_DEBUG, "Configured parking context %s\n", section);
+ }
+
ast_config_destroy(cfg);
if (con)
More information about the asterisk-commits
mailing list