{"openapi":"3.0.1","info":{"title":"API SBC ORACLE","description":"<img src=\"https://upload.wikimedia.org/wikipedia/commons/8/81/Telef%C3%B3nica_Global_Solutions_2021_logo.svg\" alt=\"Logo\" width=\"200\" height=\"100\" />\n<h1>This API has been developed by TGS in order to management SBC ORACLE.</h1>\n# Version 2.3.1\n## Funciones\n  -  Gestionamos las passw por fichero .env diferenciando entornos pre y pro\n  -  AÃ±adimos log_management dentro del except de cada clase\n  - Cambios de para permitir bloqueo prepagos 21112025\n\n## Fix\n  - Modificamos path local para que coja por sistema\n","contact":{"email":"NgnDesign.DigitalVoice.globalsolutions@telefonica.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"version":"2.3.1"},"paths":{"/loging/":{"post":{"tags":["loging"],"summary":"Get token","description":"Endpoint for get tocken\n---\nReturn the token which has to be used in authorization header. Live time of token its\n150 minutes.\n","parameters":[{"$ref":"#/components/parameters/user"},{"$ref":"#/components/parameters/password"}],"responses":{"200":{"description":"Sucessfull response","content":{"application/json":{"example":{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTcwMzE2OTUyMiwianRpIjoiZGQ3YTVmMzctYTVjOC00NWZjLWFhYzYtNmM2NDljMDEzMzUxIiwidHlwZSI6ImFjY2VzcyIsInN1YiI6eyJpZCI6IjEiLCJ1c2VybmFtZSI6ImxlY3R1cmEiLCJwYXNzd29yZCI6ImxlY3R1cmEiLCJyb2xlIjoiVXNlclJlYWQifSwibmJmIjoxNzAzMTY5NTIyLCJleHAiOjE3MDMxNzg1MjIsInJvbGUiOiJVc2VyUmVhZCJ9.l56PXLA5WxtARqZGCyC-XWX4IDvYJjputNNYKQ_K-24"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"503":{"$ref":"#/components/responses/500InternalServerError"}}}},"/sipd/sessions/{host}":{"get":{"tags":["Sessions"],"summary":"Get currents call on SBC","description":"Endpoint for get currents call on SBC.<br>\n---\nShow the first nineteen calls that match the chosen filter.<br> If instead a hostname you use NGN_LIVE or NGN_LAB then\nthe search will be done in every SBCs\n\n\nFilter availables:\n\n* **by-agent** <agent name>â€”Display SIP sessions for the session agent specified.<br>\n* **by-ip**  <endpoint IP address>â€”Display SIP sessions for the specified IP address for\nan endpoint.<br>\n* **by-user**  **prefix match** <calling or called number>â€”Display SIP sessions for the specified user.<br>\n* **by-callid** <call ID>â€”Display SIP sessions for the specified call ID.<br>\n","parameters":[{"$ref":"#/components/parameters/hostName"},{"in":"query","name":"filter","required":true,"description":"Choose the field to filter calls","schema":{"type":"string","enum":["agent","user","ip","callId"]}},{"in":"query","name":"filterValue","required":true,"description":"Insert atleast four character to filter.\nThe filter is type \"Start to:\"\n","schema":{"type":"string","minLength":4,"example":659856595}}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"206":{"$ref":"#/components/responses/206PartialContent"},"503":{"$ref":"#/components/responses/503InternalServerError"}}},"delete":{"tags":["Sessions"],"summary":"Clear the session which call-id or user(phone number) has been passed by argument.","description":"Endpoint for delete calls\n---\nDeletes calls where the callId or user (phone number) has been specified. If both values are provided, only the callId will be considered.\n","parameters":[{"$ref":"#/components/parameters/hostName"},{"in":"query","name":"callId","schema":{"type":"string","example":"SDdlavc01-de5b03d87e924edffee9ed41d084ae1d100@127.0.0.1"},"required":false,"description":"CallId to be cleared"},{"in":"query","name":"user","schema":{"type":"string","example":"+36666666666"},"required":false,"description":"Phone number to be cleared"}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"}}}},"/sipd/realms/{host}":{"get":{"tags":["Realms"],"summary":"Get statistics of SIP INVITE messages for a realm.","description":"Endpoint for getting statistics of SIP INVITE messages for a realm..<br>\n---            \n","parameters":[{"$ref":"#/components/parameters/hostName"},{"in":"query","name":"realm","required":true,"description":"Insert the realm.            \n","schema":{"type":"string","example":"show sipd realms ASBC_Trunk_Internet_Zoom invite"}}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"206":{"$ref":"#/components/responses/206PartialContent"},"503":{"$ref":"#/components/responses/503InternalServerError"}}}},"/sipd/realms/invite{host}":{"get":{"tags":["Realms"],"summary":"Get formatted invite statistics for all realms.","description":"Endpoint for getting SIP INVITE statistics for all realms, formatted as structured JSON.<br>\nFormatea json y saca la informaciÃ³n de todos los realms.<br>\nSolo se incluyen los realms cuya suma de picos de trÃ¡fico (High Inbound + High Outbound)\nsea igual o superior al valor de **size_min** (por defecto 5).\n---\n","parameters":[{"$ref":"#/components/parameters/hostName"},{"name":"size_min","in":"query","required":false,"description":"Umbral mÃ­nimo de actividad. Solo se devuelven los realms cuya suma de picos (High Inbound + High Outbound) sea mayor o igual a este valor. Por defecto 5.\n","schema":{"type":"integer","default":10,"example":10}}],"responses":{"200":{"description":"Successful response with INVITE statistics per realm.","content":{"application/json":{"example":{"AL220B-ACCEVO":{"server":{"INVITE Requests":{"recent":5,"total":6941,"permax":14},"Retransmissions":{"recent":0,"total":83,"permax":4},"100 Trying":{"recent":2,"total":5081,"permax":9},"180 Ringing":{"recent":0,"total":2761,"permax":12},"200 OK":{"recent":3,"total":3643,"permax":10},"Transaction Timeouts":{"recent":null,"total":null,"permax":null},"Locally Throttled":{"recent":null,"total":null,"permax":null}},"client":{"INVITE Requests":{"recent":71,"total":323706,"permax":643},"Retransmissions":{"recent":0,"total":301,"permax":3},"100 Trying":{"recent":70,"total":323666,"permax":641},"180 Ringing":{"recent":29,"total":34867,"permax":34},"200 OK":{"recent":11,"total":20873,"permax":22},"Transaction Timeouts":{"recent":0,"total":0,"permax":0},"Locally Throttled":{"recent":0,"total":0,"permax":0}}}}}}},"206":{"$ref":"#/components/responses/206PartialContent"},"503":{"$ref":"#/components/responses/503InternalServerError"}}}},"/configuration/{host}":{"get":{"tags":["Configuration"],"summary":"Return a object from configuration.","description":"Endpoint for get object from configuration.\n---\nReturn the configuration of object give as parameter\n\"If the object is of non-global type and nameObject is not specified, all instances of that type of object will be displayed using a condensed output. Conversely, if a nameObject is specified, a detailed output of the specified instance will be shown.\"\n","parameters":[{"$ref":"#/components/parameters/hostName"},{"$ref":"#/components/parameters/typeObject"},{"$ref":"#/components/parameters/nameObject"}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"500":{"$ref":"#/components/responses/500InternalServerError"}}},"put":{"tags":["Configuration"],"summary":"Set a parameter of configured object","description":"Set a parameter of configured object\n---\nThis method allows modifying the value of a parameter. In SBCs, objects can be of two types:\n- Global: There is only one instance of them. They are considered to occupy position 0.\n- Non-global: The type of object we want to modify and the specific instance must be indicated by their position.\n","parameters":[{"$ref":"#/components/parameters/hostName"},{"$ref":"#/components/parameters/typeObject"},{"$ref":"#/components/parameters/parameter"},{"$ref":"#/components/parameters/value"},{"$ref":"#/components/parameters/numberOfInstance"},{"$ref":"#/components/parameters/nameObject"}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"500":{"$ref":"#/components/responses/500InternalServerError"}}}},"/status/{host}":{"get":{"tags":["Show"],"summary":"Return the health and state of SBC","description":"Endpoint for get health and state of SBC\n---\nReturn the health and state of SBC\n","parameters":[{"$ref":"#/components/parameters/hostName"}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"500":{"$ref":"#/components/responses/500InternalServerError"}}}},"/uptime/{host}":{"get":{"tags":["Show"],"summary":"Return the uptime of SBC","description":"Endpoint for get uptime of SBC\n---\nReturn the uptime of SBC\n","parameters":[{"$ref":"#/components/parameters/hostName"}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"500":{"$ref":"#/components/responses/500InternalServerError"}}}},"/display_alarms/{host}":{"get":{"tags":["Display alarms"],"summary":"Return the display alarms of SBC","description":"Endpoint for the display alarms of SBC\n---\nReturn the display alarms of SBC\n","parameters":[{"$ref":"#/components/parameters/hostName"}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"500":{"$ref":"#/components/responses/500InternalServerError"}}}},"/reboot/{host}":{"put":{"tags":["Reboot"],"summary":"Execute the reboot in a SBC","description":"Endpoint for execute a reboot in a SBC\n---\nExecute the reboot in a SBC\n","parameters":[{"$ref":"#/components/parameters/hostName"}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"500":{"$ref":"#/components/responses/500InternalServerError"}}}},"/switchover/{host}":{"put":{"tags":["Switchover"],"summary":"Execute a switchover in a SBC","description":"Endpoint for execute a switchover in a SBC\n---\nExecute the switchover in a SBC\n","parameters":[{"$ref":"#/components/parameters/hostName"}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"500":{"$ref":"#/components/responses/500InternalServerError"}}}},"/files/list/{host}":{"get":{"tags":["Files"],"summary":"List files in a directory","description":"Endpoint for List files in a directory\n---  \n<p>Special options:  \n  <ul>\n    <li>path = / Show the root folder</li>\n    <li>path = * Show Top-level directories</li>\n  </ul>  \n</p>\n","parameters":[{"$ref":"#/components/parameters/hostName"},{"$ref":"#/components/parameters/pathFile"}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"500":{"$ref":"#/components/responses/500InternalServerError"}}}},"/files/{host}":{"get":{"tags":["Files"],"summary":"Download file via sftp","description":"Endpoint for download file\n---\nDownload\n","parameters":[{"$ref":"#/components/parameters/hostName"},{"$ref":"#/components/parameters/pathFile"},{"$ref":"#/components/parameters/nameFile"}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"500":{"$ref":"#/components/responses/500InternalServerError"}}},"post":{"tags":["Files"],"summary":"Upload file via sftp","description":"Endpoint for upload file\n---\nUpload\n","parameters":[{"$ref":"#/components/parameters/hostName"},{"$ref":"#/components/parameters/pathFile"},{"$ref":"#/components/parameters/nameFile"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"500":{"$ref":"#/components/responses/500InternalServerError"}}},"delete":{"tags":["Files"],"summary":"Delete file","description":"Endpoint for delete file\n---\nDelete\n","parameters":[{"$ref":"#/components/parameters/hostName"},{"$ref":"#/components/parameters/pathFile"},{"$ref":"#/components/parameters/nameFile"}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"500":{"$ref":"#/components/responses/500InternalServerError"}}}},"/files/lrt/{host}":{"put":{"tags":["LRT"],"summary":"Modify LRT file","description":"Endpoint for modify LRT on-fligh in SBC\n---\n<p>Endpoint for directly modifying LRT files in the Session Router.</br>\nTo do this, a .csv file must be passed where each line represents an action along with the necessary values.</br>\nThe possible actions are: modify, delete, and add.</br>\nBelow is an example of such a file:</p>\n\n\n  <h2>CSV File example</h2>\n\n| numEntry | action | user_type | user          | next_type | next                                      |\n|----------|--------|-----------|---------------|-----------|-------------------------------------------|\n| 1        | modify | E164      | 441924683328  | regex     | \"!(^.*)$!sip:\\1;key=tg1010@ASCluster!\"    |\n| 2        | modify | E164      | 442034510388  | regex     | \"!(^.*)$!sip:\\1;key=tg1010@ASCluster!\"    |\n| 3        | delete | E164      | 442034510389  | regex     | \"!(^.*)$!sip:\\1;key=tg1010@ASCluster!\"    |\n| 4        | delete | E164      | 442034510390  | regex     | \"!(^.*)$!sip:\\1;key=tg1010@ASCluster!\"    |\n| 5        | add    | E164      | 442034510499  | regex     | \"!sip:\\1;key=tg1020@ASCluster!\"           |\n| 6        | add    | E164      | 442034510599  | regex     | \"!sip:\\1;key=tg1030@ASCluster!\"           |\n","parameters":[{"$ref":"#/components/parameters/hostName"},{"$ref":"#/components/parameters/nameFile"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"500":{"$ref":"#/components/responses/500InternalServerError"}}}},"/files/lrt/reflesh/{host}":{"put":{"tags":["LRT"],"summary":"Reflesh a LRT","description":"Endpoint for reflesh LRT in SBC(Only SR)\n---\nReflesh\n","parameters":[{"$ref":"#/components/parameters/hostName"},{"$ref":"#/components/parameters/local_route_config"}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"500":{"$ref":"#/components/responses/500InternalServerError"}}}},"/files/lrt/entry/{host}":{"get":{"tags":["LRT"],"summary":"Get entry from LRT","description":"Endpoint for get a entry from LRT. Perform a search for the exact DDI that appears in any \ntable whose name contains or is exact to the value passed in the local_route_config parameter.\n---\nReflesh\n","parameters":[{"$ref":"#/components/parameters/hostName"},{"$ref":"#/components/parameters/local_route_config"},{"$ref":"#/components/parameters/DDI"},{"in":"query","name":"searchmode","required":true,"description":"Choose the type of match for loca_route_config","schema":{"type":"string","enum":["Contains","Equal To"]}}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"500":{"$ref":"#/components/responses/500InternalServerError"}}}},"/files/lrt/provisioningLrtService/":{"post":{"tags":["LRT"],"summary":"Provisioning LRT","description":"Endpoint for provisioning LRT in SBC(Only SR)\n---\nprovisioning LRT\n\ndescription: |\n  Example of endpoint usage.\n\n  **Important notes:**\n  - `table`:  \n    - `\"0\"` â†’ Updates tables **B, R and S**.  \n    - `\"B\"` â†’ Updates only the B table or the table letter that is specified.            \n  - `servicio`:  \n    - `\"ent\"` â†’ Enterprise type service.  \n    - `\"dr\"` â†’ DirectRouting type service.  \n    - `\"pi\"` â†’ PureInbound type service.  \n    - `\"po\"` â†’ PureOutbound type service.  \n    - `\"std\"` â†’ StandAlone type service.  \n  - `action`:  \n    - `\"FAST-TRACK\"` â†’ Numbering creation.  \n    - `\"FT-DISCONNECT\"` â†’ Numbering removal.          \n\n  **Example of input JSON:**\n  ```json\n  {\n    \"srServer\": \"as1\",\n    \"srServer1\": \"vsr1-1\",\n    \"enterprise_domain\": \"tgsoffice.com\",            \n    \"param_asbc_group_name\": \"ASBCAlcalaLondon\",                        \n    \"table\": \"0\",\n    \"tgrp_pbx\": \"tgrp-bra-sao-0001;trunk-context=pi.jnj.com\",\n    \"servicio\": \"ent\",\n    \"tgrp\": \"ar-trunk2;trunk-context=iplan.com\",\n    \"action\": \"FT-DISCONNECT\",\n    \"tg_identity\": \"tg2010\",\n    \"unscreened\": \"true\",            \n    \"arrayOKinAS\": [\n      {\n        \"routingNumberFixed\": \"+3491365666\",\n        \"dnisFixed\": \"+3491365666\",\n        \"customerAccessNumber\": \"+3491365666\",\n        \"dnisMobile\": \"\",\n        \"dnisPayphone\": \"\",\n        \"tgrp\": \"ar-trunk2;trunk-context=iplan.com\",\n        \"extension\": \"\",\n        \"outputProvider\": \"\"\n      }\n    ]\n  }\n","parameters":[{"in":"query","name":"lrtJSON","required":true,"description":"Parameters for provisioning lrt in one SR.","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/200SuccessResponse"},"400":{"$ref":"#/components/responses/400BadRequest"},"404":{"$ref":"#/components/responses/404NotFound"},"405":{"$ref":"#/components/responses/405NotAllowed"},"500":{"$ref":"#/components/responses/500InternalServerError"}}}}},"components":{"responses":{"200SuccessResponse":{"description":"Successful response"},"201Created":{"description":"Created"},"206PartialContent":{"description":"Partial Content"},"400BadRequest":{"description":"Bad Request"},"404NotFound":{"description":"Not Found"},"401Unauthorized":{"description":"Access not authorized"},"405NotAllowed":{"description":"The method is not allowed for this resource"},"500InternalServerError":{"description":"Internal server error"},"503InternalServerError":{"description":"Internal server error"}},"parameters":{"hostName":{"name":"host","description":"It is the SBC where the operation will be done  \n* Examples in live network: vsdmiatc3, vsdmiatc4, vsmiabr3, vbgmadde3,....\n* Examples in lab network: vsbc1-1, vsd1-1, vsr1-1....\n","in":"path","required":true,"schema":{"type":"string"}},"typeObject":{"name":"typeObject","description":"It is the type of object which will be used","in":"query","required":true,"schema":{},"example":"session-agent"},"nameObject":{"name":"nameObject","description":"It is the instance of object which will be used","in":"query","required":false,"schema":{},"example":"watson2"},"parameter":{"name":"parameter","description":"It is de parameter which we want to modified","in":"query","required":true,"schema":{},"example":"Status"},"value":{"name":"value","description":"It is the new value for parameter","in":"query","required":true,"schema":{},"example":"enabled"},"numberOfInstance":{"name":"numberOfInstance","description":"It is the position of instance to be modified","in":"query","required":false,"schema":{},"example":"4"},"user":{"name":"username","description":"username","in":"query","required":true,"schema":{},"example":"user123"},"DDI":{"name":"DDI","description":"direct dial-in, is exact match","in":"query","required":true,"schema":{},"example":"34917691209"},"password":{"name":"password","description":"password","in":"query","required":true,"schema":{},"example":"password123"},"pathFile":{"name":"pathFile","description":"Path of file(start and end with /)","in":"query","required":true,"schema":{},"example":"/code/lrt/"},"nameFile":{"name":"nameFile","description":"Name of file","in":"query","required":true,"schema":{},"example":"S.zoomaeat.com.xml.gz"},"local_route_config":{"name":"local_route_config","description":"local route config.","in":"query","required":true,"schema":{},"example":"S.opc.custom2.com"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"bearerAuth":[]}]}