Pass redirecting number on PRI calls (bug #2763)
authorMark Spencer <markster@digium.com>
Sun, 31 Oct 2004 23:34:22 +0000 (23:34 +0000)
committerMark Spencer <markster@digium.com>
Sun, 31 Oct 2004 23:34:22 +0000 (23:34 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4134 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_dial.c
channels/chan_zap.c

index eeb9a97..04ea18b 100755 (executable)
@@ -839,6 +839,8 @@ static int dial_exec(struct ast_channel *chan, void *data)
                tmp->chan->cdrflags = chan->cdrflags;
                if (ast_strlen_zero(tmp->chan->musicclass))
                        strncpy(tmp->chan->musicclass, chan->musicclass, sizeof(tmp->chan->musicclass) - 1);
+               if (chan->cid.cid_rdnis)
+                       tmp->chan->cid.cid_rdnis = strdup(chan->cid.cid_rdnis);
                /* Pass callingpres setting */
                tmp->chan->cid.cid_pres = chan->cid.cid_pres;
                /* Pass type of number */
index 78233ab..b544add 100755 (executable)
@@ -1777,6 +1777,7 @@ static int zt_call(struct ast_channel *ast, char *rdest, int timeout)
                pri_sr_set_caller(sr, l, n, p->pri->localdialplan - 1, 
                                        l ? (p->use_callingpres ? ast->cid.cid_pres : PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN) : 
                                                 PRES_NUMBER_NOT_AVAILABLE);
+               pri_sr_set_redirecting(sr, ast->cid.cid_rdnis, p->pri->localdialplan - 1, PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN, PRI_REDIR_UNCONDITIONAL);
                if (pri_setup(p->pri->pri, p->call,  sr)) {
                        ast_log(LOG_WARNING, "Unable to setup call to %s\n", c + p->stripmsd);
                        pri_rel(p->pri);