[Asterisk-Dev] how to modify dsp.c to make it work that busydetect can detect busy tone 450hz 0.35s<On Time(ms)> 0.35<Off Time(ms)?

dev2003 at mail.ustc.edu.cn dev2003 at mail.ustc.edu.cn
Mon Nov 29 19:15:30 MST 2004


how to modify dsp.c to make it work that busydetect  can detect busy tone 
  450hz 0.35s<On Time(ms)> 0.35<Off Time(ms)?

busy tone    450hz 0.35s<On Time(ms)> 0.35<Off Time(ms)?
it is china tone plan
from
http://www.cisco.com/univercd/cc/td/doc/product/tel_pswt/vco_prod/chn3_sup/index.htm

 I have add zaptel/zonedata.c
	{ 20, "cn", "CHINA", { 2000, 4000 },
	{
		{ ZT_TONE_DIALTONE, "450" },
		{ ZT_TONE_BUSY, "450/350,0/350" },
		{ ZT_TONE_RINGTONE, "450/1000,0/4000" },
		{ ZT_TONE_CONGESTION, "450/250,0/250" },
		{ ZT_TONE_CALLWAIT, "450/400,0/4000" },
		/* Not sure about  */
		{ ZT_TONE_DIALRECALL,
"!450/100,!0/100,!450/100,!0/100,!450/100,!0/100,450" },
		{ ZT_TONE_RECORDTONE, "1400/500,0/15000" },
		{ ZT_TONE_INFO, "!950/330,!1400/330,!1800/330,0" },
		{ ZT_TONE_STUTTER, "450" } },
	},
and modify indications.conf
add china zone date
[general]
country=cn
[cn]
description = CHINA
ringcadance = 1000,4000
dial =  450
busy =  450/350,0/350
ring =  450/1000,0/4000
congestion = 450/250,0/250
callwaiting = 450/400,0/4000
dialrecall = !450/100,!0/100,!450/100,!0/100,!450/100,!0/100,450
record = 1400/500,0/15000
info = !950/330,!1400/330,!1800/330,0

But is does not work
i think busydetect and  callprocess can not work outside USA
how to modify dsp.c so that It can detect busytone outside US?
I have a X100P connected to my analog PBX. I can′t
detect hangups on this line
While the line is connected to the PBX, I can never detect busy and the
line hangs at the end of every call.
How can I adjust the detection routines to the tone I′m getting?  I
have tried to mess with busy_min, busy_max etc on dsp.c with no luck.

in /etc/asterisk/zapata.conf
busydetect=yes
busycount=4
callprogress=no

when set callprogress=yes ,can not answer the call.
BUT busydetect can not  detect hangup,callprogress can not detect hangup
outside US,
Tone plan :
busy tone    450hz 0.35s<On Time(ms)> 0.35<Off Time(ms)
how to modify dsp.c to detect busy tone  450hz 0.35s<On Time(ms)>
0.35<Off Time(ms)?
thanks


dsp.c
#ifdef BUSYDETECT_MARTIN
int ast_dsp_busydetect(struct ast_dsp *dsp)

I find that it is not 1 .
((hittone >= dsp->busycount - 1) && (hitsilence >= dsp->busycount - 1) &&
(avgtone >= BUSY_MIN && avgtone <= BUSY_MAX) && (avgsilence >= BUSY_MIN &&
avgsilence <= BUSY_MAX)


2004-11-12 14:32:04 DEBUG[26996]: dsp.c:1320 ast_dsp_busydetect: TEST
show: dsp->busycount - 1:3,hittone:0 ,hitsilence :0, avgtone 270 ,
avgsilence 100





More information about the asterisk-dev mailing list