[SR-Users] Generate UUID in Kamailio Script

Grant Bagdasarian GB at cm.nl
Fri Aug 9 13:13:10 CEST 2013


Yeah, I do need a dynamic GUID.



>From what I understood from Daniel:

use $sruid to get the unique id (it will be a new value for each use of it).



Does this mean that for each request the $sruid variable returns a new unique id or the same for each kamailio instance?



-----Original Message-----
From: sr-users-bounces at lists.sip-router.org [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Alex Balashov
Sent: Friday, August 9, 2013 11:32 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Generate UUID in Kamailio Script



Oh, I thought you were looking for a dynamic GUID, not a constant UID for an instance.





Grant Bagdasarian <GB at cm.nl<mailto:GB at cm.nl>> wrote:

>Nice!

>

>Thanks!

>

>-----Original Message-----

>From: sr-users-bounces at lists.sip-router.org<mailto:sr-users-bounces at lists.sip-router.org>

>[mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of

>Daniel-Constantin Mierla

>Sent: Thursday, August 8, 2013 4:50 PM

>To: Kamailio (SER) - Users Mailing List

>Subject: Re: [SR-Users] Generate UUID in Kamailio Script

>

>Actually there is a variable giving an unique id for kamailio - just

>load kex module and use $sruid to get the unique id (it will be a new

>value for each use of it).

>

>If you have multiple instances of kamailio, then set server_id global

>parameter to make the values unique across instances.

>

>Cheers,

>Daniel

>

>

>On 8/8/13 4:43 PM, Grant Bagdasarian wrote:

>> That's too bad. Any idea if this already on the backlog for future

>Kamailio versions?

>>

>> I guess the only option left is to use the EXEC module to run the

>uuidgen command to get a new UUID?

>>

>> -----Original Message-----

>> From: sr-users-bounces at lists.sip-router.org<mailto:sr-users-bounces at lists.sip-router.org>

>> [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Alex

>> Balashov

>> Sent: Thursday, August 8, 2013 3:36 PM

>> To: sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org>

>> Subject: Re: [SR-Users] Generate UUID in Kamailio Script

>>

>> Unfortunately, there is no transformation or core function that emits

>a GUID.

>>

>> There probably should be one.

>>

>> On 08/08/2013 09:33 AM, Grant Bagdasarian wrote:

>>

>>> Hello,

>>>

>>> Is it possible to generate a UUID inside the kamailio script? Is

>>> there a module available which does this already or do I need to

>call

>>> something external from the script?

>>>

>>> Regards,

>>>

>>> Grant

>>>

>>>

>>>

>>> _______________________________________________

>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing

>>> list sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org>

>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

>>>

>>

>> --

>> Alex Balashov - Principal

>> Evariste Systems LLC

>> 235 E Ponce de Leon Ave

>> Suite 106

>> Decatur, GA 30030

>> United States

>> Tel: +1-678-954-0670

>> Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

>>

>> _______________________________________________

>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing

>> list sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org>

>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

>>

>> _______________________________________________

>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing

>> list sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org>

>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

>

>--

>Daniel-Constantin Mierla - http://www.asipto.com

>http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

>

>

>_______________________________________________

>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

>sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org>

>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

>

>_______________________________________________

>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

>sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org>

>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



--

Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard.



Alex Balashov - Principal

Evariste Systems LLC

235 E Ponce de Leon Ave

Suite 106

Decatur, GA 30030

United States

Tel: +1-678-954-0670

Web: http://www.evaristesys.com/, http://www.alexbalashov.com



_______________________________________________

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130809/0c5253c3/attachment.html>


More information about the sr-users mailing list