sipproxy: enhance routing handler and async framework (#19951)

* Enhance the routing handler with specified SIP Header;
* Update the async query framework;
* Update local_services configuration;
* Add 503 Error Response.

Signed-off-by: Felix Du <durd07@gmail.com>

Mirrored from https://github.com/envoyproxy/envoy @ 40649c4200f1938011b181be64173dcb10ffaea7
pull/626/head
data-plane-api(Azure Pipelines) 3 years ago
parent 9dce4f4255
commit 952afc3984
  1. 2
      contrib/envoy/extensions/filters/network/sip_proxy/tra/v3alpha/tra.proto
  2. 6
      contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/route.proto
  3. 49
      contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/sip_proxy.proto

@ -18,7 +18,7 @@ option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/fil
option java_generic_services = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: TrafficRoutingAssistant]
// [#protodoc-title: Tra]
service TraService {
rpc Create(TraServiceRequest) returns (TraServiceResponse) {

@ -37,6 +37,12 @@ message RouteMatch {
// The domain from Request URI or Route Header.
string domain = 1;
}
// The header to get match parameter, default is "Route".
string header = 2;
// The parameter to get domain, default is "host".
string parameter = 3;
}
message RouteAction {

@ -61,13 +61,15 @@ message SipProxy {
// +---------+-------------------------+----------+------------------------------------------------------------------------------+
google.protobuf.Duration transaction_timeout = 1;
// own domain name
string own_domain = 2;
// The service to match for ep insert
repeated LocalService local_services = 2;
// points to domain match with own_domain
string domain_match_parameter_name = 3;
tra.v3alpha.TraServiceConfig tra_service_config = 3;
tra.v3alpha.TraServiceConfig tra_service_config = 4;
// Whether via header is operated, including add via for request and pop via for response
// False: sip service proxy
// True: sip load balancer
bool operate_via = 4;
}
// The human readable prefix to use when emitting statistics.
@ -111,14 +113,45 @@ message SipProtocolOptions {
bool registration_affinity = 2;
// Customized affinity
repeated CustomizedAffinity customized_affinity = 3;
CustomizedAffinity customized_affinity = 3;
}
// For affinity
message CustomizedAffinity {
// Affinity rules to conclude the upstream endpoint
repeated CustomizedAffinityEntry entries = 1;
// Configures whether load balance should be stopped or continued after affinity handling.
bool stop_load_balance = 2;
}
message CustomizedAffinityEntry {
// Affinity key for TRA query/subscribe
string key_name = 1;
bool query = 2;
// Whether subscribe to TRA is required
bool subscribe = 2;
// Whether query to TRA is required
bool query = 3;
// Local cache
Cache cache = 4;
}
message Cache {
// Affinity local cache item max number
int32 max_cache_item = 1;
// Whether query result can be added to local cache
bool add_query_to_cache = 2;
}
// Local Service
message LocalService {
//The domain need to matched
string domain = 1;
bool subscribe = 3;
//The parameter to get domain
string parameter = 2;
}

Loading…
Cancel
Save