[Home]

Summary:ASTERISK-13054: [patch] AGI command "answer" not really set in answer mode when forkcdr
Reporter:sun bing (hoowa)Labels:
Date Opened:2008-11-12 03:25:23.000-0600Date Closed:2009-01-12 16:00:34.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_agi
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) cur.patch
Description:write perl script:
$AGI->exec('forkcdr');
$AGI->answer();

in database: will restored new cdr record without answer

other format:
$AGI->exec('forkcdr');
$AGI->exec('answer');


works fine.

why different?

****** ADDITIONAL INFORMATION ******

First script:

"","5001","3502","default","""5001"" <5001>","SIP/5001-0100ed98","","ForkCDR","","2008-11-14 21:31:03","2008-11-14 21:31:03","2008-11-14 21:31:04",1,1,"ANSWERED","DOCUMENTATION","1226698263.1",""
"","5001","3502","default","""5001"" <5001>","SIP/5001-0100ed98","","ForkCDR","","2008-11-14 21:31:03","2008-11-14 21:31:03","2008-11-14 21:31:04",1,1,"ANSWERED","DOCUMENTATION","1226698263.1",""

Second script:
"","5001","3502","default","""5001"" <5001>","SIP/5001-0100ed98","","ForkCDR","","2008-11-14 21:31:20","2008-11-14 21:31:20","2008-11-14 21:31:20",0,0,"ANSWERED","DOCUMENTATION","1226698280.2",""
"","5001","3502","default","""5001"" <5001>","SIP/5001-0100ed98","","Answer","","2008-11-14 21:31:20","2008-11-14 21:31:20","2008-11-14 21:31:20",0,0,"ANSWERED","DOCUMENTATION","1226698280.2",""
Comments:By: Jeff Peeler (jpeeler) 2008-11-14 16:52:18.000-0600

This works, but also changes the behavior of CDRs. I'm going to check and see what really should be done.

By: Jeff Peeler (jpeeler) 2008-11-14 16:58:59.000-0600

With the proposed patch, the new behavior yields:

"","5001","3502","default","""5001"" <5001>","SIP/5001-00a28960","","ForkCDR","","2008-11-14 22:40:48","2008-11-14 22:40:50","2008-11-14 22:40:50",2,0,"ANSWERED","DOCUMENTATION","1226702448.1",""
"","5001","3502","default","""5001"" <5001>","SIP/5001-00a28960","","AGI","ANSWER","2008-11-14 22:40:50","2008-11-14 22:40:50","2008-11-14 22:40:50",0,0,"ANSWERED","DOCUMENTATION","1226702448.1",""

By: sun bing (hoowa) 2008-11-17 01:54:09.000-0600

i am using cdr odbc ---> sqlserver2000 for cdr database.

does it related with this problem?

let me try the patch , if any problem i will append new note.

By: Steve Murphy (murf) 2008-11-21 13:50:50.000-0600

The way the cdr's generated by forkcdr are/were handled, the answer time/disposition was not getting set right, and usually the cdr's would get discarded.

See 13797, and see if that patch, in conjunction with jpeelers patch,  resolves any of your problems in this report, as CDRs, and forkCDR() are involved...

By: Leif Madsen (lmadsen) 2008-11-24 16:13:27.000-0600

Marking as Ready For Testing per murf's comments.

By: Jeff Peeler (jpeeler) 2008-12-11 17:35:29.000-0600

I never wrote what the change of behavior was. The old behavior for executing an AGI script answer (not via exec) yielded:

"","","s","default","","DAHDI/1-1","","AGI","/root/cdr.agi","2008-12-11 23:28:51","2008-12-11 23:28:53","2008-12-11 23:28:53",2,0,"ANSWERED","DOCUMENTATION","1229038131.5",""

The new behavior yields:

"","","s","default","","DAHDI/1-1","","AGI","ANSWER","2008-12-11 23:29:51","2008-12-11 23:29:53","2008-12-11 23:29:53",2,0,"ANSWERED","DOCUMENTATION","1229038191.0",""

By: Digium Subversion (svnbot) 2009-01-12 15:42:35.000-0600

Repository: asterisk
Revision: 168516

U   branches/1.4/res/res_agi.c

------------------------------------------------------------------------
r168516 | jpeeler | 2009-01-12 15:42:35 -0600 (Mon, 12 Jan 2009) | 5 lines

(closes issue ASTERISK-13054)
Reported by: hoowa

Update the app CDR field for AGI commands that are not executing an application via "exec".

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=168516

By: Digium Subversion (svnbot) 2009-01-12 15:51:47.000-0600

Repository: asterisk
Revision: 168517

_U  trunk/
U   trunk/res/res_agi.c

------------------------------------------------------------------------
r168517 | jpeeler | 2009-01-12 15:51:46 -0600 (Mon, 12 Jan 2009) | 12 lines

Merged revisions 168516 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r168516 | jpeeler | 2009-01-12 15:42:34 -0600 (Mon, 12 Jan 2009) | 5 lines
 
 (closes issue ASTERISK-13054)
 Reported by: hoowa
 
 Update the app CDR field for AGI commands that are not executing an application via "exec".
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=168517

By: Digium Subversion (svnbot) 2009-01-12 15:52:33.000-0600

Repository: asterisk
Revision: 168518

_U  branches/1.6.0/
U   branches/1.6.0/res/res_agi.c

------------------------------------------------------------------------
r168518 | jpeeler | 2009-01-12 15:52:33 -0600 (Mon, 12 Jan 2009) | 19 lines

Merged revisions 168517 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r168517 | jpeeler | 2009-01-12 15:51:46 -0600 (Mon, 12 Jan 2009) | 12 lines
 
 Merged revisions 168516 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r168516 | jpeeler | 2009-01-12 15:42:34 -0600 (Mon, 12 Jan 2009) | 5 lines
   
   (closes issue ASTERISK-13054)
   Reported by: hoowa
   
   Update the app CDR field for AGI commands that are not executing an application via "exec".
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=168518

By: Digium Subversion (svnbot) 2009-01-12 16:00:33.000-0600

Repository: asterisk
Revision: 168519

_U  branches/1.6.1/
U   branches/1.6.1/res/res_agi.c

------------------------------------------------------------------------
r168519 | jpeeler | 2009-01-12 16:00:33 -0600 (Mon, 12 Jan 2009) | 19 lines

Merged revisions 168517 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r168517 | jpeeler | 2009-01-12 15:51:46 -0600 (Mon, 12 Jan 2009) | 12 lines
 
 Merged revisions 168516 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r168516 | jpeeler | 2009-01-12 15:42:34 -0600 (Mon, 12 Jan 2009) | 5 lines
   
   (closes issue ASTERISK-13054)
   Reported by: hoowa
   
   Update the app CDR field for AGI commands that are not executing an application via "exec".
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=168519