DeflectCall endpoint

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • avc859587618170
    Brainiac
    • Jun 2024
    • 65

    DeflectCall endpoint

    Hey gang.. I'm trying to call the /fe/v1/DeflectCall endpoint, and I keep getting a 400 bad request, "operation": "objectNotKnown". I have my json payload setup like this:

    Code:
    {
      "callToBeDiverted": {
        "deviceID": "123456789:RCD2CM2ACT81T::0",
        "callID": "1363"
      },
      "newDestination": "1001000007"
    }


    the device Id, I'm guessing should be the id of the device that is calling my One-X station. CallId is in the "DeliveredEvent" payload I get when monitoring a station, newDestionation I've tried an external phone number, as well as an internal vdn. I get the same error for either. I've also tried putting my One-X extension that is being called just in case, that didn't work either.

    Any help would be appreciated!!

    Have a good day!

    Dave
    Dave Morrison
    Software Engineer
  • avc859587618170
    Brainiac
    • Jun 2024
    • 65

    #2
    I think I should add what I'm trying to do. I'm trying to send a call to another destination if the call rings for say.. 5 seconds. Kind of simulating a rona in a hunt group. So, call rings to extension, isn't answered for 5 seconds, call the DeflectCall endpoint passing the calling party, the callid, and the destination... say a VDN that queues high priority to a hunt group.

    Thanks!!

    Dave
    Dave Morrison
    Software Engineer

    Comment

    • flynn1
      Brainiac
      .
      • Jun 2011
      • 82

      #3
      I think your newDestination is incorrect. It should be a DMCC DeviceID. You should use /fe/v1/GetDeviceId or /fe/v1/GetThirdPartyDeviceId to get one for 1001000007.

      Comment

      • avc859587618170
        Brainiac
        • Jun 2024
        • 65

        #4
        That was it!! Booya!! This is so cool!

        So, this worked for me.

        Code:
        {
          "callToBeDiverted": {
            "deviceID": "1234567890:rcd2cm2act81t:0.0.0.0:1",
            "callID": "1371"
          },
          "newDestination": "1111111111:rcd2cm2act81t:0.0.0.0:1"
        }
        So, the deviceID is my One-X station that is being called, the newDestination is a VDN in our phone system.

        As always, thanks very much for the help! I really appreciate it!!!


        On a side note, do you know if it's possible to send to an off switch destination? Or would I have to program a VDN to route to an outside destination?

        Thanks again!

        Dave
        Dave Morrison
        Software Engineer

        Comment

        • flynn1
          Brainiac
          .
          • Jun 2011
          • 82

          #5
          According to the TSAPI Programmers Guide, the newDestination can be Off-switch.

          Comment

          • avc859587618170
            Brainiac
            • Jun 2024
            • 65

            #6
            Yea, I saw that.. but it didn't like my just putting in the 10 or 11 digit number.. I'll try again to see what happens..
            Dave Morrison
            Software Engineer

            Comment

            Loading