aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_zapateller.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_zapateller.c')
-rw-r--r--apps/app_zapateller.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/app_zapateller.c b/apps/app_zapateller.c
index 4be09b59c..6af9b963c 100644
--- a/apps/app_zapateller.c
+++ b/apps/app_zapateller.c
@@ -103,8 +103,12 @@ static int zapateller_exec(struct ast_channel *chan, const char *data)
res = ast_safe_sleep(chan, 500);
}
- if (!ast_strlen_zero(chan->cid.cid_num) && nocallerid)
+ if (nocallerid /* Zap caller if no caller id. */
+ && chan->caller.id.number.valid
+ && !ast_strlen_zero(chan->caller.id.number.str)) {
+ /* We have caller id. */
return res;
+ }
if (!res)
res = ast_tonepair(chan, 950, 0, 330, 0);