James Bean
2005-Feb-25 05:00 UTC
[Asterisk-Users] CDR writing incorrect data to pgsql tables
Hi, I have postgresql and * all up and running as the latest cvs-250205, although something weird. Every outgoing call regardless of whether or not it is answered or busy or just rings out in the database the entry has the disposition as ANSWERED, instead of BUSY or NOT ANSWERED. As a test I intentionally rang numbers that would be busy or wouldn't be there to answer the call. Anyone got an idea where it might be going wrong? James
Peter Corlett
2005-Feb-25 05:21 UTC
[Asterisk-Users] CDR writing incorrect data to pgsql tables
James Bean <james@hdcs.com.au> wrote: [...]> Every outgoing call regardless of whether or not it is answered or > busy or just rings out in the database the entry has the disposition > as ANSWERED, instead of BUSY or NOT ANSWERED.> As a test I intentionally rang numbers that would be busy or > wouldn't be there to answer the call. Anyone got an idea where it > might be going wrong?Are you using analogue lines? Such lines are considered "answered" as soon as the number has been dialled by the Zaptel interface. -- Marriage: a souvenir of love. - Helen Rowland
James Bean
2005-Feb-25 06:07 UTC
[Asterisk-Users] CDR writing incorrect data to pgsql tables
> James Bean <james@hdcs.com.au> wrote: > [...] > > Every outgoing call regardless of whether or not it is answered or > > busy or just rings out in the database the entry has the > disposition > > as ANSWERED, instead of BUSY or NOT ANSWERED. > > > As a test I intentionally rang numbers that would be busy > or wouldn't > > be there to answer the call. Anyone got an idea where it might be > > going wrong? > > Are you using analogue lines? Such lines are considered > "answered" as soon as the number has been dialled by the > Zaptel interface. > > -- > Marriage: a souvenir of love.Yes they are analogue lines. I am sorry I did not see anything in any of the docs about analogue lines causing ANSWERED response on all calls. Could you point me in the right direction to a fix or setup that fixes this situation? James
James Bean
2005-Feb-25 08:21 UTC
[Asterisk-Users] CDR writing incorrect data to pgsql tables
> James Bean <james@hdcs.com.au> wrote: > [...] > > I am sorry I did not see anything in any of the docs about analogue > > lines causing ANSWERED response on all calls. Could you point me in > > the right direction to a fix or setup that fixes this situation? > > The only real fix is to get some form of digital service, > either ISDN or VoIP. There is no reliable means to detect > when a call has been answered on an analogue line, so > Asterisk doesn't bother trying. > > The usual kludge for analogue PBXes is to assume that a call > was answered only if the recorded time is longer than a > certain number of seconds.Hhmm well that's annoying.... Is the kludge done at the software side when the data is pulled out for accounting and being under say 45 seconds is a no answer or busy? Or is there a tweak that can be done at the database itself? So by that any calls that go out over the net using IAX to the telco are considered digital and will report correctly? James
James Bean
2005-Feb-25 09:08 UTC
[Asterisk-Users] CDR writing incorrect data to pgsql tables
> For MySQL and other glorified flat-file databases, you would > need to postprocess the data. You may feel more confident > skipping triggers and doing this anyway. > > > So by that any calls that go out over the net using IAX to > the telco > > are considered digital and will report correctly? > > Yes. You will probably be able to make the simple assumption > that if dstchannel ILIKE 'Zap/%' , you're going to have to > fudge it, otherwise it's correctly recorded. >Thank you for your help sir it was very informative I am going to write the trigger with my own rules for the database and see how I go :-) James