Outlaw011
Outlaw011

Reputation: 103

Multiple CDR records Asterisk 13

Running Asterisk 13.12.1, FreePBX 13.0.192.19.

We had to install new server and since we previously used much older asterisk, there were some fixes applied. We DIDN'T update previous, but we made clean install, just copied dialplans, sip config etc.

The problem is that we are now having multiple CDR records per call. We previously had NOCDR lines for local contexts, and we tried I have tried to change those to exten => _X!,1,Set(CDR_PROP(disable)=1) but that didn't work at all.

Here is the example:

[main context]
exten => remote-mon-1,1,Dial(SIP/lokal300&SIP/lokal301&Local/06xxxxxx@shift-remote-1&Local/06xxxxxx@shift-remote-2&Local/06xxxxxx@shift-remote-3&Local/06xxxxxx@shift-remote-4&Local/06xxxxxx@shift-remote-5&Local/06xxxxxx@shift-remote-6,,m(remote)M(whoanswered,remote))

[shift-remote-1]
exten => _X!,1,Set(CDR_PROP(disable)=1)
exten => _X!,n,Dial(SIP/gsm10/${EXTEN},540)

Basically what the above does is calling two local phones (300 and 301) as well as multiple (6) remote mobile phones via gsm gateway.

1) So CDR PROP is completely ignored (I think someone said how its not working with Local context but I need confirmation). How can I fix it?

2) Any other ideas how to avoid creating multiple CDR record for each call?

Thank you!

Update: As this was flagged as a duplicate of Asterisk 13.4 cdr engine is creating 2 records per call , I need to explain that In that question the solution is applying unofficial patch, which is not something we want to do. I was looking for official approved way on why CDR_PROP is not working correctly. Furthermore (I just checked) the link to patch in that post is not working, as site is unreachable. One more reason to not flag this as duplicate.

Upvotes: 1

Views: 2629

Answers (1)

arheops
arheops

Reputation: 15259

1) use NoCDR, not forget add '/n' to local channels

pro-sip*CLI> core show application NOCDR

  -= Info about application 'NoCDR' =- 

[Synopsis]
Tell Asterisk to not maintain a CDR for this channel. 

[Description]
This application will tell Asterisk not to maintain a CDR for the current
channel. This does *NOT* mean that information is not tracked; rather, if the
channel is hung up no CDRs will be created for that channel.
If a subsequent call to ResetCDR occurs, all non-finalized CDRs created for the
channel will be enabled.
NOTE: This application is deprecated. Please use the CDR_PROP function to
disable CDRs on a channel.

[Syntax]
NoCDR()

[Arguments]
Not available

[See Also]
ResetCDR(), CDR_PROP

2) Read /etc/asterisk/cdr.conf params.

Upvotes: 1

Related Questions