mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	Extract sig_ss7 out of chan_dahdi.
Extract the SS7 specific code out of chan_dahdi like what was done to ISDN/PRI and analog signaling. The new SS7 structures were modeled on sig_pri. The changes to sig_pri are an enhancement and a bug fix made possible because SS7 was extracted. 1) The sig_pri TRANSFERCAPABILITY channel variable should have been set unconditionally in sig_pri_new_ast_channel(). 2) SS7/PRI transfer capability interaction in dahdi_new() fixed because of SS7 extraction. 3) Module ref count error in dahdi_new() if startpbx failed to start the PBX for some reason. Review: https://reviewboard.asterisk.org/r/661/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -786,12 +786,12 @@ static int sig_pri_play_tone(struct sig_pri_chan *p, enum sig_pri_tone tone) | ||||
| 		return -1; | ||||
| } | ||||
|  | ||||
| static struct ast_channel *sig_pri_new_ast_channel(struct sig_pri_chan *p, int state, int startpbx, int ulaw, int transfercapability, char *exten, const struct ast_channel *requestor) | ||||
| static struct ast_channel *sig_pri_new_ast_channel(struct sig_pri_chan *p, int state, int ulaw, int transfercapability, char *exten, const struct ast_channel *requestor) | ||||
| { | ||||
| 	struct ast_channel *c; | ||||
|  | ||||
| 	if (p->calls->new_ast_channel) | ||||
| 		c = p->calls->new_ast_channel(p->chan_pvt, state, startpbx, ulaw, transfercapability, exten, requestor); | ||||
| 		c = p->calls->new_ast_channel(p->chan_pvt, state, ulaw, exten, requestor); | ||||
| 	else | ||||
| 		return NULL; | ||||
|  | ||||
| @@ -799,9 +799,10 @@ static struct ast_channel *sig_pri_new_ast_channel(struct sig_pri_chan *p, int s | ||||
| 		p->owner = c; | ||||
| 	p->isidlecall = 0; | ||||
| 	p->alreadyhungup = 0; | ||||
| 	c->transfercapability = transfercapability; | ||||
| 	pbx_builtin_setvar_helper(c, "TRANSFERCAPABILITY", | ||||
| 		ast_transfercapability2str(transfercapability)); | ||||
| 	if (transfercapability & AST_TRANS_CAP_DIGITAL) { | ||||
| 		c->transfercapability = transfercapability; | ||||
| 		pbx_builtin_setvar_helper(c, "TRANSFERCAPABILITY", ast_transfercapability2str(transfercapability)); | ||||
| 		sig_pri_set_digital(p, 1); | ||||
| 	} | ||||
| 	if (p->pri && !pri_grab(p, p->pri)) { | ||||
| @@ -841,7 +842,7 @@ struct ast_channel *sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law | ||||
| 	ast_log(LOG_DEBUG, "%s %d\n", __FUNCTION__, p->channel); | ||||
|  | ||||
| 	p->outgoing = 1; | ||||
| 	ast = sig_pri_new_ast_channel(p, AST_STATE_RESERVED, 0, law, transfercapability, p->exten, requestor); | ||||
| 	ast = sig_pri_new_ast_channel(p, AST_STATE_RESERVED, law, transfercapability, p->exten, requestor); | ||||
| 	if (!ast) { | ||||
| 		p->outgoing = 0; | ||||
| 	} | ||||
| @@ -4504,7 +4505,7 @@ static void *pri_dchannel(void *vpri) | ||||
| 							 */ | ||||
| 							ast_mutex_unlock(&pri->lock); | ||||
| 							c = sig_pri_new_ast_channel(pri->pvts[chanpos], | ||||
| 								AST_STATE_RESERVED, 0, | ||||
| 								AST_STATE_RESERVED, | ||||
| 								(e->ring.layer1 == PRI_LAYER_1_ALAW) | ||||
| 									? SIG_PRI_ALAW : SIG_PRI_ULAW, | ||||
| 								e->ring.ctype, pri->pvts[chanpos]->exten, NULL); | ||||
| @@ -4597,7 +4598,7 @@ static void *pri_dchannel(void *vpri) | ||||
| 							 */ | ||||
| 							ast_mutex_unlock(&pri->lock); | ||||
| 							c = sig_pri_new_ast_channel(pri->pvts[chanpos], | ||||
| 								AST_STATE_RING, 0, | ||||
| 								AST_STATE_RING, | ||||
| 								(e->ring.layer1 == PRI_LAYER_1_ALAW) | ||||
| 									? SIG_PRI_ALAW : SIG_PRI_ULAW, e->ring.ctype, | ||||
| 								pri->pvts[chanpos]->exten, NULL); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user