diff options
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c index 389a4c0f5..48fd119f5 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -10347,8 +10347,11 @@ static int pbx_outgoing_attempt(const char *type, struct ast_format_cap *cap, if (vars) { ast_set_variables(dialed, vars); } - if (account) { + if (!ast_strlen_zero(account)) { + ast_channel_stage_snapshot(dialed); ast_channel_accountcode_set(dialed, account); + ast_channel_peeraccount_set(dialed, account); + ast_channel_stage_snapshot_done(dialed); } ast_set_flag(ast_channel_flags(dialed), AST_FLAG_ORIGINATED); ast_channel_unlock(dialed); |