[Asterisk-Users] How uniqueids are formed - possible race conditions for linked channels?

Roger Schreiter roger at planinternet.de
Sat Nov 5 05:42:44 MST 2005


Hi,

the uniqueid obviously consists of a timestamp part
and an continously incremented part, separated by a dot.

The two channels of a call in most cases have the
same number before the dot (timestamp) and consecutive
numbers after the dot.

Now I wonder, whether I can rely on that scheme.
I assume, the timestamp part can be different, e.g.
if between the creation of the incoming channel and
the creation of the outgoing channel the system clock
switches to the next second. (Or even more, if an AGI-
script or anything else has consumed more time in between.)

What about the part after the dot? Is it possible, that
the outgoing channels gets there a higher number than
the one from the incoming incremented by 1? May e.g. another
incoming channel at almost exact the same time get that
number instead?


Thanks for some hints about that!
Roger.




More information about the asterisk-users mailing list