Jump to content

Recommended Posts

Posted
Hi there. I am attempting to set the part ring-back timeout, as well as forcing the ringback to go to a call group. Omitting keys, this is the line of code that I am using in the terminal:

curl -i -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Auth-Token: xxxxxxxxxxx" -X POST -d "{"data":{"flow":{"data":{"action":"auto","default_ringback_timeout":300000},"module":"park","children":{}},"patterns":["^\\*3([0-9]*)$"],"featurecode":{"name":"park_and_retrieve","number":"3"},"ui_metadata":{"version":"4.0-10","ui":"monster-ui","origin":"callflows"},"numbers":[], "id":"CALLFLOW_ID"}}" http://SERVER:8000/v1/accounts/xxxxxxx/callflows/xxxxxxx 

However, I am receiving a bad syntax error. I have been using at the code that Tuly has supplied to similar questions, though I have updated the version with the one that is shown when I do a GET call on the specific callflow ID. I am using Windows 10, hence the double quotation marks around the entire json code.

It is also unclear how I would reroute a parked call that has timed out to an entire ring group. Thanks for any help.
Posted
I ended up writing a python script. The documentation for the request library was incorrect (or I was reading it wrong), but essentially I was trying to pass the json data as "data." Once I switched the data type to "json," it worked. 

r = requests.post(url, headers=headers, json = payload1)

the payload is the "data":{"flow: etc
  • 2 weeks later...
Posted
Hi - I'm trying to do the same thing. Would you mind sharing the whole call flow please? 

I have 3 parking spots and want them to ring back after 30 seconds to a ring group (not just the parker) ad then re-park the call. Currently this one rings the parker and then sort of rings the group but I see originator_canceled in the call legs for those attempts. Any help would be appreciated! I have slot 1 set to ring back after 5 seconds for testing.


{      "data": {          "flow": {              "children": {                  "1": {                      "children": {                      },                      "data": {                          "name": "7777 All",                          "endpoints": [                              {                                  "timeout": 30,                                  "endpoint_type": "group",                                  "id": "2c5905e259e2be2822d053053ea0895e",                                  "delay": 0                              }                          ],                          "strategy": "simultaneous",                          "timeout": 30,                          "ignore_forward": true,                          "repeats": 1                      },                      "module": "ring_group"                  },                  "2": {                      "children": {                      },                      "data": {                          "name": "7777 All",                          "endpoints": [                              {                                  "timeout": 30,                                  "endpoint_type": "group",                                  "id": "2c5905e259e2be2822d053053ea0895e",                                  "delay": 0                              }                          ],                          "strategy": "simultaneous",                          "timeout": 30,                          "ignore_forward": true,                          "repeats": 1                      },                      "module": "ring_group"                  },                  "3": {                      "children": {                      },                      "data": {                          "name": "7777 All",                          "endpoints": [                              {                                  "timeout": 30,                                  "endpoint_type": "group",                                  "id": "2c5905e259e2be2822d053053ea0895e",                                  "delay": 0                              }                          ],                          "strategy": "simultaneous",                          "timeout": 30,                          "ignore_forward": true,                          "repeats": 1                      },                      "module": "ring_group"                  }              },              "data": {                  "action": "auto",                  "slots": {                      "1": {                          "ringback_timeout": 10000,                          "callback_timeout": 5000                      },                      "2": {                          "ringback_timeout": 30000,                          "callback_timeout": 10000                      },                      "3": {                          "ringback_timeout": 30000,                          "callback_timeout": 10000                      }                  }              },              "module": "park"          },          "featurecode": {              "name": "park_and_retrieve",              "number": "3"          },          "patterns": [              "^\\*3([0-9]*)$"          ],          "ui_metadata": {              "version": "4.0-23",              "ui": "monster-ui",              "origin": "voip"          },          "numbers": [          ],          "name": "Park 7777",          "id": "238c295a3d126848cb9ac610d0dfd15c",          "metadata": {          }      },      "revision": "9-3b3016848f85692d91beff2009e753e6",      "request_id": "c15f4d47c3a02e7ed95fceb04a16466b",      "status": "success",      "auth_token": "blahblahblah"  }  
×
×
  • Create New...