--- /dev/null
+Information for Upgrading From Asterisk 1.0
+===========================================
+
+Agents:
+
+* The default for ackcall has been changed to "no" instead of "yes"
+ because of a bug which caused the "yes" behavior to generally act like
+ "no". You may need to adjust the value if your agents behave
+ differently than you expect with respect to acknowledgement.
+
+Dialing:
+
+* The Caller*ID of the outbound leg is now the extension that was
+ called, rather than the Caller*ID of the inbound leg of the call. The
+ "o" flag for Dial can be used to restore the original behavior if
+ desired.
for us when the PBX instance that called login finishes */
if (!ast_strlen_zero(p->loginchan)) {
p->chan->_bridge = NULL;
+ if (p->chan)
+ ast_log(LOG_DEBUG, "Bridge on '%s' being cleared (2)\n", p->chan->name);
ast_hangup(p->chan);
if (p->wrapuptime) {
gettimeofday(&p->lastdisc, NULL);
p->acknowledged = 0;
}
}
- if ((p->chan && (p->chan->_state != AST_STATE_UP)) && f && (f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_ANSWER)) {
+ if (p->chan && f && (f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_ANSWER)) {
/* TC */
+ ast_log(LOG_DEBUG, "Got answer on %s\n", p->chan->name);
if (p->ackcall) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "%s answered, waiting for '#' to acknowledge\n", p->chan->name);
f = &null_frame;
} else {
p->acknowledged = 1;
+ ast_frfree(f);
f = &answer_frame;
- if (p->chan)
- p->chan->_bridge = ast;
-
}
}
if (f && (f->frametype == AST_FRAME_DTMF) && (f->subclass == '#')) {
p->acknowledged = 1;
ast_frfree(f);
f = &answer_frame;
- if (p->chan)
- p->chan->_bridge = ast;
}
}
if (f && (f->frametype == AST_FRAME_DTMF) && (f->subclass == '*')) {
f = NULL;
}
CLEANUP(ast,p);
+ if (p->chan && !p->chan->_bridge) {
+ if (strcasecmp(p->chan->type, "Local")) {
+ p->chan->_bridge = ast;
+ if (p->chan)
+ ast_log(LOG_DEBUG, "Bridge on '%s' being set to '%s' (3)\n", p->chan->name, p->chan->_bridge->name);
+ }
+ }
ast_mutex_unlock(&p->lock);
if (recordagentcalls && f == &answer_frame)
agent_start_monitoring(ast,0);
if (recordagentcalls)
agent_start_monitoring(ast,0);
p->acknowledged = 1;
- if (p->chan)
- p->chan->_bridge = ast;
}
res = 0;
}
group = 0;
autologoff = 0;
wrapuptime = 0;
- ackcall = 1;
+ ackcall = 0;
cfg = ast_config_load(config);
if (!cfg) {
ast_log(LOG_NOTICE, "No agent configuration found -- agent support disabled\n");
{
if (p->alreadymasqed || p->nooptimization)
return;
- if (isoutbound && p->chan && ast_bridged_channel(p->chan) && p->owner) {
+ if (isoutbound && p->chan && p->chan->_bridge /* Not ast_bridged_channel! Only go one step! */ && p->owner) {
/* Masquerade bridged channel into owner */
/* Lock everything we need, one by one, and give up if
we can't get everything. Remember, we'll get another
chance in just a little bit */
- if (!ast_mutex_trylock(&(ast_bridged_channel(p->chan))->lock)) {
+ if (!ast_mutex_trylock(&(p->chan->_bridge)->lock)) {
if (!ast_mutex_trylock(&p->owner->lock)) {
- ast_channel_masquerade(p->owner, ast_bridged_channel(p->chan));
+ ast_channel_masquerade(p->owner, p->chan->_bridge);
p->alreadymasqed = 1;
ast_mutex_unlock(&p->owner->lock);
}
- ast_mutex_unlock(&(ast_bridged_channel(p->chan)->lock));
+ ast_mutex_unlock(&(p->chan->_bridge)->lock);
}
- } else if (!isoutbound && p->owner && ast_bridged_channel(p->owner) && p->chan) {
+ } else if (!isoutbound && p->owner && p->owner->_bridge && p->chan) {
/* Masquerade bridged channel into chan */
- if (!ast_mutex_trylock(&(ast_bridged_channel(p->owner)->lock))) {
+ if (!ast_mutex_trylock(&(p->owner->_bridge)->lock)) {
if (!ast_mutex_trylock(&p->chan->lock)) {
- ast_channel_masquerade(p->chan, ast_bridged_channel(p->owner));
+ ast_channel_masquerade(p->chan, p->owner->_bridge);
p->alreadymasqed = 1;
ast_mutex_unlock(&p->chan->lock);
}
- ast_mutex_unlock(&(ast_bridged_channel(p->owner)->lock));
+ ast_mutex_unlock(&(p->owner->_bridge)->lock);
}
}
}
if (c) {
transfer_to = ast_bridged_channel(c);
if (transfer_to) {
+ ast_log(LOG_DEBUG, "Got SIP blind transfer, applying to '%s'\n", transfer_to->name);
ast_moh_stop(transfer_to);
if (!strcmp(p->refer_to, ast_parking_ext())) {
/* Must release c's lock now, because it will not longer
ast_async_goto(transfer_to,p->context, p->refer_to,1);
}
} else {
+ ast_log(LOG_DEBUG, "Got SIP blind transfer but nothing to transfer to.\n");
ast_queue_hangup(p->owner);
}
}
;autologoff=15
;
; Define ackcall to require an acknowledgement by '#' when
-; an agent logs in using agentcallbacklogin. Default is "yes".
+; an agent logs in using agentcallbacklogin. Default is "no".
;
-;ackcall=yes
+;ackcall=no
;
; Define wrapuptime. This is the minimum amount of time when
; after disconnecting before the caller can receive a new call