From 4c5dd299bca54f0fd8491d7da12cc268b549a3b1 Mon Sep 17 00:00:00 2001 From: Matthew Fredrickson Date: Thu, 11 Oct 2007 22:20:02 +0000 Subject: [PATCH] Add ANI2 support to func_callerid git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85496 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- funcs/func_callerid.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/funcs/func_callerid.c b/funcs/func_callerid.c index f218c8edd2..e50731bf02 100644 --- a/funcs/func_callerid.c +++ b/funcs/func_callerid.c @@ -107,6 +107,8 @@ static int callerid_read(struct ast_channel *chan, const char *cmd, char *data, ast_copy_string(buf, ast_named_caller_presentation(chan->cid.cid_pres), len); } else if (!strncasecmp("ton", data, 3)) { snprintf(buf, len, "%d", chan->cid.cid_ton); + } else if (!strncasecmp("ani2", data, 4)) { + snprintf(buf, len, "%d", chan->cid.cid_ani2); } else { ast_log(LOG_ERROR, "Unknown callerid data type '%s'.\n", data); } @@ -171,6 +173,9 @@ static int callerid_write(struct ast_channel *chan, const char *cmd, char *data, } else if (!strncasecmp("ton", data, 3)) { int i = atoi(value); chan->cid.cid_ton = i; + } else if (!strncasecmp("ani2", data, 4)) { + int i = atoi(value); + chan->cid.cid_ani2 = i; } else { ast_log(LOG_ERROR, "Unknown callerid data type '%s'.\n", data); }