[Home]

Summary:ASTERISK-13682: [patch] updatecdr='yes' in agents.conf is not working
Reporter:Marcos Jose Setim (msetim)Labels:
Date Opened:2009-03-02 19:51:30.000-0600Date Closed:2009-11-20 15:16:27.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_agent
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) queue_agent_userfield.patch
Description:Hi guys,

I have been update my asterisk from 1.4.20.1 to 1.4.23.1 (last release) and updatecdr='yes' doesn't work anymore. I don't change anything in configuration and it don't work. When I made downgrade to 1.4.20.1 the updatecdr back to work again.

Well, I really don't know what to post here to help because I only change the asterisk. My configuration is:

agents.conf

autologoff=15
ackcall=yes
updatecdr=yes
savecallsin=/var/spool/asterisk/agent
endcall=yes
wrapuptime=5000
createlink=no
musiconhold=Silence
recordagentcalls=yes

cdr_odbc.conf

[global]
dsn=PostgreSQL-asterisk
username=XXXXXXXX
password=XXXXXXXX
loguniqueid=yes
dispositionstring=yes
table=tb_cdr

PS. I try to set "I did not set the category correctly" but it give and error saying that I need to set someone.
Comments:By: Marcos Jose Setim (msetim) 2009-03-02 20:06:39.000-0600

Important information: both 1.4.20.1 and 1.4.23.1 are recording agent call. I'm talking only about updatecdr='yes'. The wav files are in directory.

By: Denis Galvao (denisgalvao) 2009-03-03 06:55:24.000-0600

Im working with msetim on this. When originating a call directly(originate) to the agent channel, the userfield is updated correctly, but when the call comes from a queue, the userfield(with the record filename) is not updated.

By: Alvaro Ivan Parres Peredo (arabe) 2009-03-03 09:03:11.000-0600

I think so that this bugs is the same as 14085.

I have also test this with version 1.4.23.2 and have the same bug.

cdr module = pgsql.

By: Alvaro Ivan Parres Peredo (arabe) 2009-03-04 19:01:16.000-0600

I think so this is a problem in agent_chan and app_queue

I had made the next test:

   1) I have one agent in one queue
   2) I send a call to the queue
   3) While the agent and the call are calling if i make the command show channel and put the Agent/XXX channel o the caller channel i can see that the Agent channel have correctly set the userfield with the monitor file name, but the channel doesn't have any userfield set.

      So when the call finish (by de caller or by de agent) the CDR only write the call registry but without the userfield.

      If i made the same test with the option unanswered = yes on cdr.conf

      I get to lines on CDR table, one with the call to the queue without any userfield command, and another registry  with the agent as channel and the correct userfield.

I don't now if this help.



By: Leif Madsen (lmadsen) 2009-03-04 19:03:48.000-0600

Assigned this issue to murf as it probably has something to do with the CDR changes he is working on.

By: Marcos Jose Setim (msetim) 2009-03-04 19:21:02.000-0600

I'm ready to help with tests if necessary though I don't know the relationship between cdr/queue/agent enough to help with great contribution.

By: Leif Madsen (lmadsen) 2009-03-18 23:16:44

Reassigned to mnicholson who is now looking into the CDR issues.

By: Tomás Laureano Peralta Tormey (laureano) 2009-08-03 10:41:00

After doing some research, I've tracked down this issue to the revision 127663. This revision includes a series of bug fixes that solves some issues with CDRs.
Apparently, a change in res_features.c has modified the behavior of the CDR engine when a call is bridged. In such case, and unless one of the CDRs got zapped (pun unintentional), the userfield value from the B leg doesn't get copied to the A leg.
The original behavior used to append the B leg's userfield to the A leg, using a semicolon as field separator. But the new funcionality introduced in the named revision seems to forgot about this appending, unless a particular xfer takes place.

I've attached a patch which I'm using in one of my production systems after upgrading to 1.4.25.1. The patch is only for illustrative purposes and it's not intented to be considered as a patch to be included in trunk.

By: Matthew Nicholson (mnicholson) 2009-08-03 11:52:32

I'll take a look.

By: Matthew Nicholson (mnicholson) 2009-11-20 12:35:34.000-0600

I tested this and the updatecdr feature works fine.  The updatecdr option has nothing to do with the recordagentcalls option, which is what I think you are having problems with.

By: Matthew Nicholson (mnicholson) 2009-11-20 14:48:22.000-0600

I looked at and tested your patch.  It seems to be the correct way to fix this issue.

By: Digium Subversion (svnbot) 2009-11-20 15:05:35.000-0600

Repository: asterisk
Revision: 230627

U   branches/1.4/res/res_features.c

------------------------------------------------------------------------
r230627 | mnicholson | 2009-11-20 14:53:06 -0600 (Fri, 20 Nov 2009) | 8 lines

Copy the peer CDR's userfield to the bridge CDR if it exists.  This is necessary for the recordagentcalls option in chan_agent to store the recorded file name in the bridge CDR.

(closes issue ASTERISK-13682)
Reported by: msetim
Patches:
     queue_agent_userfield.patch uploaded by Laureano (license 265)
Tested by: Laureano, mnicholson

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

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

By: Digium Subversion (svnbot) 2009-11-20 15:07:51.000-0600

Repository: asterisk
Revision: 230628

_U  trunk/
U   trunk/main/features.c

------------------------------------------------------------------------
r230628 | mnicholson | 2009-11-20 15:07:51 -0600 (Fri, 20 Nov 2009) | 15 lines

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

........
 r230627 | mnicholson | 2009-11-20 14:53:06 -0600 (Fri, 20 Nov 2009) | 8 lines
 
 Copy the peer CDR's userfield to the bridge CDR if it exists.  This is necessary for the recordagentcalls option in chan_agent to store the recorded file name in the bridge CDR.
 
 (closes issue ASTERISK-13682)
 Reported by: msetim
 Patches:
       queue_agent_userfield.patch uploaded by Laureano (license 265)
 Tested by: Laureano, mnicholson
........

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

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

By: Digium Subversion (svnbot) 2009-11-20 15:14:14.000-0600

Repository: asterisk
Revision: 230629

_U  branches/1.6.2/
U   branches/1.6.2/main/features.c

------------------------------------------------------------------------
r230629 | mnicholson | 2009-11-20 15:14:14 -0600 (Fri, 20 Nov 2009) | 22 lines

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

................
 r230628 | mnicholson | 2009-11-20 15:01:10 -0600 (Fri, 20 Nov 2009) | 15 lines
 
 Merged revisions 230627 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r230627 | mnicholson | 2009-11-20 14:53:06 -0600 (Fri, 20 Nov 2009) | 8 lines
   
   Copy the peer CDR's userfield to the bridge CDR if it exists.  This is necessary for the recordagentcalls option in chan_agent to store the recorded file name in the bridge CDR.
   
   (closes issue ASTERISK-13682)
   Reported by: msetim
   Patches:
         queue_agent_userfield.patch uploaded by Laureano (license 265)
   Tested by: Laureano, mnicholson
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-11-20 15:15:31.000-0600

Repository: asterisk
Revision: 230630

_U  branches/1.6.1/
U   branches/1.6.1/main/features.c

------------------------------------------------------------------------
r230630 | mnicholson | 2009-11-20 15:15:31 -0600 (Fri, 20 Nov 2009) | 22 lines

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

................
 r230628 | mnicholson | 2009-11-20 15:01:10 -0600 (Fri, 20 Nov 2009) | 15 lines
 
 Merged revisions 230627 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r230627 | mnicholson | 2009-11-20 14:53:06 -0600 (Fri, 20 Nov 2009) | 8 lines
   
   Copy the peer CDR's userfield to the bridge CDR if it exists.  This is necessary for the recordagentcalls option in chan_agent to store the recorded file name in the bridge CDR.
   
   (closes issue ASTERISK-13682)
   Reported by: msetim
   Patches:
         queue_agent_userfield.patch uploaded by Laureano (license 265)
   Tested by: Laureano, mnicholson
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-11-20 15:16:26.000-0600

Repository: asterisk
Revision: 230631

_U  branches/1.6.0/
U   branches/1.6.0/main/features.c

------------------------------------------------------------------------
r230631 | mnicholson | 2009-11-20 15:16:26 -0600 (Fri, 20 Nov 2009) | 22 lines

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

................
 r230628 | mnicholson | 2009-11-20 15:01:10 -0600 (Fri, 20 Nov 2009) | 15 lines
 
 Merged revisions 230627 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r230627 | mnicholson | 2009-11-20 14:53:06 -0600 (Fri, 20 Nov 2009) | 8 lines
   
   Copy the peer CDR's userfield to the bridge CDR if it exists.  This is necessary for the recordagentcalls option in chan_agent to store the recorded file name in the bridge CDR.
   
   (closes issue ASTERISK-13682)
   Reported by: msetim
   Patches:
         queue_agent_userfield.patch uploaded by Laureano (license 265)
   Tested by: Laureano, mnicholson
 ........
................

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

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