Summary: | ASTERISK-15296: Asterisk 1.6.2: CDR is not produced with .call files | ||
Reporter: | Mario Moran (mmoran69) | Labels: | |
Date Opened: | 2009-12-09 18:18:09.000-0600 | Date Closed: | 2009-12-18 07:24:31.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | CDR/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | Asterisk 1.6.2 is not generating CDR for .call files. Looking into the code I do not see code similar to patch from https://issues.asterisk.org/view.php?id=16222 applied. Applying the same logic in channel.c/__ast_request_and_dial() as follows: @@ -4432,12 +4432,24 @@ break; case AST_CONTROL_BUSY: - case AST_CONTROL_CONGESTION: - case AST_CONTROL_ANSWER: + ast_cdr_busy(chan->cdr); *outstate = f->subclass.integer; - timeout = 0; /* trick to force exit from the while() */ + timeout = 0; break; + case AST_CONTROL_CONGESTION: + ast_cdr_failed(chan->cdr); + *outstate = f->subclass.integer; + timeout = 0; + break; + + case AST_CONTROL_ANSWER: + ast_cdr_answer(chan->cdr); + *outstate = f->subclass.integer; + timeout = 0; /* trick to force exit from the while() */ + /* Ignore these */ case AST_CONTROL_PROGRESS: case AST_CONTROL_PROCEEDING: .. but still wasn't working... So, looking further, I found this in ast_hangup(): 02210 if (chan->cdr) { /* End the CDR if it hasn't already */ 02211 ast_cdr_end(chan->cdr); 02212 cdr = chan->cdr; 02213 chan->cdr = NULL; 02214 } Then this is never true and the CDR is not detached/posted: 02245 if (chan->cdr && !ast_test_flag(chan->cdr, AST_CDR_FLAG_BRIDGED) && 02246 !ast_test_flag(chan->cdr, AST_CDR_FLAG_POST_DISABLED) && 02247 (chan->cdr->disposition != AST_CDR_NULL || ast_test_flag(chan->cdr, AST_CDR_FLAG_DIALED))) { 02248 ast_channel_lock(chan); 02249 02250 ast_cdr_end(chan->cdr); 02251 ast_cdr_detach(chan->cdr); 02252 chan->cdr = NULL; 02253 ast_channel_unlock(chan); 02254 } I removed the first piece and then it works. | ||
Comments: | By: Luiz Mauricio B.da Silva (snlmauricio) 2009-12-13 05:50:51.000-0600 I'm using 1.6.1.11 and having the same problem. Made the changes. And didn't work for me. CDR record still not logging. By: Luiz Mauricio B.da Silva (snlmauricio) 2009-12-13 06:45:57.000-0600 Solved with the patch https://issues.asterisk.org/file_download.php?file_id=24431&type=bug in 1.6.1.12-rc1. Tks. By: Leif Madsen (lmadsen) 2009-12-15 11:26:52.000-0600 As this is likely fixed already, can the reporter report back that the latest version of 1.6.2.0 (currently RC8) has already resolved this? By: Mark Yarbrough (western55) 2009-12-15 16:53:46.000-0600 Upgraded to 1.6.1.12-rc1 and still having same problem. Not sure on how to install above patch but .call files are not creating CDR even when using context/extension/priority.. Connected to Asterisk 1.6.1.12-rc1 currently running on dialsrv01 (pid = 2007) Example .call file: Channel: DAHDI/g1/14803463430 CallerID: Mark <4803463430> MaxRetries: 0 WaitTime: 300 Context: autodialer Extension: 100 Priority: 1 Archive: Yes Extensions.conf file: [autodialer] exten => _XXX,1,Answer() exten => _XXX,n,Wait(5) exten => _XXX,n,Hangup() By: Mario Moran (mmoran69) 2009-12-16 15:39:47.000-0600 Tried with 1.6.2.0-rc8 and the problem persists. By: Aaron Swartz (aaronsw) 2009-12-16 17:51:52.000-0600 This also affects calls made using Originate thru the AMI. By: Leif Madsen (lmadsen) 2009-12-17 09:26:31.000-0600 Shouldn't need to install the patch into 1.6.1.12-rc1 as it should already be merged there. Perhaps there is another issue here that is affecting the calls. If you're experiencing this issue, please make sure you're running the latest set of release candidates (1.6.2.0-rc8 or 1.6.1.12-rc1), and then provide the console output, along with debug information when reproducing this issue. Also provide any additional information which may be relevant such as configuration files, etc... By: Leif Madsen (lmadsen) 2009-12-17 09:41:05.000-0600 Actually, just for my own sanity, can you try the latest 1.6.1 or 1.6.2 branch? Perhaps the change went in after the release candidates were made. svn co http://svn.asterisk.org/svn/asterisk/branches/1.6.1 By: Mark Yarbrough (western55) 2009-12-17 16:30:01.000-0600 I read on another forum how to install the patch (using the patch function) and did so.. The calls now produce CDR (it works now) so my guess is it was implemented after the release candidates were made... Thx By: Leif Madsen (lmadsen) 2009-12-18 07:22:50.000-0600 Huh, interesting. Could have sworn that had made it in, but perhaps it *just* missed. OK, I'm going to close this issue then as resolved in a future version -- likely 1.6.1.13 and 1.6.2.1, which I'm hoping will be released in late January. Release candidates should be available at the start of the new year. |