Expose SIP URI (bug #3017)
authorMark Spencer <markster@digium.com>
Sun, 12 Dec 2004 01:15:54 +0000 (01:15 +0000)
committerMark Spencer <markster@digium.com>
Sun, 12 Dec 2004 01:15:54 +0000 (01:15 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4432 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index f8ae096..cb66c7e 100755 (executable)
@@ -2017,6 +2017,9 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, char *title)
                if (!ast_strlen_zero(i->exten) && strcmp(i->exten, "s"))
                        tmp->cid.cid_dnid = strdup(i->exten);
                tmp->priority = 1;
+               if (!ast_strlen_zero(i->uri)) {
+                       pbx_builtin_setvar_helper(tmp, "SIPURI", i->uri);
+               }
                if (!ast_strlen_zero(i->domain)) {
                        pbx_builtin_setvar_helper(tmp, "SIPDOMAIN", i->domain);
                }