Review Board 1.7.16


Add Congestion detail in CDR call logs when Congestion application is used.

Review Request #454 - Created Jan. 5, 2010 and submitted

Alec Davis
trunk
15907
Reviewers
asterisk-dev
russell
Asterisk
Cuurently if the dialplan is designed for whatever reason to terminate a call with the Congestion() application a CDR log is not recorded for that call.

This adds that functionality.
Tested and currently been in use with 1.6.1 branch.

Tested for functionality with trunk.

dialplan:
exten => 2001,1,Congestion(0)
exten => 2098,1,Playback(echo-test)

output: /var/log/asterisk/cdr-csv/Master.csv for 2 calls, first to Playback application, 2nd to Congestion(). 
"","857","2098","phones","857","SIP/cisco4-00000000","","Playback","echo-test","2010-01-06 20:47:45","2010-01-06 20:47:45","2010-01-06 20:47:47",2,2,"ANSWERED","DOCUMENTATION","1262764065.2",""
"","857","2001","phones","857","SIP/cisco4-00000000","","Congestion","0","2010-01-06 20:50:09",,"2010-01-06 20:50:09",0,0,"CONGESTION","DOCUMENTATION","1262764209.0",""

Diff revision 1 (Latest)

  1. trunk/include/asterisk/cdr.h: Loading...
  2. trunk/main/cdr.c: Loading...
  3. trunk/main/pbx.c: Loading...
trunk/include/asterisk/cdr.h
Revision 237965 New Change
[20] 46 lines
[+20]
47
#define AST_CDR_NOANSWER			0
47
#define AST_CDR_NOANSWER			0
48
#define AST_CDR_NULL                (1 << 0)
48
#define AST_CDR_NULL                (1 << 0)
49
#define AST_CDR_FAILED				(1 << 1)
49
#define AST_CDR_FAILED				(1 << 1)
50
#define AST_CDR_BUSY				(1 << 2)
50
#define AST_CDR_BUSY				(1 << 2)
51
#define AST_CDR_ANSWERED			(1 << 3)
51
#define AST_CDR_ANSWERED			(1 << 3)

    
   
52
#define AST_CDR_CONGESTION			(1 << 4)
52
/*@} */
53
/*@} */
53

    
   
54

   
54
/*! \name CDR AMA Flags */
55
/*! \name CDR AMA Flags */
55
/*@{ */
56
/*@{ */
56
#define AST_CDR_OMIT				(1)
57
#define AST_CDR_OMIT				(1)
[+20] [20] 195 lines
[+20] [+] void ast_cdr_answer(struct ast_cdr *cdr);
252
 * forkCDR() application.
253
 * forkCDR() application.
253
 */
254
 */
254
extern void ast_cdr_noanswer(struct ast_cdr *cdr);
255
extern void ast_cdr_noanswer(struct ast_cdr *cdr);
255

    
   
256

   
256
/*! 
257
/*! 

    
   
258
 * \brief A call was set to congestion 

    
   
259
 * \param cdr the cdr you wish to associate with the call

    
   
260
 * Marks the channel disposition as "CONGESTION"

    
   
261
 * Will skip CDR's in chain with ANS_LOCK bit set. (see

    
   
262
 * forkCDR() application.

    
   
263
 */

    
   
264
extern void ast_cdr_congestion(struct ast_cdr *cdr);

    
   
265

   

    
   
266
/*! 
257
 * \brief Busy a call 
267
 * \brief Busy a call 
258
 * \param cdr the cdr you wish to associate with the call
268
 * \param cdr the cdr you wish to associate with the call
259
 * Marks the channel disposition as "BUSY"
269
 * Marks the channel disposition as "BUSY"
260
 * Will skip CDR's in chain with ANS_LOCK bit set. (see
270
 * Will skip CDR's in chain with ANS_LOCK bit set. (see
261
 * forkCDR() application.
271
 * forkCDR() application.
[+20] [20] 166 lines
trunk/main/cdr.c
Revision 237965 New Change
 
trunk/main/pbx.c
Revision 237965 New Change
 
  1. trunk/include/asterisk/cdr.h: Loading...
  2. trunk/main/cdr.c: Loading...
  3. trunk/main/pbx.c: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.