Review Board 1.7.16


Prevent DTMF incorrectly triggering during SAS+CAS (CallWaiting) signalling to an FXS port

Review Request #978 - Created Oct. 19, 2010 and submitted

Alec Davis
trunk
18129
Reviewers
asterisk-dev
Asterisk
The dsp incorrectly detects a DTMF 'D' start event, during the call waiting CAS acknowledgement from a CPE device that supports SAS+CAS connected an FXS port.
The result is the SIP call has continuous DTMF RTP packets sent to it.

This can be corrected by the FXS port pressing any DTMF button.
intial setup SIP -> FXS port (TDM800P)
2nd call from console -> same FXS port as above.

Call waiting beep heard, and audio resumes both directions.

Diff revision 3 (Latest)

1 2 3
1 2 3

  1. trunk/channels/chan_dahdi.c: Loading...
trunk/channels/chan_dahdi.c
Revision 293886 New Change
[20] 5129 lines
[+20] [+] static int dahdi_callwait(struct ast_channel *ast)
5130
	p->callwaitingrepeat = CALLWAITING_REPEAT_SAMPLES;
5130
	p->callwaitingrepeat = CALLWAITING_REPEAT_SAMPLES;
5131
	if (p->cidspill) {
5131
	if (p->cidspill) {
5132
		ast_log(LOG_WARNING, "Spill already exists?!?\n");
5132
		ast_log(LOG_WARNING, "Spill already exists?!?\n");
5133
		ast_free(p->cidspill);
5133
		ast_free(p->cidspill);
5134
	}
5134
	}

    
   
5135

   

    
   
5136
	/* SAS: Subscriber Alert Signal, 440Hz for 300ms */

    
   
5137
	/* CAS: CPE Alert Signal, 2130Hz * 2750Hz sine waves */

    
   
5138

   
5135
	if (!(p->cidspill = ast_malloc(2400 /* SAS */ + 680 /* CAS */ + READ_SIZE * 4)))
5139
	if (!(p->cidspill = ast_malloc(2400 /* SAS */ + 680 /* CAS */ + READ_SIZE * 4)))
5136
		return -1;
5140
		return -1;
5137
	save_conference(p);
5141
	save_conference(p);
5138
	/* Silence */
5142
	/* Silence */
5139
	memset(p->cidspill, 0x7f, 2400 + 600 + READ_SIZE * 4);
5143
	memset(p->cidspill, 0x7f, 2400 + 600 + READ_SIZE * 4);
[+20] [20] 3644 lines
[+20] [+] static struct ast_frame *dahdi_read(struct ast_channel *ast)
8784
		p->callwaitrings++;
8788
		p->callwaitrings++;
8785
		dahdi_callwait(ast);
8789
		dahdi_callwait(ast);
8786
	}
8790
	}
8787
	/* Expire CID/CW */
8791
	/* Expire CID/CW */
8788
	if (p->cidcwexpire == 1) {
8792
	if (p->cidcwexpire == 1) {

    
   
8793
		p->callwaitcas = 0;
8789
		ast_verb(3, "CPE does not support Call Waiting Caller*ID.\n");
8794
		ast_verb(3, "CPE does not support Call Waiting Caller*ID.\n");
8790
		restore_conference(p);
8795
		restore_conference(p);
8791
	}
8796
	}
8792
	if (p->subs[idx].linear) {
8797
	if (p->subs[idx].linear) {
8793
		p->subs[idx].f.datalen = READ_SIZE * 2;
8798
		p->subs[idx].f.datalen = READ_SIZE * 2;
[+20] [20] 32 lines
[+20] static struct ast_frame *dahdi_read(struct ast_channel *ast)
8826
		/* Perform busy detection etc on the dahdi line */
8831
		/* Perform busy detection etc on the dahdi line */
8827
		int mute;
8832
		int mute;
8828

    
   
8833

   
8829
		f = ast_dsp_process(ast, p->dsp, &p->subs[idx].f);
8834
		f = ast_dsp_process(ast, p->dsp, &p->subs[idx].f);
8830

    
   
8835

   

    
   
8836
		if (p->callwaitcas) {

    
   
8837
			/* If were in the middle of a SAS+CAS signalling Mute the conference */

    
   
8838
			mute = 1;

    
   
8839
		} else {
8831
		/* Check if DSP code thinks we should be muting this frame and mute the conference if so */
8840
			/* Check if DSP code thinks we should be muting this frame and mute the conference if so */
8832
		mute = ast_dsp_was_muted(p->dsp);
8841
			mute = ast_dsp_was_muted(p->dsp);

    
   
8842
		}
8833
		if (p->muting != mute) {
8843
		if (p->muting != mute) {
8834
			p->muting = mute;
8844
			p->muting = mute;
8835
			dahdi_confmute(p, mute);
8845
			dahdi_confmute(p, mute);
8836
		}
8846
		}
8837

    
   
8847

   
[+20] [20] 9159 lines
  1. trunk/channels/chan_dahdi.c: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.