[asterisk-users] How to tie orders taken to specific CDR records

Mitch Claborn mitch_ml at claborn.net
Thu Oct 25 15:05:38 CDT 2012


Danny - good idea.  That works for the first report that I'm creating.

Another idea I had that I may explore:
Create another table "keytable" with an auto increment PK.  When I place 
the call in the queue, insert a row into keytable and retrieve the 
generated PK.  Put that value into the CDR as a user defined field.  Not 
all calls will have it, but all sales queue call should.  I can than tie 
that value back to the actual order records.


Mitch

On 10/25/2012 11:21 AM, Danny Nicholas wrote:
> 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.
>
>



More information about the asterisk-users mailing list