Details

    • Type: New Feature New Feature
    • Status: Closed
    • Severity: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Target Release Version/s: None
    • Labels:
      None

      Description

      main/devicestate.c says Asterisk Manager Interface (AMI) gets DeviceState events, but this is not true.

      This patch adds a "DeviceStateChanged" event to AMI. And also introduces AMI commands DeviceStateSet and DeviceStateGet to controll device states from AMI, if func_devicestate is compiled in.

        Issue Links

          Activity

          Hide
          Olle Johansson added a comment -

          Sent mail to asterisk-dev just to check that everyone agrees about adding a new class to manager.conf.

          Show
          Olle Johansson added a comment - Sent mail to asterisk-dev just to check that everyone agrees about adding a new class to manager.conf.
          Hide
          Håkon Nessjøen added a comment -

          A little slap on my own hands. There are some brackets missing on the ActionID lines. According to the coding guidelines.. ;P

          Show
          Håkon Nessjøen added a comment - A little slap on my own hands. There are some brackets missing on the ActionID lines. According to the coding guidelines.. ;P
          Hide
          Håkon Nessjøen added a comment -

          New patch with devicestate class instead of deviceinfo, as confirmed on asterisk-dev mailinglist.

          Show
          Håkon Nessjøen added a comment - New patch with devicestate class instead of deviceinfo, as confirmed on asterisk-dev mailinglist.
          Hide
          Corey Farrell added a comment -

          I realize it's a bit late to comment on this bug/patch, but the Get/Set functionality already exists:
          Action: Setvar
          Variable: DEVICE_STATE(Custom:lamp1)
          Value: NOT_INUSE

          Action: Getvar
          Variable: DEVICE_STATE(Custom:lamp1)

          Just bringing this up as there is often duplication between CLI, Dialplan apps and AMI commands. For dialplan functions we don't have to duplicate to AMI since it can be used as shown above.

          Show
          Corey Farrell added a comment - I realize it's a bit late to comment on this bug/patch, but the Get/Set functionality already exists: Action: Setvar Variable: DEVICE_STATE(Custom:lamp1) Value: NOT_INUSE Action: Getvar Variable: DEVICE_STATE(Custom:lamp1) Just bringing this up as there is often duplication between CLI, Dialplan apps and AMI commands. For dialplan functions we don't have to duplicate to AMI since it can be used as shown above.
          Hide
          Matt Jordan added a comment -

          And in Asterisk 13 at least, we also have the DeviceStateChange event.

          As such, since all aspects of this new feature are now in Asterisk, I'm going to close this out as Fixed.

          Show
          Matt Jordan added a comment - And in Asterisk 13 at least, we also have the DeviceStateChange event. As such, since all aspects of this new feature are now in Asterisk, I'm going to close this out as Fixed.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development