Uniqueid field in CDR

Hi,

as noted in http://www.voip-info.org/wiki-Asterisk+billing, “uniqueid: Unique Channel Identifier (32 characters)”. Hope someone can elaborate what the attribute is about, and quote example(s) of how it can be of use. Thanks.

Regards
astervoiper

After some thoughts, I reckon it’s the primary key used to uniquely identify each row in the CDR table. Hope someone can provide confirmation/comment/correction to my assumption. Thanks.

It is used to uniquely identify a call. You can correlate a call recorded by monitor for instance with he CDR details. I have a script that checks the cost of each call upon hangup for certain trunks and use this along with the cost in another table. Then I can just do a join on the tables for example.

p

Hi p_lindheimer,

thanks for clarifying. I sure have a better picture now :smile:

Although the actual text field in the CDR is 32 chars wide, samples that I have on my DB show that it’s in a NNNNNNNNNN.NNNN or similiar format (where N is a digit, e.g. 1142481417.8185). Any idea what’s the max no of rows allow-able before duplication? Would be glad also if someone could provide the key components in deriving the resultant IDs. Thanks.

Regards

why do you need to know? I haven’t looked into it but I’m sure it is similar to a guid - statistically close to null that you will ever get a repeat. If you need to know - go scan the source code and find out where it is generated. (unless somone beats you to it and posts).

p

Eventually, it will run out of rows. Of course, whether the system or anything else related can survive till the UNIQUEIDs are exhausted is another matter.

I’m not a programmer, but will check the codes if required. Just thought that someone could provide an quick answer, to save the trouble :smile:

Thanks for responding.

hmm - I probably miss-counted, but looks like there are 100 trillion uniqueids so I suspect you will have other problems first…

p

Noted and thanks again