diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index d1363f9a74cabc268d26ad5b883f4ebf7ce2bae7..5f64575194c72e6895008a3c40b525b9ee6f85f7 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -17873,6 +17873,9 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct int y; struct ast_variable *dahdichan = NULL; + /* Re-parse any cadences from beginning, rather than appending until we run out of room */ + user_has_defined_cadences = 0; + for (; v; v = v->next) { if (!ast_jb_read_conf(&global_jbconf, v->name, v->value)) continue; diff --git a/configs/samples/chan_dahdi.conf.sample b/configs/samples/chan_dahdi.conf.sample index 5c3af43623e6bc57c35574abf482c3aab4e5c509..6333351c0ddbab5f2af9b684964c8130e9ddba99 100644 --- a/configs/samples/chan_dahdi.conf.sample +++ b/configs/samples/chan_dahdi.conf.sample @@ -1286,10 +1286,11 @@ pickupgroup=1 ; You can define your own custom ring cadences here. You can define up to 8 ; pairs. If the silence is negative, it indicates where the caller ID spill is ; to be placed. Also, if you define any custom cadences, the default cadences -; will be turned off. +; will be turned off (overwritten). ; ; This setting is global, rather than per-channel. It will not update on -; a reload. +; a reload, but new and modified cadences will update on dahdi restart. +; A maximum of 24 cadences may be specified. ; ; Syntax is: cadence=ring,silence[,ring,silence[...]] ; diff --git a/doc/CHANGES-staging/chan_dahdi_cadences.txt b/doc/CHANGES-staging/chan_dahdi_cadences.txt new file mode 100644 index 0000000000000000000000000000000000000000..b888926eee92e170980a102cb29f9ee9cc30673a --- /dev/null +++ b/doc/CHANGES-staging/chan_dahdi_cadences.txt @@ -0,0 +1,8 @@ +Subject: chan_dahdi + +Previously, cadences were appended on dahdi restart, +rather than reloaded. This prevented cadences from +being updated and maxed out the available cadences +if reloaded multiple times. This behavior is fixed +so that reloading cadences is idempotent and cadences +can actually be reloaded.