[asterisk-bugs] [Asterisk 0013797]: [patch] forkcdr() doesn't fork when call disposition is ANSWERED

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Nov 25 15:37:22 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13797 
====================================================================== 
Reported By:                sh0t
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   13797
Category:                   Applications/app_forkcdr
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.4.22 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-10-29 08:59 CDT
Last Modified:              2008-11-25 15:37 CST
====================================================================== 
Summary:                    [patch] forkcdr() doesn't fork when call disposition
is ANSWERED
Description: 
Hello, I have problem with forkcdr app. (sip-sip calls)
First look at this sample dialplan

exten => s,1,answer
exten => s,n,Set(CDR(accountcode)=1001)
exten => s,n,Set(CDR(userfield)=MAIN)
exten => s,n,wait(2)
exten => s,n,ForkCDR()
exten => s,n,ResetCDR()
exten => s,n,Set(CDR(userfield)=OUTpggw1)
exten => s,n,Dial(SIP/pggw1,20)
exten => s,n,hangup

Everything works ok when that Dial result is NO ANSWER or for example
FAILED
but if I answer that call. I will see only one CDR record (that with
userfield MAIN)

(the failure scenario (with answered call))
bellow two examples of the cdr records (stored in pgsql database)
2008-10-29
14:17:58,32,32,11,pg-gw,SIP/pggw2-c8073fd0,,Dial,SIP/pggw1|20,14,6,ANSWERED,3,1001,1225286278.17290,MAIN

(the expected one, only when call disposition is NO ANSWER or billsec=0)
2008-10-29
14:19:03,32,32,11,pg-gw,SIP/pggw2-c807dd30,,ForkCDR,,10,10,ANSWERED,3,1001,1225286343.17309,MAIN
2008-10-29
14:19:05,32,32,s,test1,SIP/pggw2-c807dd30,SIP/pggw1-01139f40,Dial,SIP/pggw1|20,8,0,NO
ANSWER,3,1001,1225286343.17309,OUTpggw1

I'm using forkcdr because I need to have two cdr records. One for
incomiing call and one for that dial.

It worked for a long time with earlier versions of asterisk (for example
1.4.11)

======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0013881 [patch] AGI command "answer" ...
====================================================================== 

---------------------------------------------------------------------- 
 (0095510) murf (administrator) - 2008-11-25 15:37
 http://bugs.digium.com/view.php?id=13797#c95510 
---------------------------------------------------------------------- 
Have you checked the forkCDR documentation? It does its own reset operation
as part of the CDR cloning processing that generates a new CDR.


With forkCDR() and resetCDR():

""fxo.24"
<124>","124","s","default","DAHDI/24-1","","Dial","SIP/polycom430|20","2008-11-25
08:04:08","2008-11-25 08:04:20","2008-11-25
08:04:30","22","10","ANSWERED","DOCUMENTATION","1001","1227625448.9","MAIN",""
""fxo.24"
<124>","124","s","incoming","DAHDI/24-1","SIP/polycom430-0865f060","Dial","SIP/polycom430|20","2008-11-25
08:04:17","2008-11-25 08:04:20","2008-11-25
08:04:30","13","10","ANSWERED","DOCUMENTATION","1001","1227625448.9","OUTpggw1",""



with just forkCDR(a):

""fxo.24"
<124>","124","s","default","DAHDI/24-1","","Dial","SIP/polycom430|20","2008-11-25
08:41:39","2008-11-25 08:41:50","2008-11-25
08:42:04","25","14","ANSWERED","DOCUMENTATION","1001","1227627699.3","MAIN",""
""fxo.24"
<124>","124","s","incoming","DAHDI/24-1","SIP/polycom430-0865d430","Dial","SIP/polycom430|20","2008-11-25
08:41:47","2008-11-25 08:41:47","2008-11-25
08:42:04","17","17","ANSWERED","DOCUMENTATION","1001","1227627699.3","OUTpggw1",""


because actions like Answer() (and end) apply themselves to every CDR in
the chain, irregardless of LOCKed status or not. Several options are now
available to modify this behavior. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-11-25 15:37 murf           Note Added: 0095510                          
======================================================================




More information about the asterisk-bugs mailing list