OpenVox Document Center OpenVox Document Center
  • Home 
  • Products 
  • Solutions 
  • Resources 
    • Document Center 
    • Datasheets 
    • Firmwares 
    • Videos 
  • Partners 
  • Blog 
  • Company 
OpenVox Document Center OpenVox Document Center
OpenVox Document Center
  • Home 
  • Products 
  • Solutions 
  • Resources 
    • Document Center 
    • Datasheets 
    • Firmwares 
    • Videos 
  • Partners 
  • Blog 
  • Company 

Analog Gateway (OIAD)

  • folder icon closed folder iconUser Manual
    • MAG1000 Analog Gateway User Manual
    • iAG801 Analog Gateway User Manual
    • iAG800 Analog Gateway User Manual
    • iAG200/400 Analog Gateway User Manual
    • iAG802 Analog Gateway User Manual
    • MAG1100 Analog Gateway User Manual
    • MAG2000 Analog Gateway User Manual
  • folder icon closed folder iconApplication Notes
    • New version of analog gateway OIAD connected to UC200
    • IAG200/IAG400 OIAD Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connected to UC500
    • iAG800 V2 OIAD Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connected to 3CX
    • MAG1000 OIAD Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connect to Yeastar
    • MAG1100 Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connect to FreePBX
    • How to connect OIAD Gateway to IMS network(Network mode is bridge)
    • How to connect OIAD Gateway to IMS network(Network mode is route)
  • folder icon closed folder iconFAQ
    • Analog Gateway FAQ
  • folder icon closed folder iconFunctions Guide
    • How to Configure Self-Exchange
    • How to configure OpenVPN
  • folder icon closed folder iconAPI Document
    • 1 Public
    • 2. Authentication management category
    • 3 Network Function Class
    • 4 System Function Classes
    • 5 IAD analogue class
    • 6 IAD digital class
    • 7 IAD General Classes
    • How to use API
    • The API logic between CPU board and Gateway Board on UCP
  • folder icon closed folder iconAuto Provision Guide
    • Auto Provision VOIP Parameters
    • Auto Provision Network Parameters
    • Auto Provision System Parameters
    • Auto Provision for OIAD
loading
Popular Searches
  • Array
  • Array
  • Array
  1. Home
  2. Docs
  3. Analog Gateway (OIAD)
  4. API Document
  5. How to use API
Updated on November 7, 2024

Analog Gateway (OIAD)

  • folder icon closed folder iconUser Manual
    • MAG1000 Analog Gateway User Manual
    • iAG801 Analog Gateway User Manual
    • iAG800 Analog Gateway User Manual
    • iAG200/400 Analog Gateway User Manual
    • iAG802 Analog Gateway User Manual
    • MAG1100 Analog Gateway User Manual
    • MAG2000 Analog Gateway User Manual
  • folder icon closed folder iconApplication Notes
    • New version of analog gateway OIAD connected to UC200
    • IAG200/IAG400 OIAD Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connected to UC500
    • iAG800 V2 OIAD Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connected to 3CX
    • MAG1000 OIAD Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connect to Yeastar
    • MAG1100 Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connect to FreePBX
    • How to connect OIAD Gateway to IMS network(Network mode is bridge)
    • How to connect OIAD Gateway to IMS network(Network mode is route)
  • folder icon closed folder iconFAQ
    • Analog Gateway FAQ
  • folder icon closed folder iconFunctions Guide
    • How to Configure Self-Exchange
    • How to configure OpenVPN
  • folder icon closed folder iconAPI Document
    • 1 Public
    • 2. Authentication management category
    • 3 Network Function Class
    • 4 System Function Classes
    • 5 IAD analogue class
    • 6 IAD digital class
    • 7 IAD General Classes
    • How to use API
    • The API logic between CPU board and Gateway Board on UCP
  • folder icon closed folder iconAuto Provision Guide
    • Auto Provision VOIP Parameters
    • Auto Provision Network Parameters
    • Auto Provision System Parameters
    • Auto Provision for OIAD

How to use API

Estimated reading: 3 minutes 190 views

API Examples

1.Environmental preparation

API tool: Postman

API tool access: https://dl.pstmn.io/download/latest/win64

Password conversion tool: https://www.miraclesalad.com/webtools/md5.php

2. Foreword

Most of the API functions of OIAD need a token, so you need to use the login request to get the token, which is valid for 600 seconds, and you can set the validity time on the page.

Figure 2-1 Expiry Date Setting Screen

word image 65

Select POST, enter http://Device IP/controller/API function, enter {“username”: “username”, “password”: “converted password”} in the Body field, and finally click Send.

Figure 2-2 Get token interface

word image 66

If the fetched token is about to time out, but there is no other API you need to use, but you don’t want to re-fetch the token, you can manually refresh the token’s expiration time. In the POST column, enter http://Device IP/controller/API function, in the Body column, enter {“token”: “95c2302f649e366813420cd6567d88b3”}, and finally click Send, the response is as shown in the figure that refreshes successfully.

Figure 2-3 Refresh Time Screen

word image 67

3.Example of a login request /auth/login

Select POST, enter http://Device IP/controller/API function, enter {“username”: “username”, “password”: “converted password”} in the Body field, and finally click Send, you can see whether it was sent successfully or not through the response box at the bottom. The successful response should be

{

"uri": "auth/login",

"msg": "",

"code": 200.

"data": {

"level": "admin",

"token": "582f5126c311231224922ee980311834"

}

}

 

Figure 1-1 Example of a Login Request

word image 68

4.Example of VOIP settings /analog/voip_set

After login to get the token, then used for VOIP settings and other interfaces, the following is the example of VOIP settings

Select POST, enter http://Device IP/controller/API function, and in the Body field enter

{

"sip_anonymous": "no",

"in_ringtime": 65,

"out_ringtime": 65,

"user_agent": "OIAD".

"timer_t1": 500,

"timer_t2": 4000,

"allow_tx_hash_in_uri": "no",

"timers": "yes",

"timers_min_se": 100,

"timers_sess_expires": 2000,

"cadence": [

"250,250,500,1000,250,250,500,4000".

"250,250,500,1000,250,250,500,4000".

"250,250,500,1000,250,250,500,4000".

"250,250,500,1000,250,250,500,4000".

"250,250,500,1000,250,250,500,4000".

"250,250,500,1000,250,250,500,4000".

"250,250,500,1000,250,250,500,4000".

"250,250,500,1000,250,250,500,4000".

"250,250,500,1000,250,250,500,4000".

"250,250,500,1000,250,250,500,4000."

],

"sip_cid2": 1,

"calltimeout": 43200000.

"net_failover": "no",

"early_media": "yes",

"ring_cadence": 0,

"ring_alert_info": [

{

"Bellcore-dr3": "1"

},

{

"Bellcore-dr5": "4"

}

],

"ring_caller_id": [

{

"10": "1"

},

{

"102": "5"

},

{

"": "1"

},

{

"": "1"

},

{

"1": "1"

}

],

"g723_rate": "63".

"ilbc_mode": "30",

"token": "582f5126c311231224922ee980311834"

}

Finally, click Send and you can see if the send was successful with the response box at the bottom. The successful response should be

{

"uri": "analog/voip_set",

"msg": "",

"code": 200.

"data": []

}

 

Figure 4-1 Example of VOIP Settings

word image 69

Appendice

If there is no prompt in the API documentation for Client→Server Request, it is the default to fill in the token.

word image 70

Still stuck? How can we help?

Was this page helpful? Yes No

How can we help?

Leave a Comment Cancel reply

CONTENTS

Copyright © 2002-2024 OpenVox all rights reserved.