[reSIProcate] True uniqeness of Helper::computeCallID()
David Thompson
mrdatman at hotmail.com
Thu Sep 28 09:15:54 CDT 2006
Thanks Byron.
What are your thoughts on using a UUID type of algorithm as found in http://www.ietf.org/rfc/rfc4122.txt
?
David
CC: resiprocate-devel at list.sipfoundry.orgFrom: bcampen at estacado.netSubject: Re: [reSIProcate] True uniqeness of Helper::computeCallID()Date: Wed, 27 Sep 2006 20:30:48 -0500To: mrdatman at hotmail.com
Hrm. Just some preliminary fiddling with the probabilities (alas, my installation of octave is hosed) makes it look _extremely_ likely that you would get repeats within a data set of 2 million (before the hash, we aren't talking about hash collisions here). Just throwing in a timestamp or a counter would make the pre-hash token effectively unique, or you could go with a longer string of random hex (16 should bring it down to a vanishingly small probability). Maybe we could have Helper::computeCallId() take an optional int parameter that would specify the length of random hex the caller wants to go in the hash?
Best regards,
Byron Campen
Has anyone had issue with the true uniqueness of Helper::computeCallID(). I've used the value returned from this to push about two million calls into cdr records....however I am discovering that some new calls are attaching themselves to old cdr records....... The algorithm used in Helper.cxx is the base64 of md5 of hostname + Random::getRandomHex(8) My guess is there is a good chance that you will get a random number twice. Does anyone have an idea on how this can be improved or a quick code snippet for me to create a truly unique callid? Thanks in advance, David
Share your special moments by uploading 500 photos per month to Windows Live Spaces Share it!
_______________________________________________
resiprocate-devel mailing list
resiprocate-devel at list.sipfoundry.org
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
_________________________________________________________________
Stay connected with the news, people, places and online services that matter to you on Live.com
http://www.live.com/getstarted.aspx?icid=T001MSN30A0701
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20060928/2a4c9518/attachment.htm>
More information about the resiprocate-devel
mailing list