mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
Update documentation for 'comebacktoorigin' in featuers.conf.
The documentation for this option did not match the code. Fix that along with some minor cleanups to the code along the way. Document a slight change in behavior (to something that was previously undocumented) in UPGRADE.txt. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -20,6 +20,13 @@
|
|||||||
|
|
||||||
From 1.6.2 to 1.8:
|
From 1.6.2 to 1.8:
|
||||||
|
|
||||||
|
* The behavior of the 'parkedcallstimeout' has changed slightly. The formulation
|
||||||
|
of the extension name that a timed out parked call is delivered to when this
|
||||||
|
option is set to 'no' was modified such that instead of converting '/' to '0',
|
||||||
|
the '/' is converted to an underscore '_'. See the updated documentation in
|
||||||
|
features.conf.sample for more information on the behavior of the
|
||||||
|
'parkedcallstimeout' option.
|
||||||
|
|
||||||
* Asterisk-addons no longer exists as an independent package. Those modules
|
* Asterisk-addons no longer exists as an independent package. Those modules
|
||||||
now live in the addons directory of the main Asterisk source tree. They
|
now live in the addons directory of the main Asterisk source tree. They
|
||||||
are not enabled by default. For more information about why modules live in
|
are not enabled by default. For more information about why modules live in
|
||||||
|
@@ -11,9 +11,33 @@ context => parkedcalls ; Which context parked calls are in (default parking lot
|
|||||||
;parkinghints = no ; Add hints priorities automatically for parking slots (default is no).
|
;parkinghints = no ; Add hints priorities automatically for parking slots (default is no).
|
||||||
;parkingtime => 45 ; Number of seconds a call can be parked for
|
;parkingtime => 45 ; Number of seconds a call can be parked for
|
||||||
; (default is 45 seconds)
|
; (default is 45 seconds)
|
||||||
;comebacktoorigin = yes ; Whether to return to the original calling extension upon parking
|
|
||||||
; timeout or to send the call to context 'parkedcallstimeout' at
|
;comebacktoorigin = yes ; Setting this option configures the behavior of call parking when the
|
||||||
; extension 's', priority '1' (default is yes).
|
; parked call times out (See the parkingtime option). The default value is 'yes'.
|
||||||
|
;
|
||||||
|
; 'yes' - When the parked call times out, attempt to send the call back to the peer
|
||||||
|
; that parked this call. This is done by saving off the name of the channel
|
||||||
|
; that parked the call.
|
||||||
|
;
|
||||||
|
; 'no' - This option is useful for performing custom dialplan functionality prior to
|
||||||
|
; sending the call back to the extension that initially parked the call, or to
|
||||||
|
; an entirely different destination.
|
||||||
|
;
|
||||||
|
; When the parked call times out, send it back to the dialplan. The location
|
||||||
|
; will be the 'parkedcallstimeout' context. The extension will be built from
|
||||||
|
; the saved channel name that parked the call. For example, if a SIP peer named
|
||||||
|
; '0004F2040001' parked this call, the extension will be 'SIP_0004F2040001'.
|
||||||
|
; (Note that an underscore is used here because the '/' character has a special
|
||||||
|
; meaning in extension names for CallerID matching.) If this extension does not
|
||||||
|
; exist, the call will be sent to the 's' extension, instead. Finally, if the 's'
|
||||||
|
; extension of 'parkedcallstimeout' does not exist, the call will fall back to the
|
||||||
|
; 's' extension of the 'default' context.
|
||||||
|
;
|
||||||
|
; Additionally, in this example an extension of 'SIP_0004F2040001' will be
|
||||||
|
; created in the 'park-dial' context. This extension will be set up to do a
|
||||||
|
; Dial() to 'SIP/0004F2040001'.
|
||||||
|
;
|
||||||
|
|
||||||
;courtesytone = beep ; Sound file to play to the parked caller
|
;courtesytone = beep ; Sound file to play to the parked caller
|
||||||
; when someone dials a parked call
|
; when someone dials a parked call
|
||||||
; or the Touch Monitor is activated/deactivated.
|
; or the Touch Monitor is activated/deactivated.
|
||||||
|
@@ -3629,21 +3629,24 @@ int manage_parkinglot(struct ast_parkinglot *curlot, fd_set *rfds, fd_set *efds,
|
|||||||
if (pu->peername[0]) {
|
if (pu->peername[0]) {
|
||||||
char *peername = ast_strdupa(pu->peername);
|
char *peername = ast_strdupa(pu->peername);
|
||||||
char *cp = strrchr(peername, '-');
|
char *cp = strrchr(peername, '-');
|
||||||
char peername_flat[AST_MAX_EXTENSION]; /* using something like DAHDI/52 for an extension name is NOT a good idea */
|
char *peername_flat; /* using something like DAHDI/52 for an extension name is NOT a good idea */
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (cp)
|
if (cp) {
|
||||||
*cp = 0;
|
*cp = 0;
|
||||||
ast_copy_string(peername_flat,peername,sizeof(peername_flat));
|
|
||||||
for(i=0; peername_flat[i] && i < AST_MAX_EXTENSION; i++) {
|
|
||||||
if (peername_flat[i] == '/')
|
|
||||||
peername_flat[i]= '0';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
peername_flat = ast_strdupa(peername);
|
||||||
|
for (i = 0; peername_flat[i]; i++) {
|
||||||
|
if (peername_flat[i] == '/') {
|
||||||
|
peername_flat[i]= '_';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
con = ast_context_find_or_create(NULL, NULL, pu->parkinglot->parking_con_dial, registrar);
|
con = ast_context_find_or_create(NULL, NULL, pu->parkinglot->parking_con_dial, registrar);
|
||||||
if (!con) {
|
if (!con) {
|
||||||
ast_log(LOG_ERROR, "Parking dial context '%s' does not exist and unable to create\n", pu->parkinglot->parking_con_dial);
|
ast_log(LOG_ERROR, "Parking dial context '%s' does not exist and unable to create\n", pu->parkinglot->parking_con_dial);
|
||||||
}
|
} else {
|
||||||
if (con) {
|
|
||||||
char returnexten[AST_MAX_EXTENSION];
|
char returnexten[AST_MAX_EXTENSION];
|
||||||
struct ast_datastore *features_datastore;
|
struct ast_datastore *features_datastore;
|
||||||
struct ast_dial_features *dialfeatures = NULL;
|
struct ast_dial_features *dialfeatures = NULL;
|
||||||
@@ -3663,7 +3666,7 @@ int manage_parkinglot(struct ast_parkinglot *curlot, fd_set *rfds, fd_set *efds,
|
|||||||
char buf[MAX_DIAL_FEATURE_OPTIONS] = {0,};
|
char buf[MAX_DIAL_FEATURE_OPTIONS] = {0,};
|
||||||
snprintf(returnexten, sizeof(returnexten), "%s,30,%s", peername, callback_dialoptions(&(dialfeatures->features_callee), &(dialfeatures->features_caller), buf, sizeof(buf)));
|
snprintf(returnexten, sizeof(returnexten), "%s,30,%s", peername, callback_dialoptions(&(dialfeatures->features_callee), &(dialfeatures->features_caller), buf, sizeof(buf)));
|
||||||
} else { /* Existing default */
|
} else { /* Existing default */
|
||||||
ast_log(LOG_WARNING, "Dialfeatures not found on %s, using default!\n", chan->name);
|
ast_log(LOG_NOTICE, "Dial features not found on %s, using default!\n", chan->name);
|
||||||
snprintf(returnexten, sizeof(returnexten), "%s,30,t", peername);
|
snprintf(returnexten, sizeof(returnexten), "%s,30,t", peername);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3676,7 +3679,6 @@ int manage_parkinglot(struct ast_parkinglot *curlot, fd_set *rfds, fd_set *efds,
|
|||||||
if (comebacktoorigin) {
|
if (comebacktoorigin) {
|
||||||
set_c_e_p(chan, pu->parkinglot->parking_con_dial, peername_flat, 1);
|
set_c_e_p(chan, pu->parkinglot->parking_con_dial, peername_flat, 1);
|
||||||
} else {
|
} else {
|
||||||
ast_log(LOG_WARNING, "now going to parkedcallstimeout,s,1 | ps is %d\n",pu->parkingnum);
|
|
||||||
snprintf(parkingslot, sizeof(parkingslot), "%d", pu->parkingnum);
|
snprintf(parkingslot, sizeof(parkingslot), "%d", pu->parkingnum);
|
||||||
pbx_builtin_setvar_helper(chan, "PARKINGSLOT", parkingslot);
|
pbx_builtin_setvar_helper(chan, "PARKINGSLOT", parkingslot);
|
||||||
set_c_e_p(chan, "parkedcallstimeout", peername_flat, 1);
|
set_c_e_p(chan, "parkedcallstimeout", peername_flat, 1);
|
||||||
|
Reference in New Issue
Block a user