v1

package
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SipBreakoutService_UpsertRegistration_FullMethodName = "/wgtwo.sipbreakout.v1.SipBreakoutService/UpsertRegistration"
	SipBreakoutService_DeleteRegistration_FullMethodName = "/wgtwo.sipbreakout.v1.SipBreakoutService/DeleteRegistration"
)

Variables

View Source
var (
	StatusCode_name = map[int32]string{
		0: "STATUS_CODE_UNSPECIFIED",
		1: "STATUS_CODE_OK",
		2: "STATUS_CODE_NOT_ACCEPTABLE",
	}
	StatusCode_value = map[string]int32{
		"STATUS_CODE_UNSPECIFIED":    0,
		"STATUS_CODE_OK":             1,
		"STATUS_CODE_NOT_ACCEPTABLE": 2,
	}
)

Enum value maps for StatusCode.

View Source
var (
	RouteType_name = map[int32]string{
		0: "ROUTE_TYPE_UNSPECIFIED",
		1: "ROUTE_TYPE_LOOP",
		2: "ROUTE_TYPE_FORK",
		3: "ROUTE_TYPE_FALLBACK",
		4: "ROUTE_TYPE_LOOP_MO",
		5: "ROUTE_TYPE_LOOP_MT",
		6: "ROUTE_TYPE_INGRESS",
	}
	RouteType_value = map[string]int32{
		"ROUTE_TYPE_UNSPECIFIED": 0,
		"ROUTE_TYPE_LOOP":        1,
		"ROUTE_TYPE_FORK":        2,
		"ROUTE_TYPE_FALLBACK":    3,
		"ROUTE_TYPE_LOOP_MO":     4,
		"ROUTE_TYPE_LOOP_MT":     5,
		"ROUTE_TYPE_INGRESS":     6,
	}
)

Enum value maps for RouteType.

View Source
var File_wgtwo_sipbreakout_v1_sipbreakout_proto protoreflect.FileDescriptor
View Source
var SipBreakoutService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "wgtwo.sipbreakout.v1.SipBreakoutService",
	HandlerType: (*SipBreakoutServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UpsertRegistration",
			Handler:    _SipBreakoutService_UpsertRegistration_Handler,
		},
		{
			MethodName: "DeleteRegistration",
			Handler:    _SipBreakoutService_DeleteRegistration_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "wgtwo/sipbreakout/v1/sipbreakout.proto",
}

SipBreakoutService_ServiceDesc is the grpc.ServiceDesc for SipBreakoutService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterSipBreakoutServiceServer

func RegisterSipBreakoutServiceServer(s grpc.ServiceRegistrar, srv SipBreakoutServiceServer)

Types

type DeleteRegistrationRequest

type DeleteRegistrationRequest struct {

	// Registration to delete
	Registration *Registration `protobuf:"bytes,1,opt,name=registration,proto3" json:"registration,omitempty"`
	// contains filtered or unexported fields
}

The request message to delete a registration

func (*DeleteRegistrationRequest) Descriptor deprecated

func (*DeleteRegistrationRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteRegistrationRequest.ProtoReflect.Descriptor instead.

func (*DeleteRegistrationRequest) GetRegistration

func (x *DeleteRegistrationRequest) GetRegistration() *Registration

func (*DeleteRegistrationRequest) ProtoMessage

func (*DeleteRegistrationRequest) ProtoMessage()

func (*DeleteRegistrationRequest) ProtoReflect

func (*DeleteRegistrationRequest) Reset

func (x *DeleteRegistrationRequest) Reset()

func (*DeleteRegistrationRequest) String

func (x *DeleteRegistrationRequest) String() string

type DeleteRegistrationResponse

type DeleteRegistrationResponse struct {

	// The response status for attempting to updating the registration
	StatusCode StatusCode `` /* 129-byte string literal not displayed */
	// Human readable description for what failed or rejected the registration.
	ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

The response message when attempting to delete a registration

func (*DeleteRegistrationResponse) Descriptor deprecated

func (*DeleteRegistrationResponse) Descriptor() ([]byte, []int)

Deprecated: Use DeleteRegistrationResponse.ProtoReflect.Descriptor instead.

func (*DeleteRegistrationResponse) GetErrorMessage

func (x *DeleteRegistrationResponse) GetErrorMessage() string

func (*DeleteRegistrationResponse) GetStatusCode

func (x *DeleteRegistrationResponse) GetStatusCode() StatusCode

func (*DeleteRegistrationResponse) ProtoMessage

func (*DeleteRegistrationResponse) ProtoMessage()

func (*DeleteRegistrationResponse) ProtoReflect

func (*DeleteRegistrationResponse) Reset

func (x *DeleteRegistrationResponse) Reset()

func (*DeleteRegistrationResponse) String

func (x *DeleteRegistrationResponse) String() string

type Registration

type Registration struct {

	// If set to 00 then INVITE sip:+47112334455... becomes INVITE sip:+0047112334455
	// This field is optional
	MobileOriginatingPrefix string `` /* 132-byte string literal not displayed */
	// If set to 00 then INVITE sip:+47112334455... becomes INVITE sip:+0047112334455
	// This field is optional
	MobileTerminatingPrefix string `` /* 132-byte string literal not displayed */
	// `sips:example.com` or `sips:example.com:8888` <br>
	// If you want to use SRV DNS records, then use the domain name without port number
	SipUri string `protobuf:"bytes,3,opt,name=sip_uri,json=sipUri,proto3" json:"sip_uri,omitempty"`
	// The route type of the registration
	RouteType RouteType `protobuf:"varint,4,opt,name=route_type,json=routeType,proto3,enum=wgtwo.sipbreakout.v1.RouteType" json:"route_type,omitempty"`
	// Must be provided if using client access token
	PhoneNumber *v1.E164 `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	// contains filtered or unexported fields
}

The registration message to define a SIP registration

func (*Registration) Descriptor deprecated

func (*Registration) Descriptor() ([]byte, []int)

Deprecated: Use Registration.ProtoReflect.Descriptor instead.

func (*Registration) GetMobileOriginatingPrefix

func (x *Registration) GetMobileOriginatingPrefix() string

func (*Registration) GetMobileTerminatingPrefix

func (x *Registration) GetMobileTerminatingPrefix() string

func (*Registration) GetPhoneNumber

func (x *Registration) GetPhoneNumber() *v1.E164

func (*Registration) GetRouteType

func (x *Registration) GetRouteType() RouteType

func (*Registration) GetSipUri

func (x *Registration) GetSipUri() string

func (*Registration) ProtoMessage

func (*Registration) ProtoMessage()

func (*Registration) ProtoReflect

func (x *Registration) ProtoReflect() protoreflect.Message

func (*Registration) Reset

func (x *Registration) Reset()

func (*Registration) String

func (x *Registration) String() string

type RouteType

type RouteType int32
const (
	// Unspecified/default route type. Do not use.
	RouteType_ROUTE_TYPE_UNSPECIFIED RouteType = 0
	// See [SipBreakoutService](#sipbreakoutservice).
	RouteType_ROUTE_TYPE_LOOP RouteType = 1
	// See [SipBreakoutService](#sipbreakoutservice).
	RouteType_ROUTE_TYPE_FORK RouteType = 2
	// See [SipBreakoutService](#sipbreakoutservice).
	RouteType_ROUTE_TYPE_FALLBACK RouteType = 3
	// See [SipBreakoutService](#sipbreakoutservice).
	RouteType_ROUTE_TYPE_LOOP_MO RouteType = 4
	// See [SipBreakoutService](#sipbreakoutservice).
	RouteType_ROUTE_TYPE_LOOP_MT RouteType = 5
	// See [SipBreakoutService](#sipbreakoutservice).
	RouteType_ROUTE_TYPE_INGRESS RouteType = 6
)

func (RouteType) Descriptor

func (RouteType) Descriptor() protoreflect.EnumDescriptor

func (RouteType) Enum

func (x RouteType) Enum() *RouteType

func (RouteType) EnumDescriptor deprecated

func (RouteType) EnumDescriptor() ([]byte, []int)

Deprecated: Use RouteType.Descriptor instead.

func (RouteType) Number

func (x RouteType) Number() protoreflect.EnumNumber

func (RouteType) String

func (x RouteType) String() string

func (RouteType) Type

type SipBreakoutServiceClient

type SipBreakoutServiceClient interface {
	// Add or replace a registration
	UpsertRegistration(ctx context.Context, in *UpsertRegistrationRequest, opts ...grpc.CallOption) (*UpsertRegistrationResponse, error)
	// Delete an existing registration
	DeleteRegistration(ctx context.Context, in *DeleteRegistrationRequest, opts ...grpc.CallOption) (*DeleteRegistrationResponse, error)
}

SipBreakoutServiceClient is the client API for SipBreakoutService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

Virtual SIP Registration makes Mobility Services' core involve a third party Telephony Application Server (TAS) in to the call processing. The Mobility Services' core Session Boarder Controller (SBC) will forward SIP signalling to the TAS based on presence of the SIP Registration and its type. The type can be one of "loop", "fork", or "fallback".

┌───────┐                   |    ┌───────┐
│ Alice ├───1───────┐       |    │ Alice ├───1───────┐
└───────┘           │       |    └───────┘           │
                    │       |                        │
┌──────┐         ┌──▼───┐   |    ┌───────┐        ┌──▼───┐
│ Bob  ◄────4────┤ Core │   |    │ Bob   ◄───2────┤ Core │
└──────┘         └─▲───┬┘   |    └───────┘        └──┬───┘
                   3   2    |                        3
                   │   │    |                        │
                  ┌┴───▼┐   |                     ┌──▼──┐
                  │ TAS │   |                     │ TAS │
                  └─────┘   |                     └─────┘
                            |
        Loop                VS       Fork / Fallback

For `ROUTE_TYPE_LOOP` leg 4 is not created until call comes back as leg 3. In this case, TAS is not obliged to create leg 3, and can itself answer or reject leg 2.

For `ROUTE_TYPE_FORK` registration makes legs 2 and 3 to happen simultaneously.

For `ROUTE_TYPE_FALLBACK` case leg 3 will only be created if leg 2 is not answered.

For better control of the Loop logic, 2 subtypes of LOOP route type exists:

`ROUTE_TYPE_LOOP_MO`: Will loop a call only if direction of the call is mobile originating (outgoing call). This means any MT calls for a registration with this route type would not be looped to the sip uri in the registration. The use case for using this type would be for example: Call Center for outgoing calls

`ROUTE_TYPE_LOOP_MT`: Will loop a call only if direction of the call is mobile terminating (incoming call). This means any MO calls for a registration with this route type would not be looped to the sip uri in the registration. The use case for using this type would be for example: Business Phone Systems with BYOD policy (route incoming business calls to personal user devices)

`ROUTE_TYPE_INGRESS` allows PBX/TAS to place calls to MSISDN attached to the registration of that type. Regular calls to/from that MSISDN are not affected otherwise.

Creating the registration

SipBreakOutService.UpsertRegistration(Registration) - registration details select its type, prefixes to use
on leg 2 (see above drawing), domain name of the TAS server.

Prefix towards TAS Cisco can provide prefix in INVITE's URI to help TAS to figure out if call came because of the Caller or the Answerer. The prefix is set as follows

| Caller has Registration       | Answerer has Registration       | Prefix                    |
| ------------------------------|---------------------------------|-------------------------- |
|          Yes                  | Yes                             | mobile_originating_prefix |
|          Yes                  | No                              | mobile_originating_prefix |
|          No                   | Yes                             | mobile_terminating_prefix |

Maintaining the registration

Each SIP Registration has fixed TTL of 3600 seconds since last call to SipBreakOutService.UpsertRegistration()
and has to be refreshed by using again SipBreakOutService.UpsertRegistration(Registration) with same parameters.

Deleting the registration

To remove registration without waiting for TTL to expire use SipBreakOutService.DeleteRegistration()
with the same sip uri used in the original registration.

SIP Transport

TLS is used as SIP transport and TAS shall present valid certificate for SIP URI stated in
Registration.sip_uri

Media

WebRTC style SDPs are used between the core SBC and TAS to encrypt media sessions.

type SipBreakoutServiceServer

type SipBreakoutServiceServer interface {
	// Add or replace a registration
	UpsertRegistration(context.Context, *UpsertRegistrationRequest) (*UpsertRegistrationResponse, error)
	// Delete an existing registration
	DeleteRegistration(context.Context, *DeleteRegistrationRequest) (*DeleteRegistrationResponse, error)
}

SipBreakoutServiceServer is the server API for SipBreakoutService service. All implementations should embed UnimplementedSipBreakoutServiceServer for forward compatibility.

Virtual SIP Registration makes Mobility Services' core involve a third party Telephony Application Server (TAS) in to the call processing. The Mobility Services' core Session Boarder Controller (SBC) will forward SIP signalling to the TAS based on presence of the SIP Registration and its type. The type can be one of "loop", "fork", or "fallback".

┌───────┐                   |    ┌───────┐
│ Alice ├───1───────┐       |    │ Alice ├───1───────┐
└───────┘           │       |    └───────┘           │
                    │       |                        │
┌──────┐         ┌──▼───┐   |    ┌───────┐        ┌──▼───┐
│ Bob  ◄────4────┤ Core │   |    │ Bob   ◄───2────┤ Core │
└──────┘         └─▲───┬┘   |    └───────┘        └──┬───┘
                   3   2    |                        3
                   │   │    |                        │
                  ┌┴───▼┐   |                     ┌──▼──┐
                  │ TAS │   |                     │ TAS │
                  └─────┘   |                     └─────┘
                            |
        Loop                VS       Fork / Fallback

For `ROUTE_TYPE_LOOP` leg 4 is not created until call comes back as leg 3. In this case, TAS is not obliged to create leg 3, and can itself answer or reject leg 2.

For `ROUTE_TYPE_FORK` registration makes legs 2 and 3 to happen simultaneously.

For `ROUTE_TYPE_FALLBACK` case leg 3 will only be created if leg 2 is not answered.

For better control of the Loop logic, 2 subtypes of LOOP route type exists:

`ROUTE_TYPE_LOOP_MO`: Will loop a call only if direction of the call is mobile originating (outgoing call). This means any MT calls for a registration with this route type would not be looped to the sip uri in the registration. The use case for using this type would be for example: Call Center for outgoing calls

`ROUTE_TYPE_LOOP_MT`: Will loop a call only if direction of the call is mobile terminating (incoming call). This means any MO calls for a registration with this route type would not be looped to the sip uri in the registration. The use case for using this type would be for example: Business Phone Systems with BYOD policy (route incoming business calls to personal user devices)

`ROUTE_TYPE_INGRESS` allows PBX/TAS to place calls to MSISDN attached to the registration of that type. Regular calls to/from that MSISDN are not affected otherwise.

Creating the registration

SipBreakOutService.UpsertRegistration(Registration) - registration details select its type, prefixes to use
on leg 2 (see above drawing), domain name of the TAS server.

Prefix towards TAS Cisco can provide prefix in INVITE's URI to help TAS to figure out if call came because of the Caller or the Answerer. The prefix is set as follows

| Caller has Registration       | Answerer has Registration       | Prefix                    |
| ------------------------------|---------------------------------|-------------------------- |
|          Yes                  | Yes                             | mobile_originating_prefix |
|          Yes                  | No                              | mobile_originating_prefix |
|          No                   | Yes                             | mobile_terminating_prefix |

Maintaining the registration

Each SIP Registration has fixed TTL of 3600 seconds since last call to SipBreakOutService.UpsertRegistration()
and has to be refreshed by using again SipBreakOutService.UpsertRegistration(Registration) with same parameters.

Deleting the registration

To remove registration without waiting for TTL to expire use SipBreakOutService.DeleteRegistration()
with the same sip uri used in the original registration.

SIP Transport

TLS is used as SIP transport and TAS shall present valid certificate for SIP URI stated in
Registration.sip_uri

Media

WebRTC style SDPs are used between the core SBC and TAS to encrypt media sessions.

type StatusCode

type StatusCode int32
const (
	// Unspecified/default route type. Do not use.
	StatusCode_STATUS_CODE_UNSPECIFIED StatusCode = 0
	// Registration was successfully updated.
	StatusCode_STATUS_CODE_OK StatusCode = 1
	// Registration was not accepted.
	StatusCode_STATUS_CODE_NOT_ACCEPTABLE StatusCode = 2
)

func (StatusCode) Descriptor

func (StatusCode) Descriptor() protoreflect.EnumDescriptor

func (StatusCode) Enum

func (x StatusCode) Enum() *StatusCode

func (StatusCode) EnumDescriptor deprecated

func (StatusCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use StatusCode.Descriptor instead.

func (StatusCode) Number

func (x StatusCode) Number() protoreflect.EnumNumber

func (StatusCode) String

func (x StatusCode) String() string

func (StatusCode) Type

type UnimplementedSipBreakoutServiceServer

type UnimplementedSipBreakoutServiceServer struct{}

UnimplementedSipBreakoutServiceServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedSipBreakoutServiceServer) DeleteRegistration

func (UnimplementedSipBreakoutServiceServer) UpsertRegistration

type UnsafeSipBreakoutServiceServer

type UnsafeSipBreakoutServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeSipBreakoutServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SipBreakoutServiceServer will result in compilation errors.

type UpsertRegistrationRequest

type UpsertRegistrationRequest struct {

	// The registration to add or update.
	Registration *Registration `protobuf:"bytes,1,opt,name=registration,proto3" json:"registration,omitempty"`
	// contains filtered or unexported fields
}

The request message to upsert a registration

func (*UpsertRegistrationRequest) Descriptor deprecated

func (*UpsertRegistrationRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpsertRegistrationRequest.ProtoReflect.Descriptor instead.

func (*UpsertRegistrationRequest) GetRegistration

func (x *UpsertRegistrationRequest) GetRegistration() *Registration

func (*UpsertRegistrationRequest) ProtoMessage

func (*UpsertRegistrationRequest) ProtoMessage()

func (*UpsertRegistrationRequest) ProtoReflect

func (*UpsertRegistrationRequest) Reset

func (x *UpsertRegistrationRequest) Reset()

func (*UpsertRegistrationRequest) String

func (x *UpsertRegistrationRequest) String() string

type UpsertRegistrationResponse

type UpsertRegistrationResponse struct {

	// The response status for attempting to updating the registration
	StatusCode StatusCode `` /* 129-byte string literal not displayed */
	// Human readable description for what failed or rejected the registration.
	ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// Time to live for the registration
	TimeToLive *durationpb.Duration `protobuf:"bytes,3,opt,name=time_to_live,json=timeToLive,proto3" json:"time_to_live,omitempty"`
	// contains filtered or unexported fields
}

The response message when attempting to upsert a registration

func (*UpsertRegistrationResponse) Descriptor deprecated

func (*UpsertRegistrationResponse) Descriptor() ([]byte, []int)

Deprecated: Use UpsertRegistrationResponse.ProtoReflect.Descriptor instead.

func (*UpsertRegistrationResponse) GetErrorMessage

func (x *UpsertRegistrationResponse) GetErrorMessage() string

func (*UpsertRegistrationResponse) GetStatusCode

func (x *UpsertRegistrationResponse) GetStatusCode() StatusCode

func (*UpsertRegistrationResponse) GetTimeToLive

func (x *UpsertRegistrationResponse) GetTimeToLive() *durationpb.Duration

func (*UpsertRegistrationResponse) ProtoMessage

func (*UpsertRegistrationResponse) ProtoMessage()

func (*UpsertRegistrationResponse) ProtoReflect

func (*UpsertRegistrationResponse) Reset

func (x *UpsertRegistrationResponse) Reset()

func (*UpsertRegistrationResponse) String

func (x *UpsertRegistrationResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL