Skip to content

WaitForSignal()

Synopsis

Waits for a named signal on a channel.

Description

Waits for signaltimeout seconds on the current channel to receive a signal with name signalname. Acts as a consumer in a simple message queue.

Result of signal wait will be stored in the following variables:

  • WAITFORSIGNALSTATUS

    • SIGNALED - Signal was received.

    • TIMEOUT - Timed out waiting for signal.

    • HANGUP - Channel hung up before signal was received.

  • WAITFORSIGNALPAYLOAD - Data payload attached to signal, if it exists

    Example: Wait for the workdone signal, indefinitely, and print out payload
    same => n,WaitForSignal(workdone)
    same => n,NoOp(Received: ${WAITFORSIGNALPAYLOAD})
    

Syntax

WaitForSignal(signalname,[signaltimeout])
Arguments
  • signalname - Name of signal to send.

  • signaltimeout - Maximum time, in seconds, to wait for signal.

See Also

Generated Version

This documentation was generated from Asterisk branch 18 using version GIT