Hi all,
We have an issue with CDR’s when calling the manager action “redirect” to divert a call to another agent. CEL is populated fine and CDR works fine for all other events.
Call flow is this:
- Caller hits a queue for support
- Agent is already on another call, so puts this on hold. Then calls a PHP script to do the manager redirect to pass the call on to his phone.
- Redirect works fine, agent answers the call on second line, hangs up. CEL shows all the expected data, but nothing shows in CDR at all.
The code for the divert:
[i]Action: Login
UserName: ".$user."
Secret: “.$pass.”
Action: Events
EventMask: OFF
Action: Redirect
Channel: ".$Channel_name."
Exten: ".$agent_extension."
Context: phones //where agent extension numbers are housed
Priority: 1
Action: Logout[/i]
The entry in extensions.queues.conf (where the diverted channel hits first)
exten => [[our number]],1,Answer()
exten => [[our number]],n,ResetCDR()
exten => [[our number]],n,Set(CDR(accountcode)=80)
exten => [[our number]],n,Set(CDR(userfield)=inbound)
exten => [[our number]],n,Set(MONITOR_FILENAME=[[Our Queue Name]]_${UNIQUEID})
exten => [[our number]],n,Set(CALLERID(name)=[[Our Queue Name]])
exten => [[our number]],n,Queue([[Our Queue Name]])
exten => [[our number]],n,Hangup()
Note - ResetCDR() is needed in this context to have a seperate Billsec and Duration.
The entry in [phones]
exten => 1005,1,Answer()
exten => 1005,n,MixMonitor(1005_${UNIQUEID}.WAV)
exten => 1005,n,Dial(SIP/1005)
I have also tried this without Answer() in the agent number context, but this makes no difference.
CEL for a diverted call: (names removed to protect the innocent, etc)
±--------------------±-------------±--------±-----------------±-----------------+
| eventtime | eventtype | appname | uniqueid | linkedid |
±--------------------±-------------±--------±-----------------±-----------------+
| 2012-11-27 16:53:41 | CHAN_START | | 1354035221.27201 | 1354035221.27201 |
| 2012-11-27 16:53:41 | ANSWER | Answer | 1354035221.27201 | 1354035221.27201 |
| 2012-11-27 16:53:41 | APP_START | Queue | 1354035221.27201 | 1354035221.27201 |
| 2012-11-27 16:54:39 | ANSWER | Answer | 1354035221.27201 | 1354035221.27201 |
| 2012-11-27 16:54:39 | APP_START | Dial | 1354035221.27201 | 1354035221.27201 |
| 2012-11-27 16:54:39 | CHAN_START | | 1354035279.27217 | 1354035221.27201 |
| 2012-11-27 16:54:41 | ANSWER | AppDial | 1354035279.27217 | 1354035221.27201 |
| 2012-11-27 16:54:41 | BRIDGE_START | Dial | 1354035221.27201 | 1354035221.27201 |
| 2012-11-27 16:55:27 | BRIDGE_END | Dial | 1354035221.27201 | 1354035221.27201 |
| 2012-11-27 16:55:27 | HANGUP | AppDial | 1354035279.27217 | 1354035221.27201 |
| 2012-11-27 16:55:27 | CHAN_END | AppDial | 1354035279.27217 | 1354035221.27201 |
| 2012-11-27 16:55:27 | HANGUP | | 1354035221.27201 | 1354035221.27201 |
| 2012-11-27 16:55:27 | CHAN_END | | 1354035221.27201 | 1354035221.27201 |
±--------------------±-------------±--------±-----------------±-----------------+
However, nothing at all can be found in CDR for either the uniqueid or the linkedid.
To get around this, I have a cronjob which searches for linkedid’s in CEL that are not present in CDR and creates a record, but this is fraught with errors and a bodged fix for something that I suspect is some error in our config somewhere.
Has anyone had any experience of this issue? Any ideas on a fix?