[asterisk-bugs] [DAHDI-linux 0009096]: [patch] DTMF CID without polarity reversal implementation in wctdm for Denmark, Brazil, etc

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Jan 6 19:05:37 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=9096 
====================================================================== 
Reported By:                fleed
Assigned To:                murf
====================================================================== 
Project:                    DAHDI-linux
Issue ID:                   9096
Category:                   NewFeature
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
====================================================================== 
Date Submitted:             2007-02-18 19:02 CST
Last Modified:              2009-01-06 19:05 CST
====================================================================== 
Summary:                    [patch] DTMF CID without polarity reversal
implementation in wctdm for Denmark, Brazil, etc
Description: 
Caller id signaling in Denmark, Brazil and other places is done through
DTMF tones before the first ring, without polarity reversal to indicate the
start of incoming data. Currently wctdm can only detect dtmf callerid if
there is a polarity reversal before the dtmf digits, so it's not working in
some countries.

This uses the idea reported in bug id 9 for wcfxo, but implements it in
wctdm. It fakes a polarity reversal so that the code already in chan_zap
can take that and pass it through the dtmf bit.

To use, patch and build the zaptel part, load the module with option
dtmf=1. Then use the following in zapata.conf:
callerid=asreceived
usecallerid=yes
cidsignalling=dtmf
hidecallerid=no
cidstart=polarity

Works fine in Brazil, on a Telemar line.

======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0000009 [patch] DTMF CLIP not supported by Aste...
related to          0012658 [patch] DTMF issues on Zap
related to          0009201 Problem with caller ID detection when D...
====================================================================== 

---------------------------------------------------------------------- 
 (0097125) loos (reporter) - 2009-01-06 19:05
 http://bugs.digium.com/view.php?id=9096#c97125 
---------------------------------------------------------------------- 
I make it work here... Telefonica with TDM400, asterisk-1.4.22 and
zaptel-bsd-1.4.11

The problem is that DTMF Clip is being detected too late, so when the
thread that read the dtmf callerid starts, the cid is already sent.

So i change this:

+		if (sample > 16000 || sample < -16000) {
+			wc->mod[card].fxo.readcid = 1;

To this (on patch):

+		if (sample > 2000 || sample < -2000) {
+			wc->mod[card].fxo.readcid = 1;

And the patch is working :)

I also change the dtmf detect timeout, but i think this is not change
anything (used just for debug purposes).

Here is the log:

  == Starting post polarity CID detection on channel 1
    -- Starting simple switch on 'Zap/1-1'
  == Receiving DTMF cid on channel Zap/1-1
  == CID got digit 'A'
  == CID got digit '1'
  == CID got digit '1'
  == CID got digit '4'
  == CID got digit '9'
  == CID got digit '7'
  == CID got digit 'X'
  == CID got digit 'X'
  == CID got digit 'X'
  == CID got digit 'X'
  == CID got digit 'X'
  == CID got digit '5'
  == CID got digit 'C'
  == CID got string 'A11497XXXXX5C'
  == CID is '11497XXXXX5', flags 16
    -- Executing [s at default:1] Set("Zap/1-1", "CALLID=11497XXXXX5") in new
stack
    -- Executing [s at default:2] Wait("Zap/1-1", "2") in new stack
    -- Executing [s at default:3] Answer("Zap/1-1", "") in new stack
    -- Executing [s at default:4] Playback("Zap/1-1", "invalid") in new
stack
    -- <Zap/1-1> Playing 'invalid' (language 'en')
    -- Executing [s at default:5] Hangup("Zap/1-1", "") in new stack
  == Spawn extension (default, s, 5) exited non-zero on 'Zap/1-1'
    -- Hungup 'Zap/1-1'
  == Starting post polarity CID detection on channel 1
    -- Starting simple switch on 'Zap/1-1'
  == Receiving DTMF cid on channel Zap/1-1
[Jan  6 23:02:11] WARNING[3700]: chan_dahdi.c:6263 ss_thread: DTMFCID
timed out waiting for ring. Exiting simple switch
    -- Hungup 'Zap/1-1'

Regards,
luiz 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-01-06 19:05 loos           Note Added: 0097125                          
======================================================================




More information about the asterisk-bugs mailing list