# Asterisk Project : Asterisk 13 Function_UNLOCK

Created by wikibot on Aug 08, 2014

# UNLOCK()

### Synopsis

Unlocks a named mutex.

### Description

Unlocks a previously locked mutex. Returns `1` if the channel had a lock or `0` otherwise.

Note

Icon

It is generally unnecessary to unlock in a hangup routine, as any locks held are automatically freed when the channel is destroyed.

Note

Icon

If `live_dangerously` in `asterisk.conf` is set to `no`, this function can only be executed from the dialplan, and not directly from external protocols.

### Syntax

    UNLOCK(lockname)

##### Arguments

- `lockname`

### See Also

### Import Version

This documentation was imported from Asterisk Version SVN-branch-13-r420538