* the GNU General Public License
*/
-#define TYPE_SILENCE 0x2
#define TYPE_HIGH 0x0
#define TYPE_LOW 0x1
+#define TYPE_SILENCE 0x2
+#define TYPE_DONTSEND 0x3
#define TYPE_MASK 0x3
#include <asterisk/translate.h>
static int g723_len(unsigned char buf)
{
switch(buf & TYPE_MASK) {
- case TYPE_MASK:
+ case TYPE_DONTSEND:
+ return 0;
+ break;
case TYPE_SILENCE:
return 4;
break;
#endif
/* Assume 8000 Hz */
tmp->f.samples += 30;
+ /* FIXME:SLD: Shouldn't the [0] be [cnt]?? */
cnt += g723_len(tmp->outbuf[0]);
tmp->tail -= Frame;
/* Move the data at the end of the buffer to the front */
#include <asterisk/acl.h>
#include <asterisk/channel_pvt.h>
-#define TYPE_SILENCE 0x2
#define TYPE_HIGH 0x0
#define TYPE_LOW 0x1
+#define TYPE_SILENCE 0x2
+#define TYPE_DONTSEND 0x3
#define TYPE_MASK 0x3
static int dtmftimeout = 300; /* 300 samples */
static int g723_len(unsigned char buf)
{
switch(buf & TYPE_MASK) {
- case TYPE_MASK:
+ case TYPE_DONTSEND:
+ return 0;
+ break;
case TYPE_SILENCE:
return 4;
break;