Skip to content

Commit

Permalink
chan_dahdi: Warn if nonexistent cadence is requested.
Browse files Browse the repository at this point in the history
If attempting to ring a channel using a nonexistent cadence,
emit a warning, before falling back to the default cadence.

Resolves: #409
  • Loading branch information
InterLinked1 authored and asterisk-org-access-app[bot] committed Nov 7, 2023
1 parent 69cf329 commit 293577f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions channels/chan_dahdi.c
Expand Up @@ -2024,6 +2024,9 @@ static void my_set_cadence(void *pvt, int *cid_rings, struct ast_channel *ast)
ast_log(LOG_WARNING, "Unable to set distinctive ring cadence %d on '%s': %s\n", p->distinctivering, ast_channel_name(ast), strerror(errno));
*cid_rings = cidrings[p->distinctivering - 1];
} else {
if (p->distinctivering > 0) {
ast_log(LOG_WARNING, "Cadence %d is not defined, falling back to default ring cadence\n", p->distinctivering);
}
if (ioctl(p->subs[SUB_REAL].dfd, DAHDI_SETCADENCE, NULL))
ast_log(LOG_WARNING, "Unable to reset default ring on '%s': %s\n", ast_channel_name(ast), strerror(errno));
*cid_rings = p->sendcalleridafter;
Expand Down

0 comments on commit 293577f

Please sign in to comment.