Populate DNID for SIP
authorMark Spencer <markster@digium.com>
Fri, 19 Mar 2004 02:04:45 +0000 (02:04 +0000)
committerMark Spencer <markster@digium.com>
Fri, 19 Mar 2004 02:04:45 +0000 (02:04 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2464 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 17bc871..7bc2895 100755 (executable)
@@ -1532,6 +1532,8 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, char *title)
                        tmp->callerid = strdup(i->callerid);
                if (strlen(i->rdnis))
                        tmp->rdnis = strdup(i->rdnis);
+               if (strlen(i->exten) && strcmp(i->exten, "s"))
+                       tmp->dnid = strdup(i->exten);
                tmp->priority = 1;
                if (strlen(i->domain)) {
                        pbx_builtin_setvar_helper(tmp, "SIPDOMAIN", i->domain);