diff options
author | Sebastian Gutierrez <sgutierrez@integraccs.com> | 2017-03-21 14:32:06 -0300 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2017-03-22 07:32:29 -0600 |
commit | e196190f118d12212311e79b27177484e8c0a472 (patch) | |
tree | e90fd86df3ad0a33c90ce6dfc70602251dba862e | |
parent | fdea3698527495c940e03a45df03621c7a9a876c (diff) |
cdr: Allow setting of user field from 'h' extension
The CDR code previously did not allow the user field to be set
from the 'h' extension in the dialplan. This change removes that
limitation and allows it to be set.
ASTERISK-26818
Change-Id: I0fed8a79b5e408bac4e30542b8f33a61c5ed9aa6
-rw-r--r-- | main/cdr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/cdr.c b/main/cdr.c index 5e515d823..2d2f51b3f 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -3227,7 +3227,7 @@ static int cdr_object_update_party_b_userfield_cb(void *obj, void *arg, int flag struct party_b_userfield_update *info = arg; struct cdr_object *it_cdr; for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) { - if (it_cdr->fn_table == &finalized_state_fn_table) { + if (it_cdr->fn_table == &finalized_state_fn_table && it_cdr->next != NULL) { continue; } if (it_cdr->party_b.snapshot @@ -3251,7 +3251,7 @@ void ast_cdr_setuserfield(const char *channel_name, const char *userfield) if (cdr) { ao2_lock(cdr); for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) { - if (it_cdr->fn_table == &finalized_state_fn_table) { + if (it_cdr->fn_table == &finalized_state_fn_table && it_cdr->next != NULL) { continue; } strcpy(it_cdr->party_a.userfield, userfield); |