dect
/
asterisk
Archived
13
0
Fork 0

set MFCR2_CATEGORY just when starting the pbx

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@196456 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
moy 2009-05-23 04:27:47 +00:00
parent 063174ec54
commit 07d13a0190
1 changed files with 5 additions and 4 deletions

View File

@ -7757,10 +7757,6 @@ static struct ast_channel *dahdi_new(struct dahdi_pvt *i, int state, int startpb
/* Assume calls are not idle calls unless we're told differently */
i->isidlecall = 0;
i->alreadyhungup = 0;
#endif
#ifdef HAVE_OPENR2
if (i->mfcr2call)
pbx_builtin_setvar_helper(tmp, "MFCR2_CATEGORY", openr2_proto_get_category_string(i->mfcr2_recvd_category));
#endif
/* clear the fake event in case we posted one before we had ast_channel */
i->fake_event = 0;
@ -7776,6 +7772,11 @@ static struct ast_channel *dahdi_new(struct dahdi_pvt *i, int state, int startpb
pbx_builtin_setvar_helper(tmp, v->name, v->value);
if (startpbx) {
#ifdef HAVE_OPENR2
if (i->mfcr2call) {
pbx_builtin_setvar_helper(tmp, "MFCR2_CATEGORY", openr2_proto_get_category_string(i->mfcr2_recvd_category));
}
#endif
if (ast_pbx_start(tmp)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
ast_hangup(tmp);