Koozali.org: home of the SME Server

Correct setting of Country Cadences?

Offline compsos

  • *
  • 472
  • +0/-0
Correct setting of Country Cadences?
« on: July 08, 2010, 09:50:20 AM »
Hi
we have been seeing this message in the logs

Code: [Select]
chan_dahdi.c:4570 dahdi_handle_event: Didn't finish Caller-ID spill.  Cancelling.
It seems it affects UK, AU, NZ & SG country dettings.

Found the following reference

https://issues.asterisk.org/view.php?id=4302

Quote
CLI does not work for these countries because of the ring cadence. The following error occurs when a phone starts ringing:
      chan_zap.c:3651 zt_handle_event: Didn't finish Caller-ID spill.  Cancelling.
    The problem arises because all of these countries have the following ring cadence:
    400 200 400 2000
    The problem is solved by changing this to:
    400 2000 400 200
    This does not affect the ring cadence, it just makes it start at a  different place in the cycle. The reason why it fixes the bug, is that  the 2000ms gap after the first burst of ringing is now long enough to  allow the CLI info to be transmitted to the phone.
   
    You might consider this fix to be a hack, and wonder how this problem  came about. In my limited understanding of CLI, I believe that CLI  information is supposed to be sent *before* real ringing starts, not  after the first burst. I think that (for ZA anyway) the CLI process was  supposed to initiate with a very short burst of ringing (too short for  the phone to respond), followed by the CLI info, followed by the first  *real* ring burst. Asterisk is not implemented this way, and therefore  has to squeeze the CLI info between the first and second bursts of  ringing. By starting the ringing later in the cycle so that the "big"  gap happens first, the CLI info can be transmitted.

Does anyone know if this is already patch in? If not is it adjustable chan_dahdi.conf settings via a db command?
« Last Edit: July 11, 2010, 09:26:13 AM by compsos »
Regards

Gordon............

Offline compsos

  • *
  • 472
  • +0/-0
Re: Didn't finish Caller-ID spill. Cancelling.
« Reply #1 on: July 10, 2010, 10:28:32 AM »
Found the settings at
/etc/e-smith/templates/etc/asterisk/indications.conf/30-countries
but the settings in here are different to the dahdi output

Code: [Select]
[au]
description = Australia
;
; Benjamin Wakefield - April 9, 2004
; Tone definition source for AU was:
; Australian Communications Industry Forum/Standards Australia
; http://www.acif.org.au/__data/page/3303/S002_2001.pdf
;
; Normal Ring
ringcadance = 400,200,400,2000
; Distinctive Ring 1 - Forwarded Calls
; 400,400,200,200,400,1400
; Distinctive Ring 2 - Selective Ring 2 + Operator + Recall
; 400,400,200,2000
; Distinctive Ring 3 - Multiple Subscriber Number 1
; 200,200,400,2200
; Distinctive Ring 4 - Selective Ring 1 + Centrex
; 400,2600
; Distinctive Ring 5 - Selective Ring 3
; 400,400,200,400,200,1400
; Distinctive Ring 6 - Multiple Subscriber Number 2
; 200,400,200,200,400,1600
; Distinctive Ring 7 - Multiple Subscriber Number 3 + Data Privacy
; 200,400,200,400,200,1600
; Tones
dial = 413+438
busy = 425/375,0/375
ring = 413+438/400,0/200,413+438/400,0/2000
; XXX Congestion: Should reduce by 10 db every other cadence XXX
congestion = 425/375,0/375,420/375,0/375
callwaiting = 425/200,0/200,425/200,0/4400
dialrecall = 413+438
; Record tone used for Call Intrusion/Recording or Conference
record = !425/1000,!0/15000,425/360,0/15000
info = 425/2500,0/500
; Other Australian Tones
; The STD "pips" indicate the call is not an untimed local call
std = !525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100
; Facility confirmation tone (eg. Call Forward Activated)
facility = 425
; Message Waiting "stutter" dialtone
stutter = 413+438/100,0/40
; Ringtone for calls to Telstra mobiles
ringmobile = 400+450/400,0/200,400+450/400,0/2000

dahdi show cadences
Code: [Select]
r1: 125,125,2000,4000
r2: 250,250,500,1000,250,250,500,4000
r3: 125,125,125,125,125,4000
r4: 1000,500,2500,5000

The ref does not seem to exist anymore http://www.acif.org.au/__data/page/3303/S002_2001.pdf

Am I looking in the wrong place to adjust the cadences as there are other references to cadences in the chan_dahdi.conf but commented out.
Regards

Gordon............

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Didn't finish Caller-ID spill. Cancelling.
« Reply #2 on: July 10, 2010, 10:48:24 AM »
Have a look at this

http://www.voip-info.org/wiki/view/chan_dahdi.conf

grep cadence


Best

S

Offline compsos

  • *
  • 472
  • +0/-0
Re: Didn't finish Caller-ID spill. Cancelling.
« Reply #3 on: July 11, 2010, 09:24:11 AM »
Hi Jeff
As far as I can see that is just a copy of the std conf file. Do we adjust it within the 30-countries file (or is this a past used file still hanging on) that should expand to the asterisk directory or the chan_dahdi.conf file. But as this is not adjustable in the web page and I have only found it in the db selintra file, where should modifications be put? db selintra setprop chan_dahdi.conf cadence??? As single entry or as separate entries? r1; r2; r3; r4

Code: [Select]
# db selintra show chan_dahdi.conf
chan_dahdi.conf=Header
    desc=chan_dahdi header
    header=chan_dahdi.conf
    headerlines=;
; Do NOT modify this file unless you know EXACTLY
; what you are doing!
;
relaxdtmf=yes
echocancelwhenbridged=no
faxdetect=incoming
    zeor=EOR

At the moment what the chan_dahdi.conf file says are defaults do not match the output of the dahdi show cadences command, so are the system getting the settings from somewhere else?

Sorry if I sound confused but I am. I think the error message indicates we are not allowing enough time for the caller ID spill. It seems to be affecting only the fax machine on a FXS port. Which all seems strange as the FXO port is forwarded directly to the analogue ext FXS port. Some calls go through and others fail to complete handshakes. We believe the failures are all calls from within the local exchange with all long distant calls being successful. (note yet to be tested/confirmed)

The file reference has moved the new location is http://www.commsalliance.com.au/__data/assets/pdf_file/0006/1122/S002_2005r.pdf on page 89 are the Australian settings which if I read correctly should be .
Quote
Ringing
Frequency= 400 + 450 or 425 * 25 or 400 + 425 + 450
Cadence= 0.4 on, 0.2 off, 0.4 on, 2.0 off, repeated
dBM = –13 –24
Which on asterisk should be 400,200,400,2000??? This is nothing like the cadence command report inside asterisk.
Regards

Gordon............

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Correct setting of Country Cadences?
« Reply #4 on: July 12, 2010, 01:29:48 AM »
OK - Here's what I think/know/think-I-know about FXO CLIP and Cadence.

Quote
Do we adjust it within the 30-countries file (or is this a past used file still hanging on)

No - it's used.  It gets generated with the correct countrycode (which you set in Globals) and this should cause Asterisk to set the correct cadences for your country.

If you want to change the cadences for Aus then change it in 30-countries and save it back. 

However, I'm not entirely sure that this will solve the problem at hand (which was originally to do with CLI).  As far as I can tell, there are lots of different ways of delivering CLI and it varies from country to country (and even within countries).  The Bell system (as I understand it) delivers CLI between the first and second ring and Zaptel/Dahdi is pretty much hard programmed to listen for this if you have CLID detection turned on.   This is why, if you have it turned on you will never "see" the call until after the second ring.

Your reference suggests that because we use "BT" ring cadence in UK, NZ, Aus, Za etc that we miss the CLIP.  Well possibly, except that BT doesn't send CLI over analogue lines in the way your reference suggests;  they  signal it with a polarity reversal and then send it using V.23... and they do it all before they signal call arrival (by sending ring current)  - its all in BT SIN 227 - you can google it.

So, to pick up CLI in the UK you have to set the following additional parameters in zapata/dahdi

usecallerid=yes
cidsignalling=v23
cidstart=polarity

And that's about all I know about Analogue CLI.

Best

Jeff
 


Offline compsos

  • *
  • 472
  • +0/-0
Re: Correct setting of Country Cadences?
« Reply #5 on: July 12, 2010, 10:40:48 AM »
Thanks Jeff
Just a question. Why are the settings in the 30-countries file not being applied (or am I reading it wrong)?

30-countries file
ringcadance = 400,200,400,2000

chan-dahdi.conf
are all commented out suggesting they are set to defaults.

Output of show command
r1: 125,125,2000,4000
r2:   250,250,500,1000,250,250,500,4000
r3: 125,125,125,125,125,4000
r4:   1000,500,2500,5000


I will try some tests under controlled conditions


Regards

Gordon............

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Correct setting of Country Cadences?
« Reply #6 on: July 12, 2010, 12:53:47 PM »
Quote
Why are the settings in the 30-countries file not being applied ?

Don't know.  Is the file being expanded correctly? ...with the correct country abbreviation?

Best