[asterisk-users] MeetMe and usernum
Steve Edwards
asterisk.org at sedwards.com
Mon Mar 1 12:05:16 CST 2010
On Mon, 1 Mar 2010, Emrah wrote:
> The problem with the command you mentioned is... When do I call it? If
> two people happen to enter the conf at the sametime, I have a feeling
> there may be some little confusion there...
If you are using a database, it may provide generic locking that you can
[ab]use.
For example, MySQL provides "get_lock()" which could be used like:
select get_lock('find-usernum', 20);
This would block another process from executing until:
1) 20 seconds is up.
2) the locking process exits.
3) you explicitly release the lock by executing "release_lock()."
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
More information about the asterisk-users
mailing list