]> git.ipfire.org Git - thirdparty/asterisk.git/commit
cdr.c: Set tenantid from party_a->base instead of chan->base.
authorGeorge Joseph <gjoseph@sangoma.com>
Thu, 17 Jul 2025 21:18:50 +0000 (15:18 -0600)
committerGeorge Joseph <gjoseph@sangoma.com>
Wed, 17 Sep 2025 20:04:26 +0000 (14:04 -0600)
commit10d4f2c45ff02b51a8f9c583c0386ae0d6a6e455
tree0c58a9926ed098ca0299f9a835bddb705ebabf8d
parent263a9f6ee0f6f56dad75f586596f70dbb18960d3
cdr.c: Set tenantid from party_a->base instead of chan->base.

The CDR tenantid was being set in cdr_object_alloc from the channel->base
snapshot.  Since this happens at channel creation before the dialplan is even
reached, calls to `CHANNEL(tenantid)=<something>` in the dialplan were being
ignored.  Instead we now take tenantid from party_a when
cdr_object_create_public_records() is called which is after the call has
ended and all channel snapshots rebuilt.  This is exactly how accountcode
and amaflags, which can also be set in tha dialplpan, are handled.

Resolves: #1259
(cherry picked from commit a4aab9d39f87c25381934f176de32718427af9cb)
main/cdr.c