Copy Caller*ID on local channels
authorMark Spencer <markster@digium.com>
Sat, 3 May 2003 05:53:42 +0000 (05:53 +0000)
committerMark Spencer <markster@digium.com>
Sat, 3 May 2003 05:53:42 +0000 (05:53 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@954 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_local.c

index 69ed0c9..56c3c64 100755 (executable)
@@ -189,6 +189,15 @@ static int local_digit(struct ast_channel *ast, char digit)
 static int local_call(struct ast_channel *ast, char *dest, int timeout)
 {
        struct local_pvt *p = ast->pvt->pvt;
+
+       if (p->owner->callerid)
+               p->chan->callerid = strdup(p->owner->callerid);
+       else
+               p->chan->callerid = NULL;
+       if (p->owner->ani)
+               p->chan->ani = strdup(p->owner->ani);
+       else
+               p->chan->ani = NULL;
        /* Start switch on sub channel */
        return ast_pbx_start(p->chan);
 }