Fix call forwarding for analog phones.
authorJeff Peeler <jpeeler@digium.com>
Thu, 17 Dec 2009 00:52:03 +0000 (00:52 +0000)
committerJeff Peeler <jpeeler@digium.com>
Thu, 17 Dec 2009 00:52:03 +0000 (00:52 +0000)
(closes issue #16440)
Reported by: mmichelson

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@235382 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c
channels/sig_analog.c

index 707a9b2..ac592e9 100644 (file)
@@ -8685,7 +8685,9 @@ static struct ast_channel *dahdi_new(struct dahdi_pvt *i, int state, int startpb
                tmp->amaflags = i->amaflags;
        i->subs[idx].owner = tmp;
        ast_copy_string(tmp->context, i->context, sizeof(tmp->context));
-       ast_string_field_set(tmp, call_forward, i->call_forward);
+       if (!analog_lib_handles(i->sig, i->radio, i->oprmode)) {
+               ast_string_field_set(tmp, call_forward, i->call_forward);
+       }
        /* If we've been told "no ADSI" then enforce it */
        if (!i->adsi)
                tmp->adsicpe = AST_ADSI_UNAVAILABLE;
index aa0d441..e31e656 100644 (file)
@@ -402,6 +402,7 @@ static struct ast_channel * analog_new_ast_channel(struct analog_pvt *p, int sta
        }
 
        c = p->calls->new_ast_channel(p->chan_pvt, state, startpbx, sub, requestor);
+       ast_string_field_set(c, call_forward, p->call_forward);
        p->subs[sub].owner = c;
        if (!p->owner) {
                p->owner = c;