[sr-dev] [kamailio/kamailio] pua_dialoginfo: generate uuid as id instead of use callid value (PR #2908)

Daniel-Constantin Mierla notifications at github.com
Thu Oct 28 16:16:36 CEST 2021


Thanks!

Any reason not to use `src/core/utils/sruid.h` instead of `libuuid`? It is used to generate unique ids for register/location records and in other components. That will not add external dependency, making it easier to backport in stable branches.

The patch will stay pretty much the same with the exception of generating the uuid value.

In short, for mod_init(), should be:

```
#include "../../core/utils/sruid.h"
...
sruid_t _puadi_sruid;
if(sruid_init(&_puadi_sruid, (char)'-', "padi", SRUID_INC)<0) {
   // error
   return -1;
}
```

Then for generation:

```
extern sruid_t _puadi_sruid;
...
sruid_next_safe(&_puadi_sruid);

// uuid available in str _reginfo_sruid.uid;
```

I had in mind to extend the sruid in order to enable modules to register callbacks for generating uuid value, with the goal to do it from the exiting uuid module and make the libuuid-style-uuids available to the other modules without linking against libuuid.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2908#issuecomment-953891411
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20211028/1fed74a8/attachment.htm>


More information about the sr-dev mailing list