mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
channel: Preserve CHANNEL(userfield) on masquerade.
In certain circumstances a channel may undergo an operation
referred to as a masquerade. If this occurs the CHANNEL(userfield)
value was not preserved causing it to get lost. This change makes
it so that this field is now preserved.
Fixes: #882
(cherry picked from commit fd196e9113
)
This commit is contained in:
committed by
Asterisk Development Team
parent
d9e01cf0a1
commit
2f44ac22b2
@@ -7216,6 +7216,9 @@ static void channel_do_masquerade(struct ast_channel *original, struct ast_chann
|
||||
/* copy over accuntcode and set peeraccount across the bridge */
|
||||
ast_channel_accountcode_set(original, S_OR(ast_channel_accountcode(clonechan), ""));
|
||||
|
||||
/* copy over userfield */
|
||||
ast_channel_userfield_set(original, ast_channel_userfield(clonechan));
|
||||
|
||||
ast_debug(1, "Putting channel %s in %s/%s formats\n", ast_channel_name(original),
|
||||
ast_format_get_name(wformat), ast_format_get_name(rformat));
|
||||
|
||||
|
Reference in New Issue
Block a user