[asterisk-users] Simple CDRs
Grey Man
greymanvoip at gmail.com
Fri Jan 9 09:53:36 CST 2009
On Fri, Jan 9, 2009 at 3:08 PM, Steve Murphy <murf at digium.com> wrote:
>
> By appending another string, you can guarantee it is unique across
> systems.
> So, if you use a system name, or Asterisk server name, that you yourself
> guarantee to be unique among all the asterisk servers that would
> contribute
> CDRs to a database, you achieve complete, guaranteed uniqueness.
How many characters from the server/system name are you intending to
use? How are you going to ensure users are aware they need to make
their server names unique.
asterisk-gateway-europe-ireland-dublin.datacenter-numberone.server1
asterisk-gateway-europe-ireland-dublin.datacenter-numberone.server2
What happens when the server name is left as a default of linux or
localhost. I could go on.
>
> If I'm missing something, educate me. I need to understand this sort of
> stuff to be able to write a useful CDR system.
>
Consider this case again. A billing engine using a database backend
runs as a separate process to Asterisk. For whatever reason it is
terminated unexpectedly and left in an unknown state. Its method of
operation is to take CDRs produced by Asterisk, bill them and then
write a billed call record to a billedcalls table. When the billing
engine is restarted it needs to determine which outstanding CDRs have
been billed and which haven't. The consequence of getting it wrong is
that a customer will be double billed or not billed. If the billing
engine can depend on a unique id field for all Asterisk CDRs its very
easy for the billing engine to know what's been billed and what
hasn't. Without it extra measures have to be taken such as using both
the uniqueid and calldate, not that there isn't a chance of a
collision there as well.
I'll give up on this. I know programmers can be pedantic but 20 posts
discussing whether a Universally Unique Identifier (UUID) is unique
has been a bit frustrating. At the end of the day all I'd hope to get
from any new system is correct CDRs for blind and attended transfers.
Regards,
Greyman.
More information about the asterisk-users
mailing list