[chan_lcr] Fixed caller ID by clearing ast->cid first
authorAndreas Eversberg <jolly@eversberg.eu>
Thu, 7 Oct 2010 07:55:23 +0000 (09:55 +0200)
committerAndreas Eversberg <jolly@eversberg.eu>
Sat, 30 Oct 2010 15:24:20 +0000 (17:24 +0200)
Tests with asterisk 1.6.2.13 showed that callerid did not work
unless the ast->cid structure is set to zero.

Thanx for Marcello for prividing this fix.

chan_lcr.c

index 110c337..25515d0 100644 (file)
@@ -881,6 +881,7 @@ static void lcr_in_setup(struct chan_call *call, int message_type, union paramet
                strncpy(ast->context, param->setup.context, AST_MAX_CONTEXT-1);
        else
                strncpy(ast->context, param->setup.callerinfo.interface, AST_MAX_CONTEXT-1);
+       memset(&ast->cid, 0, sizeof(ast->cid));
        if (param->setup.callerinfo.id[0])
                ast->cid.cid_num = strdup(param->setup.callerinfo.id);
        if (param->setup.callerinfo.id2[0])