WTI Start Monitor with callcontrol and physicalDeviceFeature

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • hofmad
    Hot Shot
    • Sep 2014
    • 14

    WTI Start Monitor with callcontrol and physicalDeviceFeature

    Hi there,

    I'm new to DMCC but not to AES in common.
    I learned to read the DMCC docs and XML-Messages from the dashboard application.
    When I start a monitor using the WTI API onyl with "callcontrol" in it, the monitor is working fine and sends me everything I requested.
    The working JSON is:

    Code:
    {
       "monitorObject":{
          "deviceObject":"84940142:ACM:0.0.0.0:1"
       },
       "requestedMonitorFilter": {
         "callcontrol": {
           "originated": true,
           "delivered": true,
           "callCleared": true,
           "connectionCleared": true
         }
       },
       "extensions":{
          "privateData":{
             "private":{
                "AvayaEvents":{
                   "invertFilter":true,
                   "deviceServices":{
                      "transferMonitorObjects":true,
                      "getMonitorList":true,
                      "getDeviceIdList":true
                   },
                   "endpointRegistrationStateEvents":{
                     "registered":true,
                     "unregistered":true
                   }
                }
             }
          }
       },
       "targetUrl":"http://[myurl]/events/"
    }
    Now when I try to create a new Monitor using the physicalDeviceFeature I'm getting "Bad Request" as an answer.
    This is the not working JSON:

    Code:
    {
       "monitorObject":{
          "deviceObject":"84940142:ACM:0.0.0.0:1"
       },
       "requestedMonitorFilter": {
         "physicalDeviceFeature": {
           "displayUpdated":false,
           "hookswitch":true,
           "lampMode":false,
           "ringerStatus":true
         }
       },
       "extensions":{
          "privateData":{
             "private":{
                "AvayaEvents":{
                   "invertFilter":true,
                   "deviceServices":{
                      "transferMonitorObjects":true,
                      "getMonitorList":true,
                      "getDeviceIdList":true
                   },
                   "endpointRegistrationStateEvents":{
                     "registered":true,
                     "unregistered":true
                   }
                }
             }
          }
       },
       "targetUrl":"http://[myurl]/events/"
    }
    Why is this not working?
  • flynn1
    Brainiac
    .
    • Jun 2011
    • 82

    #2
    endpointRegistrationStateEvents should be terminalUnregisteredEvent. Other than that, I think everything is OK.

    Comment

    • hofmad
      Hot Shot
      • Sep 2014
      • 14

      #3
      Thank you flynn1 for your answer

      Even with terminalUnregisteredEvent I get the "400 Error: Bad Request" Response.

      Request JSON:
      Code:
      {
         "monitorObject":{
            "deviceObject":"84940142:ACM:0.0.0.0:1"
         },
         "requestedMonitorFilter": {
           "physicalDeviceFeature": {
             "displayUpdated":false,
             "hookswitch":true,
             "lampMode":false,
             "ringerStatus":true
           }
         },
         "extensions":{
            "privateData":{
               "private":{
                  "AvayaEvents":{
                     "invertFilter":true,
                     "deviceServices":{
                        "transferMonitorObjects":true,
                        "getMonitorList":true,
                        "getDeviceIdList":true
                     },
                     "terminalUnregisteredEvent":{
                       "reregistered":true,
                       "unregistered":true
                     }
                  }
               }
            }
         },
         "targetUrl":"http://[myurl]/events/"
      }​​
      Are you able to test it on your lab?

      Comment

      • flynn1
        Brainiac
        .
        • Jun 2011
        • 82

        #4
        Here is a sample that works for me:

        Code:
        Sending WTI request to AES using direct method: MonitorStart
        {
                "extensions": {"privateData": {"private": {"AvayaEvents": {
                        "physicalDeviceFeaturesPrivateEvents": {"serviceLinkStatusChanged": true},
                        "invertFilter": true,
                        "deviceServices": {
                                "transferMonitorObjects": true,
                                "getMonitorList": true,
                                "getDeviceIdList": true
                        },
                        "terminalUnregisteredEvent": {
                                "reregistered": true,
                                "unregistered": true
                        }
                }}}},
                "monitorObject": {"deviceObject": "50500:CM181:0.0.0.0:0"},
                "targetUrl": "http://10.10.13.242:8081/v1/events",
                "requestedMonitorFilter": {"physicalDeviceFeature": {
                        "lampMode": true,
                        "displayUpdated": true,
                        "hookswitch": true,
                        "ringerStatus": true
                }}
        }

        Comment

        • hofmad
          Hot Shot
          • Sep 2014
          • 14

          #5
          Your sample is not working for me... I tested it on two different AES 10.2 servers, both responded with "Error 400: Bad Request"

          Response Body:
          Code:
          {
          "operation": "generic"
          }

          Comment

          • flynn1
            Brainiac
            .
            • Jun 2011
            • 82

            #6
            You may get more information as to what's wrong from the WTI or DMCC trace file on AES. There are instructions on how to enable and view these traces in https://support.avaya.com/forums/for...rking-with-wti

            Comment

            • hofmad
              Hot Shot
              • Sep 2014
              • 14

              #7
              Thank you, that helped... the "funny" thing here is, that I have to perform a "GetDeviceId" prior starting the monitor. It gives me the already known DeviceID, but after that it starts the monitor...

              Comment

              • flynn1
                Brainiac
                .
                • Jun 2011
                • 82

                #8
                You should only have to do a GetDeviceID once per number. It sounds like you did not previously get the device ID from AES but just making up a string. For a (first party) device ID, you MUST get it from AES.

                Comment

                • avc859587618170
                  Brainiac
                  • Jun 2024
                  • 65

                  #9
                  Originally posted by hofmad View Post
                  Your sample is not working for me... I tested it on two different AES 10.2 servers, both responded with "Error 400: Bad Request"

                  Response Body:
                  Code:
                  {
                  "operation": "generic"
                  }
                  I'm getting the same error when I use "physicalDeviceFeaturesPrivateEvents". The error I'm seeing in the AES logs is: "Need to filter AgentStatusEvents because the client is not authorized to receive these events."

                  Hope this helps,

                  Dave
                  Dave Morrison
                  Software Engineer

                  Comment

                  • avc859587618170
                    Brainiac
                    • Jun 2024
                    • 65

                    #10
                    But then when I did what you did.. called GetDeviceId, it worked for me as well..

                    Dave
                    Dave Morrison
                    Software Engineer

                    Comment

                    • avc859587618170
                      Brainiac
                      • Jun 2024
                      • 65

                      #11
                      I don't mean to hijack this post, but I'm actually not getting any alerts even though the monitor returned a 200. A silly question is the "logicalDeviceFeaturePrivate" sends me alerts, I'm using avaya one-x.. but the "physicalDeviceFeaturesPrivateEvents" doesn't send alerts. Is it because I'm not using a physical phone?

                      Thanks!

                      Dave
                      Dave Morrison
                      Software Engineer

                      Comment

                      • jtb1
                        Whiz
                        .
                        • Feb 2017
                        • 33

                        #12
                        I wouldn't attribute the issue to your using a softphone. What do you see in the AES side logs?

                        Comment

                        • flynn1
                          Brainiac
                          .
                          • Jun 2011
                          • 82

                          #13
                          For physicalDeviceFeaturesPrivateEvents, the request looks like:


                          Code:
                          Sending WTI request to AES using direct method: MonitorStart
                          {
                                  "extensions": {"privateData": {"private": {"AvayaEvents": {
                                          "physicalDeviceFeaturesPrivateEvents": {"serviceLinkStatusChanged": true},
                                          "invertFilter": true,
                                          "terminalUnregisteredEvent": {
                                                  "reregistered": true,
                                                  "unregistered": true
                                          }
                                  }}}},
                                  "monitorObject": {"deviceObject": "50503:CM181:0.0.0.0:8"},
                                  "targetUrl": "http://10.10.13.242:8081/v1/events",
                                  "requestedMonitorFilter": {"physicalDeviceFeature": {
                                          "lampMode": true,
                                          "displayUpdated": true,
                                          "hookswitch": true,
                                          "ringerStatus": true
                                  }}
                          }
                          Ignore the "Need to filter AgentStatusEvents ..." log, it's normal.​

                          Comment

                          • flynn1
                            Brainiac
                            .
                            • Jun 2011
                            • 82

                            #14
                            Could your softphone be a SIP phone? For SIP stations, you will only get Call Control events and Media Start/Stop events. You won't get any of the physicalDeviceFeaturesPrivateEvents.

                            Comment

                            • avc859587618170
                              Brainiac
                              • Jun 2024
                              • 65

                              #15
                              It's H.323.. no sip yet in our environment..
                              Dave Morrison
                              Software Engineer

                              Comment

                              Loading