diff options
Diffstat (limited to 'funcs/func_callerid.c')
-rw-r--r-- | funcs/func_callerid.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/funcs/func_callerid.c b/funcs/func_callerid.c index 5e5585432..3c595daab 100644 --- a/funcs/func_callerid.c +++ b/funcs/func_callerid.c @@ -191,6 +191,7 @@ static int callerid_read(struct ast_channel *chan, const char *cmd, char *data, static int callerid_write(struct ast_channel *chan, const char *cmd, char *data, const char *value) { + int valid = 1; if (!value || !chan) return -1; @@ -267,6 +268,11 @@ static int callerid_write(struct ast_channel *chan, const char *cmd, char *data, chan->cid.cid_ton = atoi(value); } else { ast_log(LOG_ERROR, "Unknown callerid data type '%s'.\n", data); + valid = 0; + } + + if (valid) { + chan->cid.cid_tns = 1; } return 0; |