Mitch Claborn
2012-Oct-25 16:18 UTC
[asterisk-users] How to tie orders taken to specific CDR records
Our phone operators work off of an Asterisk queue. They take calls from customers and take orders with our back end systems. What I need to be able to do is tie the orders taken to the specific CDR record that reflects the call from which the order originated. The typical/sample CDR table doesn't have a primary key. I can add an auto-generated PK, but the CDR is not written until the call ends, when the orders have already been placed. (Even if the CDR was written earlier, could I retrieve the generated PK from it in the dialplan somehow?) Is there some combination of fields in the CDR that might uniquely identify a specific call? Open to any and all ideas. -- Mitch
Danny Nicholas
2012-Oct-25 16:21 UTC
[asterisk-users] How to tie orders taken to specific CDR records
You have the uniqueID, which is a pseudo timestamp. More useful to your described effort, though would be the answer and end of call fields. Your backend system is going to have the timestamp of when the order was placed, so you just need to address the calls that sandwich that timestamp. -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mitch Claborn Sent: Thursday, October 25, 2012 11:19 AM To: asterisk-users at lists.digium.com Subject: [asterisk-users] How to tie orders taken to specific CDR records Our phone operators work off of an Asterisk queue. They take calls from customers and take orders with our back end systems. What I need to be able to do is tie the orders taken to the specific CDR record that reflects the call from which the order originated. The typical/sample CDR table doesn't have a primary key. I can add an auto-generated PK, but the CDR is not written until the call ends, when the orders have already been placed. (Even if the CDR was written earlier, could I retrieve the generated PK from it in the dialplan somehow?) Is there some combination of fields in the CDR that might uniquely identify a specific call? Open to any and all ideas. -- Mitch -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Alex Kauffmann
2012-Oct-25 20:23 UTC
[asterisk-users] How to tie orders taken to specific CDR records
On 10/25/2012 11:18 AM, Mitch Claborn wrote:> Our phone operators work off of an Asterisk queue. They take calls from > customers and take orders with our back end systems. What I need to be > able to do is tie the orders taken to the specific CDR record that > reflects the call from which the order originated. > > The typical/sample CDR table doesn't have a primary key. I can add an > auto-generated PK, but the CDR is not written until the call ends, when > the orders have already been placed. (Even if the CDR was written > earlier, could I retrieve the generated PK from it in the dialplan > somehow?) > > Is there some combination of fields in the CDR that might uniquely > identify a specific call? > > Open to any and all ideas. > >Try looking at the queue_log. Configure your system to log to mysql and you should be able to get everything you need in realtime. Alex
Steve Totaro
2012-Oct-25 21:24 UTC
[asterisk-users] How to tie orders taken to specific CDR records
On Thu, Oct 25, 2012 at 12:18 PM, Mitch Claborn <mitch_ml at claborn.net> wrote:> Our phone operators work off of an Asterisk queue. They take calls from > customers and take orders with our back end systems. What I need to be able > to do is tie the orders taken to the specific CDR record that reflects the > call from which the order originated. > > The typical/sample CDR table doesn't have a primary key. I can add an > auto-generated PK, but the CDR is not written until the call ends, when the > orders have already been placed. (Even if the CDR was written earlier, > could I retrieve the generated PK from it in the dialplan somehow?) > > Is there some combination of fields in the CDR that might uniquely identify > a specific call? > > Open to any and all ideas. > > > -- > > MitchI have done this with SIPCallID and sound files. Not a true GUID but enough combinations to not run into problems. I have also used RDNIS to stuff info since it is mostly never used. You can add DB functions to your dialplan beyond what the standard queue logs contain or is written to the DB by the queue app. http://www.voip-info.org/wiki/view/Asterisk+variables Thanks, Steve T
Ruddy Gbaguidi
2012-Oct-26 13:19 UTC
[asterisk-users] How to tie orders taken to specific CDR records
You can have your dialplan log and write a data in a specific table as soon as you get the call. Then send that call ID to the agent web interface. And when the agent complete the order, you just update the table with needed information. ____________________________________ Ruddy Gbaguidi Micnes - Professional Services 3767 Thimens, Suite 202 Montreal (Quebec), Canada, H4R 1W4 C: +1.514.814.0690 plugworld at micnes.com -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mitch Claborn Sent: 2012-10-25 12:19 To: asterisk-users at lists.digium.com Subject: [asterisk-users] How to tie orders taken to specific CDR records Our phone operators work off of an Asterisk queue. They take calls from customers and take orders with our back end systems. What I need to be able to do is tie the orders taken to the specific CDR record that reflects the call from which the order originated. The typical/sample CDR table doesn't have a primary key. I can add an auto-generated PK, but the CDR is not written until the call ends, when the orders have already been placed. (Even if the CDR was written earlier, could I retrieve the generated PK from it in the dialplan somehow?) Is there some combination of fields in the CDR that might uniquely identify a specific call? Open to any and all ideas. -- Mitch -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Bharat Lalcheta
2012-Oct-27 09:26 UTC
[asterisk-users] How to tie orders taken to specific CDR records
Its depends on dialplan and the way you treat the call. On Fri, Oct 26, 2012 at 7:54 PM, Mitch Claborn <mitch_ml at claborn.net> wrote:> Looking at the uniqueid, I get multiple records for some of them. Am I > getting more than one CDR record per call in some cases? > > SELECT uniqueid, COUNT(*) FROM asterisk_cdr > GROUP BY uniqueid > HAVING COUNT(*) > 2 > > > Mitch > > > On 10/26/2012 08:34 AM, Bharat Lalcheta wrote: > >> >> Every CDR has uniqueid/callid generated and unique between all records. >> This callid generated when call arrives on system. And logged in CDR >> record as well. You can use it in your dialplan to bind with your order >> like >> exten => s,1,Set(ORDERID=${UNIQUEID}) >> > > -- > ______________________________**______________________________**_________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/**mailman/listinfo/asterisk-**users<http://lists.digium.com/mailman/listinfo/asterisk-users> >-- Bharat Lalcheta -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20121027/a15accfa/attachment.htm>
Tiago Geada
2012-Oct-28 16:30 UTC
[asterisk-users] How to tie orders taken to specific CDR records
Hello, I faced this issue a while back. What I do, as soon the call comes in, I Set(UID=${UNIQUEID}), then re-use UID allong the dialplan as Set(CDR(UID)=${UID}). My DB has a UID field, that I can group by On 27 October 2012 10:26, Bharat Lalcheta <bharatlalcheta at gmail.com> wrote:> Its depends on dialplan and the way you treat the call. > > > On Fri, Oct 26, 2012 at 7:54 PM, Mitch Claborn <mitch_ml at claborn.net>wrote: > >> Looking at the uniqueid, I get multiple records for some of them. Am I >> getting more than one CDR record per call in some cases? >> >> SELECT uniqueid, COUNT(*) FROM asterisk_cdr >> GROUP BY uniqueid >> HAVING COUNT(*) > 2 >> >> >> Mitch >> >> >> On 10/26/2012 08:34 AM, Bharat Lalcheta wrote: >> >>> >>> Every CDR has uniqueid/callid generated and unique between all records. >>> This callid generated when call arrives on system. And logged in CDR >>> record as well. You can use it in your dialplan to bind with your order >>> like >>> exten => s,1,Set(ORDERID=${UNIQUEID}) >>> >> >> -- >> ______________________________**______________________________**_________ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> New to Asterisk? Join us for a live introductory webinar every Thurs: >> http://www.asterisk.org/hello >> >> asterisk-users mailing list >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/**mailman/listinfo/asterisk-**users<http://lists.digium.com/mailman/listinfo/asterisk-users> >> > > > > -- > Bharat Lalcheta > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20121028/bff1a504/attachment.htm>