[asterisk-dev] Is ast_channel->uniqueid really unique ?

Kevin P. Fleming kpfleming at digium.com
Mon Jan 22 15:49:21 MST 2007


Oded Arbel wrote:
> The problem I'm having, is that I don't think that a channel's uniqueid
> is unique across multiple Asterisk installations - under some very
> common behaviors of a multiple Asterisk installation, some channels
> created on different Asterisk instances will have the same uniqueid.

Of course it's not unique across Asterisk instances... you quoted the
exact process by which it is computed, which makes no attempt to create
such a unique identifier.

Any such GUID will have to be much larger than a 32-bit entity, so the
rest of Asterisk would have to be modified to create such a thing.

Instead, in your dialplan you can call some sort of GUID creation
function, and store the result in the CDR userfield or in a custom CDR
variable. Then your database can have a globally unique ID for that
call, without really requiring any modifications to Asterisk itself.


More information about the asterisk-dev mailing list