[asterisk-users] generating a GUID

Julian Lyndon-Smith asterisk at dotr.com
Thu Aug 9 10:05:17 CDT 2007


James FitzGibbon wrote:
> On 8/9/07, *Julian Lyndon-Smith* <asterisk at dotr.com 
> <mailto:asterisk at dotr.com>> wrote:
>
>     I have a need to have a GUID (for example,
>     bcd47ccc-d7c9-ddb6-dc11-6746a770d77d [36 characters long including the
>     "-"]) generated in the dialplan. Is there any asterisk function that
>     would do this ? I would prefer not to have to shell out every time a
>     call comes in.
>
>
> There's nothing built in that I know of.  I had mused with the idea of 
> wrapping the available UUID generator code out there into a function 
> and offering it as a patch, but it's a low priority thing for me.
>
> In the meantime, you could achieve what you want without the cost of 
> spinning up a shell process by writing a FastAGI app in Perl.  Using 
> the modules Asterisk::FastAGI and Data::UUID, you could get a UUID 
> back for the cost of the socket connection.
>
> This is a quick example that I coded up to do that - it was actually 
> more painful to install the modules from CPAN than code up the server 
> itself:
[snip]

Wow! That is way, way beyond what I asked for - many thanks indeed. I'll 
start playing with this.

Thanks again

Julian.




More information about the asterisk-users mailing list