A network service is a protocol and transport the switch accepts traffic on, such as SIP over UDP or HTTPS, with its list of listeners. These methods do the same as the Network Services screen under System Parameters .
The methods support trusted mode with i_customer set to 1.
A listener is one address the service listens on.
Name
Type
Description
ip_address
string
IP address of the switch, for example 192.0.2.10
port
int
Port, for example 5060
i_proto_transport identifies the service. The values the panel manages are below; the full list is the proto_transports dictionary .
i_proto_transport
Service
1
SIP over UDP
4
SIP over TCP
5
SIP over TLS
7
HTTPS
Replaces the listeners of a network service.
Name
Type
Required
Description
i_proto_transport
int
yes
The service to change
listeners
array
yes
The new listeners in order, each a listener structure . The list replaces the current one
Name
Type
Description
result
string
OK
i_proto_transport
int
The service changed
call ( " updateNetworkService " , {
{ " ip_address " : " 192.0.2.10 " , " port " : 5060 },
{ " ip_address " : " 198.51.100.10 " , " port " : 5060 },
{ " result " : " OK " , " i_proto_transport " : 1 }
Returns one network service.
Name
Type
Required
Description
i_proto_transport
int
yes
The service to read
Name
Type
Description
result
string
OK
i_proto_transport
int
The service
listeners
array
Its listeners in order, each a listener structure
call ( " getNetworkServiceInfo " , { " i_proto_transport " : 7 } )
" listeners " : [ { " ip_address " : " 192.0.2.10 " , " port " : 443 } ] ,
Returns all network services.
Name
Type
Required
Description
limit
int
no
Maximum number of services to return
offset
int
no
Number of services to skip
Name
Type
Description
result
string
OK
network_services
array
One struct per service, as getNetworkServiceInfo returns it
call ( " getNetworkServicesList " , {} )
{ " i_proto_transport " : 1 , " listeners " : [ { " ip_address " : " 192.0.2.10 " , " port " : 5060 } ] },
{ " i_proto_transport " : 7 , " listeners " : [ { " ip_address " : " 192.0.2.10 " , " port " : 443 } ] },
# … one struct per service