diff options
author | Russell Bryant <russell@russellbryant.com> | 2006-08-16 03:43:47 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2006-08-16 03:43:47 +0000 |
commit | 9f9a5f19845e38b8829fdff94837b9b760692404 (patch) | |
tree | 98c95aea70e10cb294e357dc51f55ae0e3b448aa /channels/chan_sip.c | |
parent | b6a99250edb1acabf6edea5fd0e49a48d630231b (diff) |
move the calls to ast_jb_configure() to before the PBX thread is started on the
channel to remove the theoretical race condition that the channel could get
bridged before the channel's jitterbuffer gets configured. This was pointed
out by PCadach on IRC. Thanks!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 026df911c..9e5493d07 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3703,6 +3703,8 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit if (!ast_strlen_zero(i->callid)) pbx_builtin_setvar_helper(tmp, "SIPCALLID", i->callid); ast_setstate(tmp, state); + if (i->rtp) + ast_jb_configure(tmp, &global_jbconf); if (state != AST_STATE_DOWN && ast_pbx_start(tmp)) { ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name); tmp->hangupcause = AST_CAUSE_SWITCH_CONGESTION; @@ -3716,10 +3718,6 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit if (recordhistory) append_history(i, "NewChan", "Channel %s - from %s", tmp->name, i->callid); - /* Configure the new channel jb */ - if (tmp && i && i->rtp) - ast_jb_configure(tmp, &global_jbconf); - return tmp; } |