summaryrefslogtreecommitdiff
path: root/channels/chan_pjsip.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2014-08-20 20:04:08 +0000
committerMark Michelson <mmichelson@digium.com>2014-08-20 20:04:08 +0000
commit04876df6a220373d9db0d83f0f0d655c59312322 (patch)
treeeb4d3e970366c04c76fd57680a5914c7d3b67b78 /channels/chan_pjsip.c
parent04f478212cf0a87e38bf1ad1369836116c7ca9f1 (diff)
Move evaluation of set_var options in pjsip to the end of channel initialization.
This allows for set_var to override certain defaults such as caller ID and codec values. This also fixes a test suite regression. The "set_var" test suite test attempted to use set_var to override caller ID, but a recent change caused that to no longer work. ........ Merged revisions 421565 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@421566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_pjsip.c')
-rw-r--r--channels/chan_pjsip.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index ac7543c3e..0c535d703 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -402,12 +402,6 @@ static struct ast_channel *chan_pjsip_new(struct ast_sip_session *session, int s
return NULL;
}
- for (var = session->endpoint->channel_vars; var; var = var->next) {
- char buf[512];
- pbx_builtin_setvar_helper(chan, var->name, ast_get_encoded_str(
- var->value, buf, sizeof(buf)));
- }
-
ast_channel_stage_snapshot(chan);
ast_channel_tech_pvt_set(chan, channel);
@@ -459,6 +453,12 @@ static struct ast_channel *chan_pjsip_new(struct ast_sip_session *session, int s
ast_channel_zone_set(chan, zone);
}
+ for (var = session->endpoint->channel_vars; var; var = var->next) {
+ char buf[512];
+ pbx_builtin_setvar_helper(chan, var->name, ast_get_encoded_str(
+ var->value, buf, sizeof(buf)));
+ }
+
ast_channel_stage_snapshot_done(chan);
ast_channel_unlock(chan);