RFC 5140
A Telephony Gateway REgistration Protocol (TGREP)
A Telephony Gateway REgistration Protocol (TGREP) ๐
Okay bestie, let's start with the basics ๐ This is RFC 5140, and it's a Standards Track doc from March 2008 that lives in the Network Working Group ๐ The authors are M. Bangalore, R. Kumar, and J. Rosenberg from Cisco, H. Salama from Citex Software, and D.N. Shah from Moowee Inc. ๐ธ The title block doesn't list anything it obsoletes or updates, so no drama there โจ
Status of This Memo ๐
So this is an Internet standards track protocol for the whole Internet community, and they're literally asking for discussion and suggestions to make it better ๐ฌ For the current standardization state and status, go check "Internet Official Protocol Standards" (STD 1) ๐ And yes, distribution of this memo is unlimited ๐
Abstract โจ
So TGREP, the Telephony Gateway Registration Protocol, is how telephony prefixes supported by telephony gateways and soft switches get registered ๐ The registration mechanism can also be used to export resource information ๐ That prefix and resource info can then get passed to a Telephony Routing over IP (TRIP) Location Server, which can spread that routing info within and between Internet Telephony Administrative Domains (ITADs) ๐ฆ TGREP is giving a lot of TRIP energy: it has similar procedures and a similar finite state machine for session establishment, it uses the same message format, and it shares a subset of TRIP's attributes ๐
Table of Contents ๐๏ธ
1. Introduction ....................................................3
2. Terminology and Definitions .....................................5
3. TGREP: Overview of Operation ....................................6
4. TGREP Attributes ................................................7
4.1. TotalCircuitCapacity Attribute .............................8
4.2. AvailableCircuits Attribute ................................9
4.3. CallSuccess Attribute .....................................10
4.4. Prefix Attributes .........................................12
4.5. TrunkGroup Attribute ......................................13
4.6. Carrier Attribute .........................................15
5. TrunkGroup and Carrier Address Families ........................16
5.1. Address Family Syntax .....................................17
6. Gateway Operation ..............................................18
6.1. Session Establishment .....................................18
6.2. UPDATE Messages ...........................................19
6.3. KEEPALIVE Messages ........................................19
6.4. Error Handling and NOTIFICATION Messages ..................19
6.5. TGREP Finite State Machine ................................19
6.6. Call Routing Databases ....................................19
6.7. Multiple Address Families .................................20
6.8. Route Selection and Aggregation ...........................20
7. LS/Proxy Behavior ..............................................20
7.1. Route Consolidation .......................................22
7.2. Aggregation ...............................................23
7.3. Consolidation versus Aggregation ..........................23
8. Security Considerations ........................................23
9. IANA Considerations ............................................24
9.1. Attribute Codes ...........................................24
9.2. Address Family Codes ......................................24
10. Acknowledgments ...............................................25
11. References ....................................................25
11.1. Normative References .....................................25
11.2. Informative References ...................................26
1. Introduction โจ
Okay so, it's assumed you already know TRIP [2, 12] ๐ง In typical Voice over IP (VoIP) networks, ITADs deploy loads of gateways for geographical diversity, capacity, and redundancy ๐ธ When a call shows up at the domain, it must be routed to one of those gateways. Often an ITAD splits its network into geographic Points of Presence (POPs), and each POP has some gateways plus a proxy server element that fronts them ๐ That proxy element is a SIP proxy [11] or an H.323 gatekeeper. The proxy server manages access to the POP and decides which gateway gets each incoming call ๐ Alongside the proxy that routes call signaling, there are two components: the "Ingress LS" (aka "TGREP receiver") and the "Egress LS" ๐ฆ The TGREP receiver keeps a TGREP peering relationship with one or more gateways. The routing info it gets from those gateways is injected into the Egress LS, which spreads it across the rest of the network over TRIP โจ For convenience, gateway and GW mean the same thing ๐
Here's the picture ๐
Signaling TGREP
-------------> <----------------
+---------+
| |
| GW |
> +---------+
//
//
SIP // +---------+
<----> // | |
+-------------------------+ // | GW |
| | // +---------+
| +-------------+ |/
| | | |
| | Routing | | +---------+ TO PSTN
| | Proxy | | | |
---> | | |-----------> | GW | ----->
|+---+-----+ +-----+----+ | +---------+
|| | | | |
|| <+-+ | |--
||Egress LS| |Ingress LS| | --- +---------+
|| | | | | -- | |
|+---------+ +----------+ | -- | GW |
| | -- +---------+
| | -->
+-------------------------+
TRIP +---------+
<----> | |
| GW |
+---------+
Figure 1: Gateway and LS Configuration
Picking a gateway depends on lots of stuff: their availability, remaining call capacity, and call success stats to a particular Public Switched Telephone Network (PSTN) destination (see [14]) ๐ For the proxy to do this well, it needs that info in real time, as it changes. So there has to be some kind of communication between the proxy and the gateways to convey it ๐ซถ
TRIP [2] is defined for carrying telephony routing info between providers, so calls get routed to the right provider for termination to the PSTN ๐ But TRIP has no mechanism for how routes get injected into it from within the network. It also doesn't define how a provider picks the specific gateway to terminate a call when it arrives. TGREP fills those gaps ๐
TGREP lets PSTN gateways or soft switches tell a signaling server, like a SIP proxy server or H.323 gatekeeper, about the routes they have to the PSTN ๐ก These advertisements include fairly dynamic info, like the remaining capacity in a particular trunk, which is essential for picking the right gateway ๐ฅ
TGREP is identical in syntax and overall operation to TRIP. However, it differs in the route processing rules the TGREP receiver follows, which allows a route processing function called "consolidation". Consolidation combines multiple routes for the same route destination, with different attributes, into a single route so routing information doesn't get lost ๐ TGREP also defines a set of new attributes, usable by TGREP or TRIP. Finally, TGREP only uses a subset of overall TRIP capabilities. Certain attributes aren't used (as described below), and the TGREP entities (the sender and receiver) work in an asymmetric relationship, whereas TRIP allows symmetric and asymmetric ๐ฆ
As a general rule, because TRIP and TGREP are so similar, frequent reference will be made to the terminologies and formats defined in TRIP [2]. It's suggested that you be familiar with TRIP concepts like attributes, flags, route types, address families, etc. ๐
2. Terminology and Definitions ๐
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [1]. Those caps-lock words are important, so read them carefully ๐
Some other useful definitions, bestie:
Circuit: A circuit is a discrete (specific) path between two or more points along which signals can be carried. In this context, a circuit is a physical path, made of one or more wires and possibly intermediate switching points โก
Trunk: In a network, a trunk is a communication path connecting two switching systems, used in establishing an end-to-end connection. In selected applications, it may have both its terminations in the same switching system ๐งต
TrunkGroup: A trunkgroup is a set of trunks, traffic engineered as a unit, for establishing connections within or between switching systems. All of the paths are interchangeable except where subgrouped ๐ซง
Carrier: A carrier is a company offering telephone and data communications between points (end-users and/or exchanges) ๐๐
3. TGREP: Overview of Operation ๐ง
okay so TGREP is a route registration protocol for telephony destinations on a gateway ๐ those destinations can be prefixes, trunkgroups, or carriers. the TGREP sender lives on the GW and gathers all the info to pass along to the TRIP Location Server. then there's a TGREP Receiver that takes that info, can optionally do consolidation and aggregation (see Section 7.3) ๐ , and hands the reachability info over to a TRIP Location Server. the routing proxy uses it too, to pick which gateway handles incoming calls ๐
the TGREP sender sets up a session with the TGREP receiver in a way that's pretty similar to session setup in TRIP ๐ฆ once that's up, the sender sends the reachability info inside UPDATE messages. those UPDATE messages look the same as TRIP's, BUT some TRIP attributes just aren't relevant here, so a TGREP receiver MAY ignore them if they show up in a TGREP message ๐ these TRIP attributes do NOT apply to TGREP:
AdvertisementPathRoutedPathAtomicAggregateLocalPreferenceMultiExitDiscITADTopologyConvertedRoute
and TGREP adds some brand new attributes that can ride along in a TGREP UPDATE message โจ
TotalCircuitCapacity: the total number of PSTN circuits available on a route to complete calls. โญAvailableCircuits: the number of PSTN circuits that are currently available on a route to complete calls. ๐CallSuccess: info about how many calls terminated normally out of the total number of attempted calls. ๐Prefix (E164): the list of E164 prefixes that the respective route can complete calls to. ๐ธPrefix (Decimal Routing Number): the list of Decimal prefixes that the respective route can complete calls to. ๐Prefix (Hexadecimal Routing Number): the list of Hexadecimal prefixes that the respective route can complete calls to. ๐ฆTrunkGroup: lets providers route calls to destinations through preferred trunks. ๐ซถCarrier: lets providers route calls to destinations through preferred carriers. ๐
for the rest of the doc, we spell out the attributes and address families used in TGREP. the new attributes and address families are also usable for general TRIP stuff EXCEPT where it's noted (AvailableCircuits is the example here) ๐
4. TGREP Attributes ๐
bestie, since TGREP lives inside a service provider network, it borrows a SUBSET of the TRIP attributes and then adds a few of its own ๐ง these TRIP attributes apply to TGREP:
WithdrawnRoutesReachableRoutesNexthopServerPrefixCommunities
TGREP also defines some new ones, described in this section: TotalCircuitCapacity, AvailableCircuits, CallSuccess, TrunkGroup, and Carrier. like we said, these new ones are usable by TRIP unless noted otherwise ๐
a TGREP UPDATE supports these attributes:
TotalCircuitCapacityAvailableCircuitsCallSuccessPrefix(E.164, Pentadecimal routing number, Decimal routing number)TrunkGroupCarrier
4.1. TotalCircuitCapacity Attribute ๐
Mandatory: False.
Required Flags: Not well-known.
Potential Flags: None.
TRIP Type Code: 13.
the TotalCircuitCapacity attribute tells you the total number of PSTN circuits available on a route to complete calls ๐ it's used together with AvailableCircuits for gateway selection by the LS. the total number of calls sent to the specified route on the gateway can NOT go over this total circuit capacity under steady state conditions ๐
โโ๏ธ
this one reflects the administratively provisioned capacity instead of what's available at any given moment (that's what AvailableCircuits is for) โจ because it's pretty static, this attribute MAY be propagated beyond the LS that receives it ๐ฆ
TotalCircuitCapacity is the total number of possible calls at any instant ๐ธ it isn't expected to change often. it can change, for example, when some telephony trunks on the gateway get taken out of service for maintenance ๐ง
4.1.1. TotalCircuitCapacity Syntax ๐
the TotalCircuitCapacity attribute is a 4-octet unsigned integer ๐ข it represents the total number of circuits available for terminating calls through this advertised route. it's a potentially achievable upper bound on the number of calls that can be terminated on this route in total ๐
4.1.2. Route Origination and TotalCircuitCapacity ๐
routes MAY be originated containing the TotalCircuitCapacity attribute โจ
4.1.3. Route Selection and TotalCircuitCapacity ๐ง
the TotalCircuitCapacity attribute MAY be used for route selection ๐
since load balancing is one of its main uses, an LS will want to pick a potentially different route (out of a set of routes for the same destination) on a call-by-call basis. you can model that as re-running the decision process when each call arrives ๐ the aggregation and dissemination rules for routes with this attribute make sure that re-running this selection NEVER results in a new route getting propagated to other peers ๐ซถ
4.1.4. Aggregation and TotalCircuitCapacity ๐
an LS MAY aggregate routes to the same prefix that contain a TotalCircuitCapacity attribute. it SHOULD add up the values of the individual routes to work out the value for the aggregated route in the same ITAD ๐งฎ
4.1.5. Route Dissemination and TotalCircuitCapacity ๐ฆ
since this attribute reflects the static capacity of the gateway's circuit resources, it isn't expected to change often ๐ so the LS that receives it MAY disseminate it to other peers, both internal AND external to the ITAD ๐ธ
4.2. AvailableCircuits Attribute ๐
Mandatory: False.
Required Flags: Not well-known.
Potential Flags: None.
TRIP Type Code: 14.
the AvailableCircuits attribute identifies the number of PSTN circuits that are currently available on a route to complete calls ๐ the number of additional calls sent to that gateway for that route can NOT go over the circuit capacity. if it does, the signaling protocol will likely throw errors and calls will get rejected ๐ญ
AvailableCircuits is used ONLY between a gateway and its peer LS, the one responsible for managing that gateway ๐ if it's received in a route, it does NOT get propagated ๐
โโ๏ธ
4.2.1. AvailableCircuits Syntax ๐ข
the AvailableCircuits attribute is a 4-octet unsigned integer. it represents the number of circuits remaining for terminating calls to this route โจ
4.2.2. Route Origination and AvailableCircuits ๐
routes MAY be originated containing the AvailableCircuits attribute ๐ง this one is super dynamic (it changes with every call), so updates MAY be sent as it changes. BUT it is RECOMMENDED that measures be taken to help cut down the messaging load from route origination ๐ it is further RECOMMENDED that a sufficiently large window of time be used so you get a useful aggregated statistic ๐
4.2.3. Route Selection and AvailableCircuits ๐
the AvailableCircuits attribute MAY be used for route selection ๐ load balancing is one of its main uses, so an LS will want to pick a potentially different route (out of a set of routes for the same prefix) on a call-by-call basis. you can model that as re-running the decision process when each call arrives ๐ the aggregation and dissemination rules for routes with this attribute make sure that re-running this selection NEVER results in a new route getting propagated to other peers ๐ซถ
4.2.4. Aggregation and AvailableCircuits ๐ฆ
Not applicable. ๐ โโ๏ธ
4.2.5. Route Dissemination and AvailableCircuits ๐
routes MUST NOT be disseminated with the AvailableCircuits attribute ๐ซ it's meant to reflect capacity at the originating gateway ONLY. and since it's so highly dynamic, it's just not a good fit to disseminate in most cases ๐
4.3. CallSuccess Attribute ๐
Mandatory: False.
Required Flags: Not well-known.
Potential Flags: None.
TRIP Type Code: 15.
the CallSuccess attribute is used ONLY between a gateway and its peer LS, the one responsible for managing that gateway ๐ซถ if it's received in a route, it does NOT get propagated ๐
โโ๏ธ
CallSuccess tells you about the number of normally terminated calls out of a total number of attempted calls ๐
the gateway decides CallSuccess based on the Disconnect cause code at call termination ๐ for example, a call that reaches the Alerting stage but doesn't connect because the called party is unavailable, or is busy, is conventionally counted as a successful call โ
on the flip side, a call that gets disconnected because a circuit or resource is unavailable is conventionally counted as a failed call โ the exact mapping from disconnect causes to CallSuccess is up to the gateway reporting the attribute ๐
the LS uses CallSuccess to keep track of failures in reaching certain telephony destinations through a gateway (or gateways) ๐ธ then it uses that info in gateway selection to boost the chances of successful call termination ๐ง
this info can help the LS consider alternative gateways for terminating calls to those destinations, ones with a better likelihood of success ๐
4.3.1. CallSuccess Syntax ๐ข
the CallSuccess attribute is made up of two component fields, and each one is a 4-octet unsigned integer ๐ the first component field is the total number of calls terminated successfully for the advertised destination on a given address family over a given window of time. the second component field is the total number of attempted calls for the advertised destination within that same window of time ๐
when the total number of attempted calls wraps around, the counter for successful calls gets reset so it stays aligned with the other component over a given window of time ๐ the TGREP receiver using this info should get it frequently enough to prevent loss of significance ๐ซถ
4.3.2. Route Origination and CallSuccess ๐
routes MAY be originated containing the CallSuccess attribute โจ this one is expected to become statistically significant as time passes and more calls get attempted ๐ it is RECOMMENDED that sufficiently large windows be used so you get a useful aggregated statistic ๐
4.3.3. Route Selection and CallSuccess ๐
the CallSuccess attribute MAY be used for route selection ๐ it's a measure of how successful terminating calls to the advertised destination(s) has been ๐ธ this info MAY be used to pick from a set of alternative routes to raise the probability of successful call termination ๐ง
4.3.4. Aggregation and CallSuccess ๐ฆ
Not applicable. ๐ โโ๏ธ
4.3.5. Route Dissemination and CallSuccess
Okay bestie, routes MUST NOT get disseminated with the CallSuccess attribute ๐ โโ๏ธ. Its potential to change dynamically means it's not suitable to pass around, so don't even try ๐
4.4. Prefix Attributes โจ
Mandatory: False. ๐ Required Flags: Not well-known. Potential Flags: None. TRIP Type Codes: 16 for E164 Prefix, 17 for Pentadecimal Routing Number Prefix, and 18 for Decimal Routing Number Prefix.
So the Prefix attribute holds the list of prefixes a route can complete calls to ๐๐ธ It's meant to be used with the Carrier or TrunkGroup address family (we'll get to that in Section 5 ๐).
Okay, real talk: a carrier could reach every prefix range, but administrative stuff might make some ranges way more preferable than others ๐
4.4.1. Prefix Attribute Syntax ๐ง
The Prefix attribute could be E.164, Decimal, or Pentadecimal (refer to TRIP [2]), and each one gets its own type code ๐ The attribute is encoded as a sequence of prefix values in the attribute Value field. The prefixes are listed one after another with no padding, as shown in Figure 2. Each prefix has a 2-octet Length field that tells you the length of the Address field in octets. The order of prefixes in the attribute doesn't matter โจ
If the Prefix attribute shows up with its Length field set to 0, that means the TGREP GW can terminate ALL prefixes of that prefix type (E.164, Decimal, or Pentadecimal) for the given Reachable route(s). And no, leaving out the Prefix attribute entirely in the TGREP update is not the same thing ๐ญ
< 2 octets > < Length1 octets > < 2 octets > < Length2 octets >
+------------+--------------//--+------------+--------------//--+-
| Length1 | Prefix1 | Length2 | Prefix2 | ...
+------------+--------------//--+------------+--------------//--+-
Figure 2: Prefix Format
4.4.2. Route Origination and Prefix ๐ฆ
Routes MAY be originated containing the Prefix attribute.
4.4.3. Route Selection and Prefix ๐
The Prefix attribute MAY be used for route selection.
4.4.4. Aggregation and Prefix ๐
Routes with differing Prefix attributes MUST NOT be aggregated. Routes with the same value in the Prefix attribute MAY be aggregated, and the same Prefix attribute gets attached to the aggregated object. Iconic behavior, honestly ๐
4.4.5. Route Dissemination and Prefix ๐
The LS that receives this attribute should disseminate it to other peers, both internal and external to the ITAD. โจ
4.5. TrunkGroup Attribute ๐ธ
Mandatory: False. ๐ Required Flags: Not well-known. Potential Flags: None. TRIP Type Code: 19.
The TrunkGroup attribute holds the list of trunkgroups on the gateway that get used to complete calls ๐ It lets providers route calls to destinations through their preferred trunks ๐ซถ This one is relatively static, so it's the chill girl of the attributes ๐งโโ๏ธ
4.5.1. TrunkGroup Syntax ๐ฅ
The TrunkGroup attribute is a variable-length attribute made up of a sequence of trunkgroup identifiers. It means the gateway can complete the call through any trunkgroup identifier in that sequence.
Each trunkgroup identifier is encoded as a Length-Value field (shown in Figure 3 below). The Length field is a 1-octet unsigned numeric value. The Value field is variable-length and has two subfields: a trunkgroup label, then a trunk context, separated by the delimiter ";" (semicolon). Both subfields are variable length. The Length field counts the total size of the Value field, delimiter included ๐งฎ
The permissible character set for the trunk group label and trunkgroup context subfields, and the associated ABNF [8], follow the rules outlined in [4]. Be careful with those characters, bestie ๐
If the TrunkGroup attribute shows up with its Length field set to 0, that means the TGREP GW can terminate ALL trunkgroups for the given Reachable route(s). ๐
< 1 octet > < Length1 octets > < 1 octet > < Length2 octets >
+-----------+--------------//--+-----------+--------------//--+-
| Length1 | TrunkGroup 1 | Length2 | TrunkGroup 2 | ...
+-----------+--------------//--+-----------+--------------//--+-
Figure 3: TrunkGroup Syntax
4.5.2. Route Origination and TrunkGroup ๐ฆ
Routes MAY be originated containing the TrunkGroup attribute.
4.5.3. Route Selection and TrunkGroup ๐
The TrunkGroup attribute MAY be used for route selection. Certain trunkgroups MAY be preferred over others based on provider policy. Policy is the boss here ๐
4.5.4. Aggregation and TrunkGroup ๐
Routes with differing TrunkGroup attributes MUST NOT be aggregated. Routes with the same value in the TrunkGroup attribute MAY be aggregated, and the same TrunkGroup attribute gets attached to the aggregated object. โจ
4.5.5. Route Dissemination and TrunkGroup ๐ท
This attribute isn't expected to change frequently. So the LS receiving it MAY disseminate it to other peers, internal to the ITAD. Routes SHOULD not be disseminated external to the ITAD with the TrunkGroup attribute. Keep it in the family, bestie ๐ ๐
4.6. Carrier Attribute ๐
Mandatory: False. ๐ Required Flags: Not well-known. Potential Flags: None. TRIP Type Code: 20.
The Carrier attribute holds the list of carriers the gateway uses to complete calls ๐ฑ It lets providers route calls to destinations through preferred carriers ๐ซถ And yep, it's also relatively static ๐ง
4.6.1. Carrier Syntax ๐ฎ
The Carrier attribute is a variable-length attribute made up of a sequence of carrier identifiers. It means the route can complete the call to any of the carriers represented in that sequence of carrier identifiers [13].
Each carrier identifier is encoded as a Length-Value field (shown in Figure 4 below). The Length field is a 1-octet unsigned numeric value. The Value field is variable-length.
The permissible character set for the Value field, and the associated ABNF [8], follow the rules outlined in [5]. Specifically, it carries "global-cic" or "local-cic" [5]. For "local-cic", the "phonedigit-hex" part and the "cic-context" part are separated by the delimiter ";". So the absence or presence of that delimiter tells you whether the value is a "global-cic" or a "local-cic" ๐ต๏ธโโ๏ธ The Length field counts the total size of the Value field, delimiter included.
If the Carrier attribute shows up with its Length field set to 0, that means the TGREP GW can terminate ALL Carriers for the given Reachable route(s). ๐
< 1 octet > < Length1 octets > < 1 octet > < Length2 octets >
+-----------+--------------//--+-----------+--------------//--+-
| Length1 | Carrier 1 | Length2 | Carrier 2 | ...
+-----------+--------------//--+-----------+--------------//--+-
Figure 4: Carrier Syntax
4.6.2. Route Origination and Carrier ๐
Routes MAY be originated containing the Carrier attribute.
4.6.3. Route Selection and Carrier โญ
The Carrier attribute MAY be used for route selection. Certain carriers MAY be preferred over others based on provider policy. ๐
4.6.4. Aggregation and Carrier ๐
Routes with differing Carrier attributes MUST NOT be aggregated. Routes with the same value in the Carrier attribute MAY be aggregated, and the same Carrier attribute gets attached to the aggregated object. Slay ๐ฅ
4.6.5. Route Dissemination and Carrier ๐ฆ
This attribute isn't expected to change frequently. So the LS receiving it MAY disseminate it to other peers, both internal and external to the ITAD. ๐ซถ
5. TrunkGroup and Carrier Address Families ๐
As described in TRIP [2], the Address Family field gives the type of address for the route. This section defines two new address families and their codes โจ
Code Address Family
4 TrunkGroup
5 Carrier
When a set of GWs needs to be managed at the granularity of carriers or trunkgroups, it may make more sense for a GW to advertise routes using the Carrier address family or the TrunkGroup address family, respectively. ๐ง
Also, in a TGREP association between the gateway and the LS responsible for managing that gateway, some attributes fit more naturally as advertised properties of trunkgroups or carriers, rather than of advertised prefixes. For example, AvailableCircuit information on a particular trunkgroup or a particular carrier ๐ธ The existing TRIP address families just aren't enough for this relationship, so we need separate address families that can tie properties like AvailableCircuits information to trunkgroups or carriers ๐
The primary benefits of this model are:
- It lets a service provider route calls based strictly on the trunkgroups or carriers. ๐
- It gives more accurate reporting of dynamic attributes like AvailableCircuits, by letting you manage resources at the granularity of a trunkgroup or a carrier. ๐
- It helps with scalability. Gateways can get really large, with the ability to provision hundreds or a few thousand circuits, and that can crank up the traffic reporting dynamic resource info between the gateway and the LS. This model can potentially ease that UPDATE traffic, which means better efficiency and a more scalable gateway registration model ๐โจ
5.1. Address Family Syntax โจ
okay so first up, the generic TRIP route format from TRIP [2] ๐ Here it is, bestie:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+---------------+---------------+---------------+---------------+
| Address Family | Application Protocol |
+---------------+---------------+---------------+---------------+
| Length | Address (variable) ...
+---------------+---------------+---------------+---------------+
Figure 5: Generic TRIP Route Format
The Address Family field tells you what kind of address this family is using, and that's based on the TrunkGroup or Carrier ๐ IANA already handed out the codes for the new address families, so no drama there.
The TrunkGroup address family is code 4, and the Carrier address family is code 5 ๐ธ
The Application Protocol field is the same one used for the Decimal, Pentadecimal, and E.164 address families from TRIP [2] ๐ฆ And the Length field is the total size of the Address field, in bytes.
The Address field holds either a TrunkGroup or a Carrier value, and the syntax goes like this:
For the TrunkGroup address family, the Address field is a TrunkGroup value defined the way it's specified in Section 4.5.1, "TrunkGroup Syntax" โจ
For the Carrier address family, the Address field is a Carrier value. It's the same as the Value field from the earlier Section 4.6.1, "Carrier Syntax" ๐
These address families are not hierarchical. They're flat ๐ง If a gateway supports any of them, it should include that address family as one of the Route types supported in the OPEN message capability negotiation phase.
Heads up: these attributes are flat, not nested. Don't go looking for a hierarchy here, bestie ๐
The following attributes are currently defined for use with all the address families, including TrunkGroup and Carrier ๐
- AvailableCircuits attribute
- TotalCircuitCapacity attribute
- CallSuccess attribute
It is recommended that the gateway use those three attributes with the TrunkGroup or Carrier address family, if possible. The payoff is a more efficient resource reporting framework and a scalable model for gateway provisioning. Literally iconic ๐ฅ
When the gateway isn't using the TrunkGroup or Carrier address family, though, it MAY use those attributes with the Decimal, Pentadecimal, and E.164 address families ๐
The Prefix attribute cannot be used when the address family is E164 numbers, Pentadecimal routing numbers, or Decimal routing numbers ๐
The Carrier attribute cannot be used if the address family type is Carrier ๐
The TrunkGroup attribute cannot be used if the address family type is TrunkGroup ๐
6. Gateway Operation โจ
okay so a gateway uses TGREP to advertise its reachability to its domain's Location Server(s) ๐ธ (LS, which are closely coupled with proxies). The gateway runs in TRIP Send Only mode because it only cares about advertising its own reachability. It isn't interested in learning about other gateways and other domains, and it won't create its own call routing database. This section walks through how TGREP works on a gateway ๐ฆ
6.1. Session Establishment ๐
When a TGREP gateway opens a peering session with a TGREP receiver, it follows exactly the same procedures as any other TRIP entity โจ The gateway sends an OPEN message that includes a Send Receive Capability in the Optional Parameters, and the gateway sets that capability to Send Only. The OPEN message also lists the address families the gateway supports. The rest of the peer session establishment is identical to TRIP ๐
6.2. UPDATE Messages ๐ซถ
Once the peer session is up, the gateway sends UPDATE messages to the TRIP LS with its entire reachability. It also sends any attributes associated with the routes ๐
TGREP processing of the UPDATE message at the gateway is identical to UPDATE processing in TRIP [2]. A TGREP sender MUST support all mandatory TRIP attributes ๐
6.3. KEEPALIVE Messages ๐
KEEPALIVE messages get exchanged periodically over the peering session between the TGREP gateway and the TRIP LS, as specified in Section 4.4 of TRIP [2] โญ
6.4. Error Handling and NOTIFICATION Messages ๐ญ
Error handling and NOTIFICATION generation work the same way with TGREP as they do with TRIP โจ The only difference is that a TGREP gateway will never generate a NOTIFICATION message in response to an UPDATE message, no matter what's in that UPDATE message. Any UPDATE message just gets silently discarded ๐
6.5. TGREP Finite State Machine ๐ฅ
When the TGREP finite state machine is in the Established state and an UPDATE message comes in, that UPDATE message is silently discarded and the TGREP gateway stays in the Established state ๐ Other than that, the TRIP finite state machine and the TGREP finite state machine are identical ๐ฆ
6.6. Call Routing Databases ๐
A TGREP gateway may maintain simultaneous sessions with more than one TRIP LS ๐ธ It keeps one call routing database per peer TRIP LS. These databases are equivalent to TRIP's Adj-TRIBs-Out, so we'll call them Adj-TRIBs-GW-Out ๐ Each Adj-TRIB-GW-Out contains the gateway's reachability information that was advertised to its peer TRIP LS. How an Adj-TRIB-GW-Out database gets populated is outside the scope of this document (possibly by manual configuration) โจ
The TGREP gateway doesn't have databases equivalent to TRIP's Adj-TRIBs-In and Loc-TRIB. That's because the TGREP gateway doesn't learn routes from its peer TRIP LSs, so it doesn't run call route selection ๐ง
6.7. Multiple Address Families ๐
okay so TGREP supports various address families to convey the reachability of telephony destinations ๐ Here's the big rule: a TGREP session MUST NOT send UPDATEs of more than one of the following categories for a given established session: (a) Prefix address families (E164, Pentadecimal, and Decimal), (b) TrunkGroup address family, or (c) Carrier address family ๐
TGREP should specify its choice of address family through the route-type capability in the OPEN message ๐ And a route-type specification in the OPEN message that breaks the above rule should be rejected with a NOTIFICATION message ๐ญ
6.8. Route Selection and Aggregation ๐
TRIP's route selection and aggregation operations MUST NOT be implemented by TGREP gateways ๐ No route selection or aggregation on the gateway, periodt ๐
7. LS/Proxy Behavior ๐ธ
As mentioned earlier, TGREP can be considered a protocol complimentary to TRIP when it comes to providing reachability information, and that information can then be fed into the Location Server ๐ฆ Here's the architecture of an LS/Proxy system. There's a TRIP LS application that acts as a speaker in the I-TRIP/E-TRIP network, as documented in TRIP [2]. This component is called "Egress LS" for the purposes of this discussion ๐ Then there's a signaling server fronting a set of gateways. Working alongside that signaling server is a second component operating in receive mode. It peers with one or more gateways, and each of those gateways uses TGREP to advertise routing information ๐
That component, on the receiving end of one or more TGREP sessions, is called the "Ingress LS" or "TGREP receiver" for the purposes of this discussion โจ The entity advertising the routes on the TGREP session (typically a gateway) is called the "TGREP sender" ๐ซถ
The TGREP receiver takes the resulting routing information from each gateway, and it "exports" that information to another process we define below. That process does consolidation and aggregation, in that order ๐ง These operations take as input the collective set of routes from all the gateways. After that, the resulting TRIB gets passed as input into the LS-Egress process, as shown below, and that process can then disseminate the routes via TRIP ๐ฅ The interface between the TGREP receiver (aka Ingress LS) peering with the GW(s) and the TRIP LS (Egress LS) is entirely a local matter ๐
The nature of the consolidation and aggregation operations, and the motivation behind them, is described in the subsections below. The order in which the operations are listed is an implicit logical sequence in which they're applied ๐ The architecture for an LS/Proxy entity is shown in Figure 6 below ๐
+-------------------------------------------------------+
| +-------------------------------+ |
| | +-+ +-+ | | TGREP
| | |A| |C| | | +-----+
| | |g| |o| | | | |
| +-------------+ | |g| |n| +-------------+ | | --| GW |
| | | | |r| |s| | | | | +-----+
| | TRIP | | |e| |o| | | | +---
| | LS <----------|g<--|l<--- TGREP |-++-| +-----+
| | | | |a| |i| | Session | | | | |
| | (I-TRIP/ | | |t| |d| | Management |-++-+----| GW |
| | E-TRIP) | | |i| |a| | | | | +-----+
| | (Egress LS) | | |o| |t| | |-+ +---
| +-----------/-+ | |n| |i| +-------------+ | | +-----+
| / | | | |o| | | --| |
| / | | | |n| (Ingress LS) | | | GW |
| / | +-+ +-+ | | +-----+
| / | TGREP Receiver | |
| / +-------------------------------+ |
| / |
| / |
+-------/-----------------------------------------------+
/ LS/Proxy
/
/
/
/
/
+/----------------+
| |
| |
| |
| LS |
| |
| |
| |
| |
| |
+-----------------+
Figure 6: LS Architecture for TRIP-GW
7.1. Route Consolidation โจ
okay so the TGREP receiver (aka the Ingress LS ๐ ) can get routing info from one or more gateways, and honestly it's super common for multiple routes to exist for the same destination ๐. Those alternatives might come from the same gateway or from different ones. It is RECOMMENDED that the set of gateway routes for each destination get consolidated before a candidate route is presented to the Egress LS entity ๐ซถ. The goal is to build one route that best represents what all the gateways managed by this TGREP receiver can collectively do. Let's walk through an example so you can see why this matters. Say the TGREP receiver is peering with gateways A and B:
- Gateway A advertises a route for destination "SIP 408" on the E.164 address family with the Carrier attribute value C1.
- Gateway B advertises a route for destination "SIP 408" on the E.164 address family with Carrier attribute value C2.
The TGREP receiver can consolidate those two routes into a single route for "SIP 408", where the Carrier attribute is the union of both values, namely "C1 C2" โจ. That's what consolidation is. Without it, a route to "SIP 408" through one or more of those carriers could get lost ๐ญ.
Here's another one. Say there are Carrier address family (AF) updates from two gateways for Carrier destination X, and one update has prefix values {408, 650} while the other has {919, 973}. Those prefixes can be merged into one Carrier AF route advertisement with prefix value {408, 650, 919, 973} ๐ธ.
Basically, if TGREP routes from a set of gateways aren't consolidated before a candidate route goes to the TRIP LS, there's a real risk of losing gateway routing information ๐. How you apply consolidation to different attributes and routes from different address families is up to each TGREP receiver implementation ๐ง.
7.2. Aggregation ๐ฆ
The gateway routes, whether they've been consolidated or not, may be aggregated before they get imported into the LS instance in charge of I-TRIP/E-TRIP processing (Egress LS). This follows the standard aggregation procedures described in TRIP [2], while respecting the aggregation rules for each route attribute ๐.
7.3. Consolidation versus Aggregation ๐
Let's clear up the difference between these two, because they sound alike but aren't ๐ค. Consolidation combines multiple routes for the same route destination. Aggregation combines routes for different route destinations that qualify to be summarized, which cuts down on route information ๐.
For example, if multiple gateways offer routes to the E.164 destination "408" but with different attributes (like Carrier), the LS/Proxy can combine them into one route for "408" that represents those attributes collectively. That's consolidation ๐.
Now say the LS/Proxy gets routes for 4080, 4081, 4082, ... 4089 from a set of gateways. It could aggregate those candidate routes into a summarized route destination "408", with each attribute computed using the aggregation procedures defined in TRIP โจ.
8. Security Considerations ๐
The security considerations for TGREP are identical to the ones for TRIP [2], and they're restated here just so everything is clear ๐ .
The security mechanism for the peering session between a TGREP GW and a TRIP LS, over an IP network, is IPsec [3]. IPsec uses two protocols to provide traffic security: Authentication Header (AH) [6] and Encapsulating Security Payload (ESP) [7] ๐ง.
The AH header provides data origin authentication, connectionless integrity, and optional anti-replay protection for messages passed between the peer LSs. The ESP header provides origin authentication, connectionless integrity, anti-replay protection, and confidentiality for messages โญ.
Implementations that use the ESP header SHALL comply with Section 3.1.1 of [10], which defines a minimum set of algorithms for integrity checking and encryption. Likewise, implementations that use the AH header SHALL comply with Section 3.2 of [10], which defines a minimum set of algorithms for integrity checking. This is a must-do, bestie ๐ญ๐ฅ
Implementations SHOULD use the Internet Key Exchange Protocol (IKEv2) [9] to get more robust keying options ๐ซถ. Implementations that use IKEv2 SHOULD support 3DES-CBC for confidentiality and HMAC-SHA1 for integrity ๐.
A Security Association (SA) [3] is a simplex "connection" that provides security services to the traffic it carries ๐ฅ. Those services are provided to an SA by using AH or ESP, but not both ๐. There are two types of SAs: transport mode and tunnel mode. A transport mode SA is a security association between two hosts, and it's the right fit for protecting the TRIP session between two peer LSs ๐.
9. IANA Considerations ๐
Both TRIP [2] and TGREP share the same IANA registry for Capabilities, Attributes, Address Families, and Application Protocols ๐. IANA added the following attribute codes and address family codes to the TRIP [2] registries ๐ฆ.
9.1. Attribute Codes ๐ธ
The Attribute Type Codes assigned to the new attributes defined in this document are listed below:
Code Attribute Reference
---- --------- ---------
13 TotalCircuitCapacity [RFC5140]
14 AvailableCircuits [RFC5140]
15 CallSuccess [RFC5140]
16 E.164 Prefix [RFC5140]
17 Pentadecimal Routing Number Prefix [RFC5140]
18 Decimal Routing Number Prefix [RFC5140]
19 TrunkGroup [RFC5140]
20 Carrier [RFC5140]
9.2. Address Family Codes ๐ง
The next subsections show the codes assigned for the two new address families introduced in this document โจ.
9.2.1. TrunkGroup Address Family ๐
Code Address Family Reference
---- -------------- ---------
4 TrunkGroup [RFC5140]
9.2.2. Carrier Address Family ๐
Code Address Family Reference
---- -------------- ---------
5 Carrier [RFC5140]
10. Acknowledgments ๐ซถ
Big thank-you to Vijay Gurbani, Li Li, Kevin McDermott, David Oran, Bob Penfield, Jon Peterson, Anirudh Sahoo, and James Yu for their insightful comments and suggestions ๐. They're literally the best โจ.
11. References ๐
11.1. Normative References
[1] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14, RFC 2119, March 1997.
[2] Rosenberg, J., Salama, H., and M. Squire, "Telephony Routing
over IP (TRIP)", RFC 3219, January 2002.
[3] Kent, S. and K. Seo, "Security Architecture for the Internet
Protocol", RFC 4301, December 2005.
[4] Gurbani, V. and C. Jennings, "Representing Trunk Groups in
tel/sip Uniform Resource Identifiers (URIs)", RFC 4904, June
2007.
[5] Yu, J., "Number Portability Parameters for the "tel" URI", RFC
4694, October 2006.
[6] Kent, S., "IP Authentication Header", RFC 4302, December 2005.
[7] Kent, S., "IP Encapsulating Security Payload (ESP)", RFC 4303,
December 2005.
[8] Crocker, D., Ed., and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, January 2008.
[9] Kaufman, C., Ed., "Internet Key Exchange (IKEv2) Protocol", RFC
4306, December 2005.
[10] Manral, V., "Cryptographic Algorithm Implementation Requirements
for Encapsulating Security Payload (ESP) and Authentication
Header (AH)", RFC 4835, April 2007.
11.2. Informative References
[11] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A.,
Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP:
Session Initiation Protocol", RFC 3261, June 2002.
[12] Rosenberg, J. and H. Schulzrinne, "A Framework for Telephony
Routing over IP", RFC 2871, June 2000.
[13] ITU-T List of ITU Carrier Codes (published periodically in the
ITU-T Operational Bulletin).
[14] Rosenberg, J., "Requirements for Gateway Registration", Work in
Progress, November 2001.
Authors' Addresses ๐
Manjunath S. Bangalore
Cisco
Mail Stop SJC-14/2/1
3625 Cisco Way
San Jose, CA 95134
Phone: +1-408-525-7555
EMail: manjax@cisco.com
Rajneesh Kumar
Cisco
Mail Stop SJC-14/4/2
3625 Cisco Way
San Jose, CA 95134
Phone: +1-408-527-6148
EMail: rajneesh@cisco.com
Jonathan Rosenberg
Cisco
Edison, NJ 08837
EMail: jdrosen@cisco.com
Hussein F. Salama
Citex Software
Giza, Egypt
EMail: hsalama@citexsoftware.com
Dhaval Niranjan Shah
Moowee Inc.
4920 El Camino Real
Los Altos, CA 94022
Phone: +1-408-307-7455
EMail: dhaval@moowee.tv
Full Copyright Statement โ๏ธ
Copyright (C) The IETF Trust (2008).
This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property ๐
The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document, or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. ๐โจ
๐ฆ where this page comes from
- ietf: rfc5140 2008-03
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms