mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	Run setstate after setting all appropriate variables including callerid
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -656,7 +656,6 @@ static struct ast_channel *oh323_new(struct oh323_pvt *i, int state, const char | ||||
| 		fmt = ast_best_codec(ch->nativeformats); | ||||
| 		ch->type = type; | ||||
| 		ch->fds[0] = ast_rtp_fd(i->rtp); | ||||
| 		ast_setstate(ch, state); | ||||
| 		 | ||||
| 		if (state == AST_STATE_RING) | ||||
| 			ch->rings = 1; | ||||
| @@ -700,6 +699,7 @@ static struct ast_channel *oh323_new(struct oh323_pvt *i, int state, const char | ||||
| 			strncpy(ch->accountcode, i->accountcode, sizeof(ch->accountcode)-1); | ||||
| 		if (i->amaflags) | ||||
| 			ch->amaflags = i->amaflags; | ||||
| 		ast_setstate(ch, state); | ||||
| 		if (state != AST_STATE_DOWN) { | ||||
| 			if (ast_pbx_start(ch)) { | ||||
| 				ast_log(LOG_WARNING, "Unable to start PBX on %s\n", ch->name); | ||||
|   | ||||
| @@ -1557,7 +1557,6 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, char *title) | ||||
| 			tmp->fds[2] = ast_rtp_fd(i->vrtp); | ||||
| 			tmp->fds[3] = ast_rtcp_fd(i->vrtp); | ||||
| 		} | ||||
| 		ast_setstate(tmp, state); | ||||
| 		if (state == AST_STATE_RING) | ||||
| 			tmp->rings = 1; | ||||
| 		tmp->adsicpe = AST_ADSI_UNAVAILABLE; | ||||
| @@ -1605,7 +1604,7 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, char *title) | ||||
| 		if (strlen(i->domain)) { | ||||
| 			pbx_builtin_setvar_helper(tmp, "SIPDOMAIN", i->domain); | ||||
| 		} | ||||
| 						 | ||||
| 		ast_setstate(tmp, state); | ||||
| 		if (state != AST_STATE_DOWN) { | ||||
| 			if (ast_pbx_start(tmp)) { | ||||
| 				ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user