Skip to end of metadata
Go to start of metadata

EXTENSION_STATE()

Synopsis

Get an extension's state.

Description

The EXTENSION_STATE function can be used to retrieve the state from any hinted extension. For example:

NoOp(1234@default has state ${EXTENSION_STATE(1234)})

NoOp(4567@home has state ${EXTENSION_STATE(4567@home)})

The possible values returned by this function are:

UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING | RINGINUSE | HOLDINUSE | ONHOLD

Syntax

EXTENSION_STATE(extension@context)
Arguments
  • extension
  • context - If it is not specified defaults to default.

See Also

Import Version

This documentation was imported from Asterisk Version GIT-16-b8bf57dc38

  • No labels

2 Comments

  1. The registered number, but the EXTENTION_STATE (0151009002) function returns "UNKNOWN".

    why that?....

    When does this happen?

    DEVICE_STATE (PJSIP / 0151009002) function returns 'NOT_INUSE'.  (ok)

    ---------------------------------------------------------------------------------------

    freepbx*CLI> pjsip show contacts

    Contact: <Aor/ContactUri..............................> <Hash....> <Status> <RTT(ms)..>
    ==========================================================================================

    Contact: 0151009012/sip:0151009012@211.238.138.1:5060 64d1a3e286 Avail 18.624

     

     

    1. Please use resources like the community site at https://community.asterisk.org/ for help. Commenting on wiki pages isn't a great place for such things.