sip_proxy: SIP protocol support in envoy (#18039)

Signed-off-by: Mingling <mingling.ding01@gmail.com>

Mirrored from https://github.com/envoyproxy/envoy @ dc1130d3de278b1e1da59899a6b802b7a0fa7b58
pull/624/head
data-plane-api(Azure Pipelines) 3 years ago
parent 8f26371ee6
commit 681e0fdb5d
  1. 2
      BUILD
  2. 9
      contrib/envoy/extensions/filters/network/sip_proxy/router/v3alpha/BUILD
  3. 16
      contrib/envoy/extensions/filters/network/sip_proxy/router/v3alpha/router.proto
  4. 9
      contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/BUILD
  5. 49
      contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/route.proto
  6. 108
      contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/sip_proxy.proto
  7. 2
      versioning/BUILD

@ -64,6 +64,8 @@ proto_library(
"//contrib/envoy/extensions/filters/network/mysql_proxy/v3:pkg", "//contrib/envoy/extensions/filters/network/mysql_proxy/v3:pkg",
"//contrib/envoy/extensions/filters/network/postgres_proxy/v3alpha:pkg", "//contrib/envoy/extensions/filters/network/postgres_proxy/v3alpha:pkg",
"//contrib/envoy/extensions/filters/network/rocketmq_proxy/v3:pkg", "//contrib/envoy/extensions/filters/network/rocketmq_proxy/v3:pkg",
"//contrib/envoy/extensions/filters/network/sip_proxy/router/v3alpha:pkg",
"//contrib/envoy/extensions/filters/network/sip_proxy/v3alpha:pkg",
"//contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha:pkg", "//contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha:pkg",
"//envoy/admin/v3:pkg", "//envoy/admin/v3:pkg",
"//envoy/config/accesslog/v3:pkg", "//envoy/config/accesslog/v3:pkg",

@ -0,0 +1,9 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"],
)

@ -0,0 +1,16 @@
syntax = "proto3";
package envoy.extensions.filters.network.sip_proxy.router.v3alpha;
import "udpa/annotations/status.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.network.sip_proxy.router.v3alpha";
option java_outer_classname = "RouterProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Router]
// [#extension: envoy.filters.sip.router]
message Router {
}

@ -0,0 +1,9 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"],
)

@ -0,0 +1,49 @@
syntax = "proto3";
package envoy.extensions.filters.network.sip_proxy.v3alpha;
import "udpa/annotations/status.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.network.sip_proxy.v3alpha";
option java_outer_classname = "RouteProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Sip Proxy Route Configuration]
message RouteConfiguration {
// The name of the route configuration. Reserved for future use in asynchronous route discovery.
string name = 1;
// The list of routes that will be matched, in order, against incoming requests. The first route
// that matches will be used.
repeated Route routes = 2;
}
message Route {
// Route matching parameters.
RouteMatch match = 1 [(validate.rules).message = {required: true}];
// Route request to some upstream cluster.
RouteAction route = 2 [(validate.rules).message = {required: true}];
}
message RouteMatch {
oneof match_specifier {
option (validate.required) = true;
// The domain from Request URI or Route Header.
string domain = 1;
}
}
message RouteAction {
oneof cluster_specifier {
option (validate.required) = true;
// Indicates a single upstream cluster to which the request should be routed
// to.
string cluster = 1 [(validate.rules).string = {min_len: 1}];
}
}

@ -0,0 +1,108 @@
syntax = "proto3";
package envoy.extensions.filters.network.sip_proxy.v3alpha;
import "contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/route.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "udpa/annotations/status.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.network.sip_proxy.v3alpha";
option java_outer_classname = "SipProxyProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Sip Proxy]
// [#extension: envoy.filters.network.sip_proxy]
message SipProxy {
message SipSettings {
// transaction timeout timer [Timer B] unit is milliseconds, default value 64*T1.
//
// Session Initiation Protocol (SIP) timer summary
//
// +---------+-------------------------+----------+------------------------------------------------------------------------------+
// | Timer | Default value | Section | Meaning |
// +=========+=========================+==========+==============================================================================+
// | T1 | 500 ms | 17.1.1.1 | Round-trip time (RTT) estimate |
// +---------+-------------------------+----------+------------------------------------------------------------------------------+
// | T2 | 4 sec | 17.1.2.2 | Maximum re-transmission interval for non-INVITE requests and INVITE responses|
// +---------+-------------------------+----------+------------------------------------------------------------------------------+
// | T4 | 5 sec | 17.1.2.2 | Maximum duration that a message can remain in the network |
// +---------+-------------------------+----------+------------------------------------------------------------------------------+
// | Timer A | initially T1 | 17.1.1.2 | INVITE request re-transmission interval, for UDP only |
// +---------+-------------------------+----------+------------------------------------------------------------------------------+
// | Timer B | 64*T1 | 17.1.1.2 | INVITE transaction timeout timer |
// +---------+-------------------------+----------+------------------------------------------------------------------------------+
// | Timer D | > 32 sec. for UDP | 17.1.1.2 | Wait time for response re-transmissions |
// | | 0 sec. for TCP and SCTP | | |
// +---------+-------------------------+----------+------------------------------------------------------------------------------+
// | Timer E | initially T1 | 17.1.2.2 | Non-INVITE request re-transmission interval, UDP only |
// +---------+-------------------------+----------+------------------------------------------------------------------------------+
// | Timer F | 64*T1 | 17.1.2.2 | Non-INVITE transaction timeout timer |
// +---------+-------------------------+----------+------------------------------------------------------------------------------+
// | Timer G | initially T1 | 17.2.1 | INVITE response re-transmission interval |
// +---------+-------------------------+----------+------------------------------------------------------------------------------+
// | Timer H | 64*T1 | 17.2.1 | Wait time for ACK receipt |
// +---------+-------------------------+----------+------------------------------------------------------------------------------+
// | Timer I | T4 for UDP | 17.2.1 | Wait time for ACK re-transmissions |
// | | 0 sec. for TCP and SCTP | | |
// +---------+-------------------------+----------+------------------------------------------------------------------------------+
// | Timer J | 64*T1 for UDP | 17.2.2 | Wait time for re-transmissions of non-INVITE requests |
// | | 0 sec. for TCP and SCTP | | |
// +---------+-------------------------+----------+------------------------------------------------------------------------------+
// | Timer K | T4 for UDP | 17.1.2.2 | Wait time for response re-transmissions |
// | | 0 sec. for TCP and SCTP | | |
// +---------+-------------------------+----------+------------------------------------------------------------------------------+
google.protobuf.Duration transaction_timeout = 1;
// own domain name
string own_domain = 2;
// points to domain match with own_domain
string domain_match_parameter_name = 3;
}
// The human readable prefix to use when emitting statistics.
string stat_prefix = 1 [(validate.rules).string = {min_len: 1}];
// The route table for the connection manager is static and is specified in this property.
RouteConfiguration route_config = 2;
// A list of individual Sip filters that make up the filter chain for requests made to the
// Sip proxy. Order matters as the filters are processed sequentially. For backwards
// compatibility, if no sip_filters are specified, a default Sip router filter
// (`envoy.filters.sip.router`) is used.
// [#extension-category: envoy.sip_proxy.filters]
repeated SipFilter sip_filters = 3;
SipSettings settings = 4;
}
// SipFilter configures a Sip filter.
message SipFilter {
// The name of the filter to instantiate. The name must match a supported
// filter. The built-in filters are:
//
string name = 1 [(validate.rules).string = {min_len: 1}];
// Filter specific configuration which depends on the filter being instantiated. See the supported
// filters for further documentation.
oneof config_type {
google.protobuf.Any typed_config = 3;
}
}
// SipProtocolOptions specifies Sip upstream protocol options. This object is used in
// :ref:`typed_extension_protocol_options<envoy_v3_api_field_config.cluster.v3.Cluster.typed_extension_protocol_options>`,
// keyed by the name `envoy.filters.network.sip_proxy`.
message SipProtocolOptions {
// All sip messages in one dialog should go to the same endpoint.
bool session_affinity = 1;
// The Register with Authorization header should go to the same endpoint which send out the 401 Unauthorized.
bool registration_affinity = 2;
}

@ -16,6 +16,8 @@ proto_library(
"//contrib/envoy/extensions/filters/network/mysql_proxy/v3:pkg", "//contrib/envoy/extensions/filters/network/mysql_proxy/v3:pkg",
"//contrib/envoy/extensions/filters/network/postgres_proxy/v3alpha:pkg", "//contrib/envoy/extensions/filters/network/postgres_proxy/v3alpha:pkg",
"//contrib/envoy/extensions/filters/network/rocketmq_proxy/v3:pkg", "//contrib/envoy/extensions/filters/network/rocketmq_proxy/v3:pkg",
"//contrib/envoy/extensions/filters/network/sip_proxy/router/v3alpha:pkg",
"//contrib/envoy/extensions/filters/network/sip_proxy/v3alpha:pkg",
"//contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha:pkg", "//contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha:pkg",
"//envoy/admin/v3:pkg", "//envoy/admin/v3:pkg",
"//envoy/config/accesslog/v3:pkg", "//envoy/config/accesslog/v3:pkg",

Loading…
Cancel
Save