diff options
author | mattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-11 22:20:02 +0000 |
---|---|---|
committer | mattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-11 22:20:02 +0000 |
commit | 54284b39c562ce44ab7eda6e0c708f11638c9730 (patch) | |
tree | be9654ade93637e7e7fcb2cdf1106e276069c889 /funcs | |
parent | e0a639d8d1023a6820a1b0bc1382ddf9ed79d3e0 (diff) |
Add ANI2 support to func_callerid
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85496 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_callerid.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/funcs/func_callerid.c b/funcs/func_callerid.c index f218c8edd..e50731bf0 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); } |