usecnt++;
ast_mutex_unlock(&usecnt_lock);
ast_update_use_count();
+ ast_jb_configure(tmp, &global_jbconf);
if (state != AST_STATE_DOWN) {
if (ast_pbx_start(tmp)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
tmp = NULL;
}
}
- if (tmp)
- ast_jb_configure(tmp, &global_jbconf);
}
return tmp;
}
ch->cid.cid_dnid = strdup(pvt->exten);
}
ast_setstate(ch, state);
+ if (pvt->rtp)
+ ast_jb_configure(ch, &global_jbconf);
if (state != AST_STATE_DOWN) {
if (ast_pbx_start(ch)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", ch->name);
ch = NULL;
}
}
-
- /* Configure the new channel jb */
- if (ch && pvt && pvt->rtp)
- ast_jb_configure(ch, &global_jbconf);
} else {
ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
}
tmp->cid.cid_dnid = ast_strdup(i->exten);
tmp->priority = 1;
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;
tmp = NULL;
}
- /* Configure the new channel jb */
- if (tmp && i && i->rtp)
- ast_jb_configure(tmp, &global_jbconf);
-
return tmp;
}
if (!i->adsi)
tmp->adsicpe = AST_ADSI_UNAVAILABLE;
tmp->priority = 1;
+ if (sub->rtp)
+ ast_jb_configure(tmp, &global_jbconf);
if (state != AST_STATE_DOWN) {
if (ast_pbx_start(tmp)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
ast_verbose(VERBOSE_PREFIX_3 "MGCP mgcp_new(%s) created in state: %s\n",
tmp->name, ast_state2str(state));
}
-
- /* Configure the new channel jb */
- if (tmp && sub && sub->rtp)
- ast_jb_configure(tmp, &global_jbconf);
} else {
ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
}
usecnt++;
ast_mutex_unlock(&usecnt_lock);
ast_update_use_count();
+ ast_jb_configure(c, &global_jbconf);
if (state != AST_STATE_DOWN) {
if (ast_pbx_start(c)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", c->name);
/* XXX what about usecnt ? */
}
}
- if (c)
- ast_jb_configure(c, &global_jbconf);
return c;
}
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;
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;
}
tmp->priority = 1;
tmp->adsicpe = AST_ADSI_UNAVAILABLE;
+ if (sub->rtp)
+ ast_jb_configure(tmp, &global_jbconf);
+
if (state != AST_STATE_DOWN) {
if (ast_pbx_start(tmp)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
tmp = NULL;
}
}
-
- /* Configure the new channel jb */
- if (tmp && sub->rtp)
- ast_jb_configure(tmp, &global_jbconf);
}
return tmp;
}