ProSBC:Restful API NAP: Difference between revisions
No edit summary |
mNo edit summary |
||
| (3 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE: Create | {{DISPLAYTITLE: Create or Modify a NAP with RestFul API}} | ||
You can create | You can create or modify a NAP in your system with RestFul API using JSON in the following format: | ||
<pre> | <pre> | ||
{ | { | ||
| Line 108: | Line 108: | ||
</pre> | </pre> | ||
Important parameters in the JSON file | |||
* name | * [[Parameter: Name|name]] | ||
* proxy_address | * [[Parameter: Proxy Address|proxy_address]] | ||
* proxy_port | * [[Parameter: Proxy Port|proxy_port]] | ||
* [[Parameter: Poll Remote Proxy|poll_remote_proxy]] | |||
* [[Parameter: Register to Proxy|registration_parameters]] | |||
* sip_transport_servers = transport server to use in ProSBC to communicate with the destination | * sip_transport_servers = transport server to use in ProSBC to communicate with the destination | ||
* port_ranges = RTP port ranges used for this NAP | * port_ranges = RTP port ranges used for this NAP | ||
* authentication_parameters = If you want to authenticate this NAP to the far end you need to fill up the parameters under authentication | * authentication_parameters = If you want to authenticate this NAP to the far end you need to fill up the parameters under authentication | ||
==Adding a new NAP== | ==Adding a new NAP== | ||
| Line 130: | Line 128: | ||
ProSBC will create a new NAP from the name in the JSON file. | ProSBC will create a new NAP from the name in the JSON file. | ||
Example: We use the Postman tool | Example: We use the Postman tool and the URL is: | ||
http://192.168.1.25:12358/configurations/config_2/naps/ | http://192.168.1.25:12358/configurations/config_2/naps/ | ||
| Line 136: | Line 134: | ||
[[Image:RestFul_NAP_Post_Send.png|800px| ]] | [[Image:RestFul_NAP_Post_Send.png|800px| ]] | ||
If the new NAP is created successfully, | If the new NAP is created successfully, the following message is returned. | ||
[[Image:RestFul_NAP_Post_Response.png|800px| ]] | [[Image:RestFul_NAP_Post_Response.png|800px| ]] | ||
| Line 148: | Line 146: | ||
Example: We use the Postman tool in this example and the URL is | Example: We use the Postman tool in this example and the URL is | ||
192.168.1.25:12358/configurations/config_2/naps/TEST_NAP and changed the proxy_address from 192.168.1.99 to 192.168.1.100 | http://192.168.1.25:12358/configurations/config_2/naps/TEST_NAP and changed the proxy_address from 192.168.1.99 to 192.168.1.100 | ||
[[Image:NAP_Put_Send.png|800px| ]] | [[Image:NAP_Put_Send.png|800px| ]] | ||
If the update is successful | If the update is successful, the following message is returned. | ||
[[Image:NAP_Put_Response.png|800px| ]] | [[Image:NAP_Put_Response.png|800px| ]] | ||
Learn more about how to use RestFul API and Postman Tool from the following link [[Northbound_interface:RESTful]] | |||
Latest revision as of 14:22, 7 March 2023
You can create or modify a NAP in your system with RestFul API using JSON in the following format:
{
"sip_cfg": {
"registration_parameters": {
"register_to_proxy": false,
"address_to_register": "",
"***meta***": {
"valid_url": false
}
},
"filtering_parameters": {
"filter_by_local_port": true,
"filter_by_proxy_address": true,
"filter_by_proxy_port": true,
"***meta***": {
"valid_url": false
}
},
"accept_only_authorized_users": false,
"proxy_polling_interval": "1 minute",
"proxy_address": "192.168.1.55",
"sipi_parameters": {
"append_f_to_outgoing_calls": false,
"call_progress_method": "183 Call Progress",
"content_type": "itu-t",
"isup_protocol_variant": "ITU",
"enable": false,
"***meta***": {
"valid_url": false
}
},
"nap_sip_acls": [],
"proxy_port_type": "UDP",
"authentication_parameters": {
"password": "",
"ignore_realm": false,
"reuse_challenge": false,
"user": "",
"realm": "",
"***meta***": {
"valid_url": false
}
},
"advanced_parameters": {
"map_any_response_to_available_status": true,
"response_timeout": "12 seconds",
"privacy_type": "P-Asserted-Identity",
"proxy_polling_max_forwards": 1,
"183_triggers_call_progress": false,
"***meta***": {
"valid_url": false
}
},
"network_address_translation": {
"local_method_sip": "",
"remote_method_sip": "None",
"remote_method_rtp": "None",
"local_method_rtp": "",
"***meta***": {
"valid_url": false
}
},
"proxy_port": 5060,
"***meta***": {
"valid_url": false
},
"poll_remote_proxy": true,
"sip_use_proxy": true
},
"enabled": true,
"port_ranges": [
"Host.pr_voip0"
],
"name": "MyPBX",
"congestion_threshold": {
"nb_calls_per_period": 1,
"period_duration": "1 minute",
"***meta***": {
"valid_url": false
}
},
"sip_transport_servers": [
"voip0_ts_5060"
],
"default_profile": "default",
"call_rate_limiting": {
"processing_delay_low_threshold": "3 seconds",
"maximum_call_burst": 0,
"processing_delay_high_threshold": "6 seconds",
"maximum_calls_per_second": 0,
"maximum_outgoing_calls_per_second": 0,
"maximum_simultaneous_outgoing_calls": 0,
"maximum_incoming_calls_per_second": 0,
"maximum_simultaneous_total_calls": 0,
"maximum_simultaneous_incoming_calls": 0,
"***meta***": {
"valid_url": false
}
},
"***meta***": {
"version": "3.1.137",
"src_path": ""
}
}
Important parameters in the JSON file
- name
- proxy_address
- proxy_port
- poll_remote_proxy
- registration_parameters
- sip_transport_servers = transport server to use in ProSBC to communicate with the destination
- port_ranges = RTP port ranges used for this NAP
- authentication_parameters = If you want to authenticate this NAP to the far end you need to fill up the parameters under authentication
Adding a new NAP
You can add a new NAP with the POST command:
POST http://ProSBCIP:12358/configurations/configuration name/naps/
ProSBC will create a new NAP from the name in the JSON file.
Example: We use the Postman tool and the URL is:
http://192.168.1.25:12358/configurations/config_2/naps/
If the new NAP is created successfully, the following message is returned.
Modifiying a NAP
You can modify the existing NAP with the PUT command:
PUT http://ProSBCIP:12358/configurations/Configurationname/naps/NapName
Example: We use the Postman tool in this example and the URL is
http://192.168.1.25:12358/configurations/config_2/naps/TEST_NAP and changed the proxy_address from 192.168.1.99 to 192.168.1.100
If the update is successful, the following message is returned.
Learn more about how to use RestFul API and Postman Tool from the following link Northbound_interface:RESTful