Asterisk func lock
Synopsis:
Attempt to obtain a named mutex
Description: LOCK(<lockname>)
Attempts to grab a named lock exclusively, and prevents other channels from
obtaining the same lock. LOCK will wait for the lock to become available.
Returns 1 if the lock was obtained or 0 on error.
Notes To avoid the possibility of a deadlock, LOCK will only attempt to
obtain the lock for 3 seconds if the channel already has another lock.
See also
Description: LOCK(<lockname>)
Attempts to grab a named lock exclusively, and prevents other channels from
obtaining the same lock. LOCK will wait for the lock to become available.
Returns 1 if the lock was obtained or 0 on error.
Notes To avoid the possibility of a deadlock, LOCK will only attempt to
obtain the lock for 3 seconds if the channel already has another lock.
- *CLI> show function LOCK
See also
- Asterisk func trylock Function TRYLOCK()
- Asterisk func unlock Function UNLOCK()
- Asterisk variables
- Asterisk functions
- Asterisk - documentation of application commands




