Simple Gateway Control Protocol (SGCP)
Mauricio Arango, Christian Huitema
Version 1.0
May 5, 1998


 

1. Introduction

This document describes an application programming interface (SGCI) and a corresponding protocol (SGCP) for controlling Voice over IP (VoIP) Gateways from external call control elements. The SGC assumes a call control architecture where the call control "intelligence" is outside the gateways and handled by external call control elements. The SGC assumes that these call controls, or call agents, will synchronize themselves to send coherent commands to the gateways. The SGC does not provide any mechanism for synchronizing these agents.

The SGCP assumes a connection model where the basic constructs are endpoints and connections. Endpoints are sources or sinks of data and could be physical or virtual. A physical endpoint is, for example, a trunk circuit. An example of a virtual endpoint is an audio source in an audio-content server. Creation of physical endpoints requires hardware installation, while creation of virtual endpoints can be done by software.

Connections may be either point to point or multipoint. A point to point connection is an association between two endpoints with the purpose of transmitting data between these endpoints. Once this association is established for both endpoints, data transfer between these endpoints can take place. A multipoint connection is established by connecting the end point to a multipoint session.

1.1 Relation with the H.323 standards

The SGCP is designed as an internal protocol within a distributed system that appears to the outside as a single VoIP gateway. This system is composed of a call agent, that may or may not be distributed over several computer platforms, and of a set of gateways. In a typical configuration, this distributed gateway system will interface on one side with one or several telephony switches, and on the other side with H.323 conformant systems, as indicated in the following table:
 
Functional Plane Phone switch Terminating Entity H.323 conformant systems
Signaling Plane Signaling exchanges through SS7/ISUP Call agent Signaling exchanges with the call agent through H.225/RAS and H.225/Q.931. 

Possible negotiation of logical channels and transmission parameters through H.245 with the call agent.

    Internal synchronization through SGCP  
Bearer Data Transport Plane Connection through high speed trunk groups Telephony gateways Optional negotiation of logical channels and transmission parameters through H.245 directly with the telephony gateway. 

Transmission of VoIP data using RTP, directly between the H.323 station and the gateway.

In the SGCP model, the gateways focus on the audio signal translation function, while the call agent handles the signaling functions. As a consequence, the call agent implements the "signaling" layers of the H.323 standard, and presents itself as a "Gatekeeper" to the H.323 systems. Calls are established using the "Gatekeeper Routed" call model.
 

1.2 Relation with the IETF standards

While H.323 is the recognized standard for VoIP terminals, the IETF has also produced standards for other types of multi-media applications. These other standards include: The latter three standards are in fact alternative signaling standards that allow for the transmission of a session description to an interested party. SAP is used by multicast session managers to distribute a multicast session description to a large group of recipients, SIP is used to invite an individual user to take part in a point-to-point or unicast session, RTSP is used to interface a server that will provide real time data. In all three cases, the session description is described according to SDP; when audio is transmitted, it is transmitted through the Real-time Transport Protocol, RTP.

The distributed gateway systems and SGCP will enable telephony users to access these sessions. The call agent will provide for signaling conversion, according to the following table:
 
Functional Plane Phone switch Terminating Entity IETF conforming systems
Signaling Plane Signaling exchanges through SS7/ISUP Call agent Signaling exchanges with the call agent through SAP, SIP or RTSP. 

Negotiation of session description parameters through SDP (telephony gateway terminated but passed via the call agent to and from the IETF conforming system)

    Internal synchronization through SGCP  
Bearer Data Transport Plane Connection through high speed trunk groups Telephony gateways Transmission of VoIP data using RTP, directly between the remote system and the gateway.
 
The SDP standard has a pivotal status in this architecture. We will see in the following description that we also use it to carry session descriptions in SGCP.

2. Simple Gateway Control Interface

The interface functions are grouped in two logical sets, connection control and end point control. Both use the same system model and the same naming conventions.

2.1 Model and naming conventions.

The SGCP assumes a connection model where the basic constructs are endpoints and connections. Connections are grouped in calls. Connections and calls are set up at the initiative of one or several call agents.

2.1.1 Names of endpoints

Endpoints names have two components: The vast majority of endpoints, in our systems, are trunk circuits linking a gateway to a telephone switch. These circuits are typically grouped in digital multiplex, which is connected to the gateway by a physical interface. Such circuits will have to be named in three contexts: The call agents will use configuration data bases to map ranges of circuits within a trunk group to another range of circuits in a multiplex connected to a gateway through a physical interface. The gateway will be identified, in SGCP, by a domain name. The local name will be structured to encode both the name of the physical interface, for example X35V3+A4, and the circuit number within the multiplex connected to the interface, for example 13. The circuit number will be separated from the name of the interface by a fraction bar, as in:

X35V3+A4/13

The circuit number can be omitted when the physical interface only includes one circuit, or if the call agent requests the gateway to choose one available circuit within a multiplex.

Other types of endpoints will use different conventions. For example, an end point that produces an "all lines busy" announcement could be named:

all-lines-busy/loop@announce-23.whatever.net

The exact syntax of such names should be specified in the corresponding server specification.
 

2.1.2 Names of calls

Calls are identified by unique identifiers, independent of the underlying platforms or agents. These identifiers are created by the call agent. They are treated in SGCP as unstructured octet strings.

Call identifiers are expected to be unique within the system. When a call agent builds several connections that pertain to the same call, either on the same gateway or in different gateways, these connections will all be linked to the same call through the globally unique identifier. This identifier can then be used by accounting or management procedures, which are outside the scope of SGCP.
 

2.1.3 Names of connections

Connection identifiers are created by the gateway when it is requested to create a connection. They identify the connection within the context of an endpoint and a call. They are treated in SGCP as unstructured octet strings. The gateway should make sure that a proper waiting period, at least 3 minutes, elapses between the end of a connection that used this identifier and its use in a new connection.

2.1.4 Names of call agents and other entities

The simple gateway control protocol has been designed to allow the implementation of redundant call agents, for enhanced network reliability. This means that there is no fixed binding between entities and hardware platforms or network interfaces.

Reliability can be improved by the following precautions:

 
 

2.1.5 Numbering plans

Through the interface, the call agent can ask the gateway to collect digits dialed by the user. This facility is intended to be used with access gateways to collect the numbers that a user dials; it may also be used with trunking gateways and access gateways alike, to collect the access codes, credit card numbers and other numbers requested by call control services.

An alternative procedure would ask the gateway to notify the call agent of the dialed digits, as soon as they are dialed. However, such a procedure generates a large number of interactions. It is preferable to accumulate the dialed numbers in a buffer, and to transmit them in a single message.

The problem with this accumulation approach, however, is that it is hard for the gateway to predict how many numbers it needs to accumulate before transmission. For example, using the phone on our desk, we can dial the following numbers:
 
0 Local operator
00 Long distance operator
xxxx Local extension number
8xxxxxxx Local number
#xxxxxxx Shortcut to local number at other corporate sites
*xx Star services
91xxxxxxxxxx Long distance number
9011 + up to 14 digits International number
 

The solution to this problem is to load the gateway with a digit map that correspond to the dial plan. This digit map is expressed using a syntax derived from the Unix system command, egrep. For example, the dial plan described above would be simply result in the following digit map:
 

The formal syntax of the digit map is described by the following BNF notation:

Digit ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"

Timer ::= "T" -- matches the detection of a timer

Letter ::= Digit | Timer | "#" | "*" | "A" | "B" | "C" | "D"

Range ::= "x" -- matches any digit
        |   "[" Letters "]" -- matches any of the specified letters

Letters ::= Subrange | Subrange Letters

Subrange ::= Letter -- matches the specified letter
        | Digit "-" Digit -- matches any digit between first and last

Position ::= Letter
        | Range

StringElement ::= Position -- matches an occurrence of the position
        | Position "." -- matches an arbitrary number of occurrence of the position, including 0

String ::= StringElement | StringElement String

StringList ::= String | String "|" StringList

DigitMap ::= String | "(" StringList ")"

 A DigitMap, according to this syntax, is defined either by a "string" or by a list of strings. Each string in the list is an alternative numbering scheme. A gateway that detects digits, letters or timers will:

    1. Add the event parameter code as a token to the end of an internal state variable called the "current dial string"
    2. Apply the current dial string to the digit map table, attempting a match to each regular expression in the Digit Map in lexical order
    3. If the result is under-qualified (partially matches at least one entry in the digit map), do nothing further.
    4. If the result matches, or is over-qualified (i.e. no further digits could possibly produce a match), send the current digit string to the call agent.
Digit maps are provided to the gateway by the call agent, whenever the call agent instructs the gateway to listen for digits.
 

2.2 Usage of SDP

The call agent uses the SGCP to provision the gateways with the description of connection parameters such as IP addresses, UDP port and RTP profiles. These descriptions will follow the conventions delineated in the Session Description Protocol which is now an IETF proposed standard, documented in RFC 2327.

SDP allows for description of multimedia conferences. In the first implementations of SGCP, we limit the SDP usage to the setting of audio circuits. The initial session descriptions contain the description of exactly one media, of type audio.
 

2.3 Gateway Control Functions

This section describes the primitives of the SGCP. The service consists of connection handling and end-point handling primitives. There are five primitives in the protocol: These services allow a controller (normally, the Call Agent) to instruct a gateway on the creation of connections that terminate in an "endpoint" inside the gateway, and to be informed about events occurring in the gateway. An end point may be for example: Connections are grouped into "calls". Several connections may belong to the same call, terminating in the same end-point. Each connection is qualified by a "mode" parameter, which can be set to "send", "receive", "send/receive", "inactive", "loopback" or "continuity test."

The handling of the audio signals received on these connections is determined by the parameters:

If the mode is set to "loopback", the gateway is expected to return the incoming signal from the endpoint back into that same endpoint. This procedure will be used, typically, during maintenance operations.

If the mode is set to "continuity test", the gateway is informed that the other end of the circuit has initiated a continuity test procedure. It is expected to follow the procedure specified for that end point, which may require either that the circuit be placed in loopback mode, or to wait for a specific tone and return an appropriate signal.
 

2.3.1 Notifications Request

Notification functions are used to request the gateway to send notifications upon the occurrence of specified events in an endpoint. For example, a notification may be requested when a gateway detects that an endpoint is receiving, from its corresponding circuit, tones associated with fax communication. The entity receiving this notification may decide to use a different type of encoding method in the connections bound to this endpoint.
  EndpointId is the identifier for the endpoint in the gateway where NotificationRequest executes.

NotifiedEntity is an optional parameter that specifies where the notifications should be sent. When this parameter is absent, the notifications should be sent to the originator of the notification request.

RequestIdentifier is used to correlate this request with the notifications that it triggers.

RequestedEvents is a list of events that the gateway is requested to detect and report. Such events include:

To each event is associated an action, which can be: Events that are not specified in the list will, by default, be ignored.

The Swap Audio action can be used when a gateway handles more than one active connection on an endpoint. This will be the case for three-way calling, call waiting, and possibly other feature scenarios. In order to avoid the round-trip to the call agent when just changing which connection is attached to the audio functions of the endpoint, the notification request can map an event (usually hook flash, but could be some other event) to a local function swap audio, which selects the "next" connection in a round robin fashion. If there is only one connection, this action is effectively a no-op.

Hook transition events are normally observed only by access gateways. Tone detection can be done by any gateway, including trunking gateways and PBX gateways. The call agent can send a Notification Request whose requested event list is empty. It will do so, for example, to an access gateway when it does not want to collect any more DTMF digits.

DigitMap is an optional parameter that allows the call agent to provision the gateways with a digit map according to which digits will be accumulated. This parameter must be present if the requested events contain an request to "accumulate according to the digit map." The collection of these digits will result in a digit string. The digit string is initialized to a null string upon reception of the notification request, so that a subsequent notification only returns the digits that were collected after this request.

SignalRequests is a parameter that contains the set of actions that the gateway is asked to perform on the end point, such as:

The action triggered by the SignalRequests is synchronized with the collection of events specified in the RequestedEvents parameter. For example, if the notification request mandates "ringing" and the event request ask to look for an "off-hook" event, the ringing should stop as soon as the phone goes off hook.

The specific definition of actions which are requested via these signal requests, such as the duration of and frequency of a DTMF digit, is outside the scope of SGC. This definition may vary from location to location and hence from gateway to gateway.

The call agent can send a Notification Request whose requested signal list is empty. It will do so for example when tone generation should stop.
 

2.3.2 Notifications

Notifications messages are sent by the gateway when the observed events occur. Notify( EndpointId, NotifiedEntity,
RequestIdentifier,
ObservedEvents)

 

EndpointId is the identifier for the endpoint in the gateway which is issuing the Notify command.

NotifiedEntity is an optional parameter that identifies the entity to which the notifications is sent. This parameter is equal to the NotifiedEntity parameter of the notification request that triggered this notification. The parameter is absent if there was no such parameter in the triggering request. In this case, the notification is sent to the entity from which the request was received.

RequestIdentifier is parameter that repeats the RequestIdentifier parameter of the notification request that triggered this notification. It is used to correlate this notifications with the request that triggered it.

ObservedEvents is a list of events that the gateway detected. A single notification may report a list of events that will be reported in the order in which they were detected. The list may only contain the identification of events that were requested in the RequestedEvents parameter of the triggering request. It will contain the events that were either accumulated (but not notified) or treated according to digit map (but no match yet), and the final event that triggered the detectection or provided a final match in the digit map.
 

2.3.3 CreateConnection

This function is used to create a connection. This function creates a connection between two endpoints. A connection is defined by its endpoints. The input parameters in CreateConnection provide the data necessary to build a gateway’s "view" of a connection.

CallId is a global unique parameter that identifies the call (or session) to which this connection belongs. This parameter is unique within the whole network of gateways; connections that belong to the same call share the same call-id. The call-id can be used to identify calls for reporting and accounting purposes.

EndpointId is the identifier for the connection endpoint in the gateway where CreateConnection executes. The endpoint identifier can be fully-specified by assigning a value to parameter EndpointId in the function call or it may be under-specified and the full value will be assigned by the gateway and its complete value returned as a field in the LocalConnectionDescriptor structure returned by CreateConnection.

The Notified Entity is an optional parameter that specifies where the notifications should be sent. An example of notification may be a disconnection request at the initiative of the gateway.

LocalConnectionOptions is a structure that describes the characteristics of the data communications from the point of view of the gateway executing CreateConnection. The fields contained by LocalConnectionOptions are the following:

The values of these fields are defined in the SDP standard. For each of the first three fields, the call agent has three options: The bandwidth specification shall not contradict the specification of encoding methods and packetization period. If an encoding method is specified, then the gateway is authorized to use it, even if this results in the usage of a larger bandwidth than specified.

The Type of Service specifies the class of service that will be used for the connection. When the connection is transmitted over an IP network, the parameters encodes the 8-bit type of service value parameter of the IP header. When the Type of Service is not specified, the gateway shall used a default configured value.

By default, the telephony gateways always perform echo cancellation. However, it is necessary, for some calls, to turn off these operations. The echo cancellation parameter can have two values, "on" (when the echo cancellation is requested) and "off" (when it is turned off.)

RemoteConnectionDescriptor is the connection descriptor for the remote side of a connection. It includes the same fields as in the LocalConnectionDescriptor, i.e. the fields that describe a session according to the SDP standard. This parameter may have a null value when the information for the remote end is not known yet. This occurs because the entity that builds a connection starts by sending a CreateConnection to one of the two gateways involved in it. For the first CreateConnection issued, there is no information available about the other side of the connection. This information may be provided later via a ModifyConnection call.

Mode indicates the mode of operation for this side of the connection. The options are: FullDuplex, ReceiveOnly, SendOnly, Inactive and Loopback

The gateway returns a ConnectionId, which uniquely identifies the connection within one end point, and a LocalConnectionDescriptor, which is a session description that contains information about addresses and RTP ports, as defined in SDP.

After receiving a "create connection" request that did not include a remote session descriptor, a gateway is in an ambiguous situation. Because it has exported a session description parameter, it can potentially receive packets. Because it has not yet received the session description parameter of the other gateway, it does not know whether the packets that it receives have been authorized by the call agent. It must thus navigate between two risks, i.e. clipping some important announcements or listening to insane data. The behavior of the gateway is determined by the value of the Mode parameter:

Note that the mode values FullDuplex and SendOnly don’t make sense in this situation. They should be treated as ReceiveOnly and Inactive.

The RequestedEvents, RequestIdentifier, DigitMap, and SignalRequests parameters are optional. They can be used by the call agent to transmit a notification request that is executed simultaneously with the creation of the connection. For example, when the call agent wants to initiate a call to an access gateway, it should:

This can be accomplished in a single create connection request, by also transmitting the requested event parameters, for the off hook event, and the signal request parameter, for the ringing signal.

When these parameters are present, the creation and the notification requests should be synchronized, which means that both should be accepted, or both refused. In our example, the create connection may be refused if the gateway does not have sufficient resources, or cannot get adequate resources from the local network access, and the off-hook notification request can be refused in the glare condition, if the user is already off-hook. In this example, the phone should not ring if the circuit cannot be established, and the circuit should not be established if the user is already off hook.
 

2.3.4 ModifyConnection

This function is used to modify the characteristics of a gateway’s "view" of a connection. This "view" of the call includes both the local connection descriptors as well as the remote connection descriptor.

[LocalConnectionDescriptor] <--- ModifyConnection(CallId,
 EndpointId,
 

 

The parameters used are the same as in the CreateConnection function, with the addition of a ConnectionId that identifies the connection within the call. This parameter is returned by the CreateConnection function, as part of the local connection descriptor. It uniquely identifies the connection within the call.

The ModifyConnection command can be used to affect parameters of a connection in the following ways:

Connections can only be activated if the remote connection descriptor has been provided to the gateway.

The command will only return a LocalConnectionDescriptor if the local connection parameters, such as RTP ports, were modified. (Usage of this feature is actually for further study.)

The RequestedEvents, RequestIdentifier, DigitMap, and SignalRequests parameters are optional. They can be used by the call agent to transmit a notification request that is executed simultaneously with the modification of the connection. For example, when a connection is accepted, the calling gateway should be instructed to place the circuit in send-receive mode and to stop providing ringing tones.

This can be accomplished in a single modify connection request, by also transmitting the requested event parameters, for the on hook event, and an empty signal request parameter, to stop the provision of ringing tones.

When these parameters are present, the modification and the notification requests should be synchronized, which means that both should be accepted, or both refused.

2.3.5 DeleteConnection (from the call agent)

This function is used to terminate a connection. As a side effect, it collects statistics on the execution of the connection.

In the general case where a connection has two ends, this command has to be sent to both gateways involved in the connection. Some connections, however, may use IP multicast. In this case, they can be deleted individually.

After the connection has been deleted, the end point should be placed in inactive mode. Any loopback that has been requested for the connection should be cancelled.

In response to the Delete request, the gateway returns a list of parameters that describe the status of the connection. These parameters are:

Number of packets sent:

The total number of RTP data packets transmitted by the sender since starting transmission on this connection. The count is not reset if the sender changes its SSRC identifier, for example as a result of a Modify command. The value is zero if the connection was set in "receive only" mode.

Number of octets sent:

The total number of payload octets (i.e., not including header or padding) transmitted in RTP data packets by the sender since starting transmission on this connection. The count is not reset if the sender changes its SSRC identifier, for example as a result of a Modify command. The value is zero if the connection was set in "receive only" mode.

Number of packets received:

The total number of RTP data packets received by the sender since starting reception on this connection. The count includes packets received from different SSRC, if the sender used several values. The value is zero if the connection was set in "send only" mode.

Number of octets received:

The total number of payload octets (i.e., not including header or padding) transmitted in RTP data packets by the sender since starting transmission on this connection. The count includes packets received from different SSRC, if the sender used several values. The value is zero if the connection was set in "send only" mode.

Number of packets lost:

The total number of RTP data packets that have been lost since the beginning of reception. This number is defined to be the number of packets expected less the number of packets actually received, where the number of packets received includes any which are late or duplicates. The count includes packets received from different SSRC, if the sender used several values. Thus packets that arrive late are not counted as lost, and the loss may be negative if there are duplicates. The count includes packets received from different SSRC, if the sender used several values. The number of packets expected is defined to be the extended last sequence number received, as defined next, less the initial sequence number received. The count includes packets received from different SSRC, if the sender used several values. The value is zero if the connection was set in "send only" mode.

Interarrival jitter:

An estimate of the statistical variance of the RTP data packet interarrival time, measured in milliseconds and expressed as an unsigned integer. The interarrival jitter J is defined to be the mean deviation (smoothed absolute value) of the difference D in packet spacing at the receiver compared to the sender for a pair of packets. Detailed computation algorithms are found in RFC 1889. The count includes packets received from different SSRC, if the sender used several values. The value is zero if the connection was set in "send only" mode.

Average transmission delay:

An estimate of the network latency, expressed in milliseconds. This is the average value of the difference between the NTP timestamp indicated by the senders of the RTCP messages and the NTP timestamp of the receivers, measured when this messages are received. The average is obtained by summing all the estimates, then dividing by the number of RTCP messages that have been received.

For a detailed definition of these variables, refer to RFC 1889.

The NotifiedEntity, RequestedEvents, RequestIdentifier, DigitMap, and SignalRequests parameters are optional. They can be used by the call agent to transmit a notification request that is executed simultaneously with the deletion of the connection. For example, when a user hangs up is accepted, the gateway should be instructed to delete the connection and to start looking for an off hook event.

This can be accomplished in a single delete connection request, by also transmitting the requested event parameters, for the off hook event, and an empty signal request parameter.

When these parameters are present, the deletion and the notification requests should be synchronized, which means that both should be accepted, or both refused.

2.3.6 DeleteConnection (from the VoIP gateway)

In some circumstances, a gateway may have to clear a connection, for example because it has lost the resource associated with the connection, or because it has detected that the end point no longer is capable or willing to send or receive voice. The gateway terminates the connection by using a variant of the Delete Connection request:
 

In addition to the call, endpoint and connection identifiers, the gateway will also send the call’s parameters that would have been returned to the call agent in response to a Delete Connection request. The reason code indicates the cause of the disconnection.

2.3.7 DeleteConnection (multiple connections, from the call agent)

A variation of the Delete Connection function can be used by the call agent to delete multiple connections at the same time. The command can be used to delete all connections that relate to a Call for an end point:
  It can also be used to delete all connections that terminate in a given end point:
  After the connections have been deleted, the end point should be placed in inactive mode. Any loopback that has been requested for the connections should be cancelled.

This command does not return any individual statistics or call parameters.
 

2.4 Race conditions

In order to implement proper call signalling, the Call Agent must keep track of the state of the gateway. A key element of this state is the position of the hook. A race condition may occur when the user decides to go off-hook before the call agent has the time to ask the gateway to notify an off hook event (the "glare" condition well known in telephony), or if the user goes on-hook before the call agent has the time to request the event's notification.

To avoid this race condition, the gateway should check the condition of the end point before acknowledging a notification request. It should return an error:

  1. If the gateway is requested to notify an "off hook" transition while the phone is already off hook,
  2. If the gateway is requested to notify an "on hook" or "flash hook" condition while the phone is already on hook.
The other state variables of the gateway, such as the list of requested event or list of requested signals, are entirely replaced after each successful notification request, which prevents any long term discrepancy between the call agent and the gateway.

When a notification request is unsuccessful, the list of requested events and requested signals are emptied. They must be reinstated by a new request.

Another race condition may occur when a notification is issued shortly before the reception by the gateway of a notification request. The request identifier is used to correlate responses with notifications.

2.5 Return codes and error codes.

All SGCP requests are acknowledged. The acknowledgment carries a return code, which indicates the status of the request. The return code is an integer number, for which three ranges of values have been defined: The values that have been already defined are listed in the following table:
 
Code Meaning
200 The requested transaction was executed normally.
250 The connection was deleted.
400 The transaction could not be executed, due to a transient error.
401 The phone is already off hook
402 The phone is already on hook
500 The transaction could not be executed, because the end-point is unknown.
501 The transaction could not be executed, because the end-point is not ready.
502 The transaction could not be executed, because the end-point does not have sufficient resources
510 The transaction could not be executed, because a protocol error was detected.
 
 

3. Simple Gateway Control Protocol

The SGCP implements the simple gateway control interface as a set of transactions. The transactions are composed of a request and a mandatory response. There are five types of request: The first four requests are sent by the call agent to a gateway. The Notify request is sent by the gateway to the call agent. The gateway may also send a DeleteConnection as defined in 2.3.6.
 

3.1 General description

All requests are composed of a Request header, optionally followed by a session description.

All responses are composed of a Response header, optionally followed by a session description.

Headers and session descriptions are encoded as a set of text lines, separated by a line feed character. The headers are separated from the session description by an empty line.

SGCP uses a transaction identifier to correlate requests and responses. The transaction identifier is encoded as a component of the request header and repeated as a component of the response header (see section 3.2.1, 3.2.1.2 and 3.3).

Transaction identifiers have values between 1 and 999999999. An SGCP entity shall not reuse an identifier sooner than 3 minutes after completion of the previous request in which the identifier was used.
 

3.2 Request Header

The request header is composed of:

3.2.1 Request line

The request line is composed of: These four items are encoded as strings of printable ASCII characters, separated by white spaces, i.e. the ASCII space (0x20) or tabulation (0x09) characters.

3.2.1.1 Coding of the requested verb

The five verbs that can be requested are encoded as four letter upper or lower case ASCII codes (comparisons should be case insensitive) as defined in the following table:
 
Verb Code
Create Connection CRCX
Modify Connection MDCX
Delete Connection DLCX
Notification Request RQNT
Notify NTFY
 

The transaction identifier is encoded as a string of up to 9 decimal digits. In the request lines, it immediately follows the coding of the verb.

New verbs may be defined in further versions of the protocol. It may be necessary, for experimentation purposes, to use new verbs before they are sanctioned in a published version of this protocol. Experimental verbs should be identified by a four letter code starting by the letter X, such as for example XPER.

3.2.2.1 Coding of the endpoint names

The end point names are encoded as e-mail addresses, as defined in RFC 821. In these addresses, the domain name identifies the system where the end point is located, while the left side identifies a specific end point on that system.

Examples of such addresses can be:
 
123456@gw23.whatever.net Circuit number 123456 in the Gateway 23 of the "Whatever" network
Call-agent@ca.whatever.net Call agent for the whatever network
Busy-signal@ann12.whatever.net The "busy signal" virtual end point in the announcement server number 12.
 
The name of notified entities is expressed with the same syntax, with the possible addition of a port number as in:
 

3.2.2.2 Coding of the protocol version

The protocol version is coded as the key word SGCP followed by a white space and the version number. The version number is composed of a major version, coded by a decimal number, a dot, and a minor version number, coded as a decimal number. In the initial messages, the version will be coded as:
SGCP 1.0
 

3.2.3 Parameter lines

Parameter lines are composed of a parameter name, which in most cases is composed of a single upper case character, followed by a colon, a white space and the parameter value. The parameter that can be present in requests are defined in the following table:
 
Parameter name Parameter  

code

Parameter value
Call identifier
C
Hexadecimal string, at most 32 characters
Connection identifier
I
Hexadecimal string, at most 32 characters
Notified Entity
N
An identifier, in RFC 821 format, composed of an arbitrary string and of the domain name of the requesting entity, possibly completed by a port number, as in:  Call-agent@ca.whatever.net:5234
Request identifier
X
Hexadecimal string, at most 32 characters
Local Connection Options
L
See description
Connection mode
M
See description
Requested Events
R
See description
Signal Requests
S
See description
Digit map 
D
A text encoding of a digit map
Observed Events
O
See description
Connection parameters
P
See description
Reason Code
E
An arbitrary character string
 
The parameters are not necessarily present in all requests. The following table provides the association between parameters and requests. The letter M stands for mandatory, O for optional and F for forbidden.
 
Parameter name CRCX MDCX DLCX RQNT NTFY
Call identifier
M
M
O
F
F
Connection identifier
F
M
O
F
F
Request identifier
O
O
O
M
M
Local connection options
O
M
F
F
F
Connection mode
M
M
F
F
F
Requested Events
O
O
O
O*
F
Signal Requests
O
O
O
O*
F
Notified Entity
O
O
O
O
O
ObservedEvent
F
F
F
F
M
Digit map 
O
O
O
O
F
Reason Code
F
F
O
F
F
Connection parameters
F
F
O
F
F
 
Note (*) that the Requested Events and Signal Requests parameters are optional in the notification request. If these parameters are omitted, the corresponding lists will be considered empty.
 

3.2.3.1 Local connection options

The local connection options describe the operational parameters that the call agent suggests to the gateway. These parameters are: Each of the parameters is optional. When several parameters are present, the values are separated by a comma.

Examples of connection descriptors are:

L: p:10, a:G.711

L: p:10, a:G.711;G.726-32

L: p:10-20, b: 64

L: b:32-64, e:off

3.2.3.2 Connection parameters

Connection parameters are encoded as a string of type and value pairs, where the type is a two letter identifier of the parameter, and the value a decimal integer. Types are separated from value by an ‘=’ sign. Parameters are encoded from each other by a comma.

The connection parameter types are specified in the following table:
 
Connection parameter name Parameter  

Code

Connection parameter value
Packets sent
PS
The number of packets that were sent on the connection.
Octets sent
OS
The number of octets that were sent on the connection.
Packets received
PR
The number of packets that were received on the connection.
Octets received
RO
The number of octets that were received on the connection.
Packets lost
PL
The number of packets that were not received on the connection, as deduced from gaps in the sequence number.
Jitter
JI
The average inter-packet arrival jitter, in milliseconds, expressed as an integer number.
Latency
LA
Average latency, in milliseconds, expressed as an integer number.
 
An example of connection parameter encoding is:
 

3.2.3.3 Connection mode

The connection mode describes the mode of operation of the connection. The possible values are:
 
Mode Meaning
M: sendonly The gateway should only send packets
M: recvonly The gateway should only receive packets
M: sendrecv The gateway should only send and receive packets
M: inactive The gateway should neither send nor receive packets
M: loopback The gateway should place the circuit in loopback mode.
M: conttest The gateway should place the circuit in test mode.
 

3.2.3.4 RequestedEvents

The requested event parameter provides the list of events that have been requested. Each event is identified by a code, as indicated in the following table. These ASCII encodings are not case sensitive. Values such as "hu", "Hu", "HU" or "hU" should be considered equal.
 
Event
Code
Fax tones
Ft
Modem tones
Mt
Continuity tone
Co
Continuity detected (verified)
Cv
On-hook transition
Hu
Off-hook transition
Hd
Flash hook
Hf
Digit collection
Individual digits (e.g. "#"), timers ("T")
or ranges (e.g. "[0-9]" or "[0-9*#T]")
 

Each event can be qualified by a requested action, or by a list of actions. The actions, when specified, are encoded as a list of keywords, enclosed in parenthesis and separated by commas. The codes for the various events are:
 
Action Code
Notify immediately
N
Accumulate
A
Treat according to digit map
D
Swap
S
Ignore
I
 

When no action is specified, the default action is to notify the event. This means that, for example, ft and ft(N) are equivalent. Events that are not listed are ignored.

The digit-map action can only be specified for the digits, letters and timers.

The requested list is encoded on a single line, with event/action groups separated by commas. Examples of requested events encoding are:

3.2.3.5 Signal Requests

The Signal Requests parameter provides the name of the signals that have been requested. Each signal is identified by a code, as indicated in the following table.
 
Signal
Code
Ringing
rg
Distinctive ringing (0 .. 7)
r0, r1,r2, r3, r4, r5, r6 or r7
Ring back tone
rt
Dial tone
dt
Intercept tone
it
Network Congestion tone
ct
Busy tone
bt
Confirm tone
ft
Answer tone
at
Call waiting tone
wt
Off hook warning tone
ot
Preemption tone
pt
Continuity tone
ct
Continuity test
co
DTMF tones
A string composed of the individual digits that should be played on the end point.
ASDI display
The keyword "ad", followed by the string that should be displayed, encapsulated between parentheses as in:
Ad(123456 Your friend)
 

3.2.3.6 ObservedEvent

The observed event parameters provides the list of events that have been observed. The event codes are the same as those used in the notification request. Events that have been accumulated according to the digit map are grouped in a single string. Examples of observed actions are:

3.3 Format of response headers

The response header is composed of a response line, optionally followed by headers that encode the response parameters.

The response line starts with the response code, which is a three digit numeric value. The code is followed by a white space, the transaction identifier, and an optional commentary.

In the case of a create connection message, the response line is followed by a Connection-Id parameter.

In the case of a delete connection message, the response line is followed by a Connection Parameters parameter, as defined in section 3.2.3.2.

A session description should be transmitted with a positive response (code 200) to a create connection. It may be transmitted in response to a modify connection request, if the modification resulted in a modification of the session parameters.
 

3.4 Encoding of the session description

The session description is encoded in conformance with the session description protocol, SDP. SGCP implementations are expected to be fully capable of parsing any conformant SDP message, and should send session descriptions that strictly conform to the SDP standard. However, in a telephony gateway, we only have to describe sessions that use exactly one media, audio. The parameters of SDP that are relevant for our application are:
  For the audio media: There is a request, in some environments, to use the SGCP to negotiate connections that will use other transmission channels than RTP over UDP and IP. This will be detailed in an extension to this document.
 

3.5 Transmission over UDP

SGCP messages are transmitted over UDP. Requests are sent to one of the IP addresses defined in the DNS for the specified end point. The responses are sent back to the source address of the requests.

SGCP messages, being carried over UDP, may be subject to losses. In the absence of a timely response, requests are repeated. SGCP entities are expected to keep in memory a list of the responses that they sent to recent transactions, i.e. a list of all the responses they sent over the last 30 seconds, and a list of the transactions that are currently being executed. The transaction identifiers of incoming requests are compared to the transaction identifiers of the recent responses. If a match is found, the SGCP entity does not execute the transaction, but simply repeats the response. The remaining requests will be compared to the list of current transaction. If a match is found, the SGCP entity does not execute the transaction, which is simply ignored.

It is the responsibility of the requesting entity to provide suitable time outs for all outstanding requests, and to retry requests when time outs have been exceeded. Furthermore, when repeated requests fail to be acknowledged, it is the responsibility of the requesting entity to seek redundant services and/or clear existing or pending connections.
 

4. Security requirements

If unauthorized entities could use the SGCP, they would be able to set-up unauthorized calls, or to interfere with authorized calls. We expect that SGCP messages will always be carried over secure Internet connections, as defined in the IP security architecture as defined in RFC 1825, using either the IP Authentication Header, defined in RFC 1826, or the IP Encapsulating Security Payload, defined in RFC 1827. The complete SGCP protocol stack would thus include the following layers:

SGCP
UDP
IP security (authentication or encryption)
IP
transmission media

Adequate protection of the connections will be achieved if the gateways and the call agents only accept messages for which IP security provided an authentication service. An encryption service will provide additional protection against eavesdropping, thus forbidding third parties from monitoring the connections set up by a given end point.

The encryption service will also be requested if the session descriptions are used to carry session keys, as defined in SDP.
 

5. Example of call flows

In order to understand the way the SGCP interface will be used, we have described here two possible call flows between a TGW, which is a trunking gateway that implements SGCP, and an RGW, which is a residential gateway that implements SGCP.

The diagrams also show a Common Data Base (CDB) that can be queried for authorization and routing information, and an Accounting Gateway (ACC) that collects accounting information at the start and the end of calls.

These diagrams are solely meant to exhibit the behavior of the SGCP, and to help understanding this protocol. They are not meant as a tutorial on the implementation of a call agent. They may very well include miscellaneous errors and imprecisions.
 

5.1 Basic call, RGW to TGW

 
Usr RGW CA CDB ACC TGW SS7/ISUP CO
 
<-
Notification Request          
 
Ack
->          
Off-hook
Notify
->          
 
<-
Ack          
(Dial-tone)
<-
Notification Request          
 
Ack
->          
Digit
Notify
->          
 
<-
Ack          
(progress)
<-
Notification Request          
 
Ack
->          
 
<-
Create Connection          
 
Ack
->          
   
Query
(E.164 S,D)
->        
   
<-
IP        
   
Create Connection
- - - - - - ->    
          (cut in)    
   
<-
- - - - - - ack    
   
IAM
- - - - - - - - - ->  
 
<-
Modify Connection      
IAM
->
 
Ack
->      
<-
ACM
   
<-
- - -
- - - - - - ACM  
 
<-
Notification Request          
 
Ack
->          
           
<-
ANM
   
<-
- - -
- - - - - - ANM  
 
<-
Notification Request          
 
Ack
->          
 
<-
Modify Connection          
 
Ack
->          
 
(cut in)
Call start
- - - - >      
           
<-
REL
   
<-
- - -
- - - - - - REL  
 
<-
Delete Connection          
   
Delete Connection
- - - - - - ->    
 
Perf
Data
->          
   
<-
- - -
- - -
perf data    
   
Call end
- - -
->      
On-hook
Notify
->          
 
<-
Ack          
 
<-
Notification Request
         
 
Ack
->          
 

During these exchanges the SGCP is used by the call agent to control both the TGW and the residential gateway. The exchanges occur on two sides.

The first command is a notification request, sent by the call agent to the residential gateway. The request will consist of the following lines:

RQNT 1201 endpoint-1@rgw-2567.whatever.net SGCP 1.0
N: ca@ca1.whatever.net:5678
X: 0123456789AB
R: hd
The gateway, at that point, is instructed to look for an off-hook event, and to report it. It will first acknowledge the request, repeating in the acknowledgement message the transaction id that the call agent attached to the query. 200 1201 OKWhen the off hook event is noticed, the gateway initiates a notification request to the call agent: NTFY 2001 endpoint-1@rgw-2567.whatever.net SGCP 1.0
N: ca@ca1.whatever.net:5678
X: 0123456789AB
O: hd
The call agent immediately acknowledges that notification. 200 2001 OKThe call agent examines the services associated to an off hook action (it could take special actions in the case of a direct line). In most cases, it will send a notification request, asking for more digits. The current example provides the gateway with a permanent digit map, and request the gateway to play a dialtone: RQNT 1202 endpoint-1@rgw-2567.whatever.net SGCP 1.0
N: ca@ca1.whatever.net:5678
X: 0123456789AC
R: hu, [0-9#*T](D)
D: (0T | 00T | [1-7]xxx | 8xxxxxxx | #xxxxxxx | *xx | 91xxxxxxxxxx | 9011x.T)
S: dt
The gateway immediately acknowledges that request. 200 1202 OKThe gateway will start accumulating digits according to that digit map. When it has noticed a sufficient set of values, it will notify the observed string to the call agent: NTFY 2002 endpoint-1@rgw-2567.whatever.net SGCP 1.0
N: ca@ca1.whatever.net:5678
X: 0123456789AC
O: 912018294266
The call agent immediately acknowledges that notification. 200 2002 OKAt this stage, the call agent will send a notification request, to stop collecting digits yet continue watch for an on-hook transition: RQNT 1203 endpoint-1@rgw-2567.whatever.net SGCP 1.0
X: 0123456789AD
R: hu
The call agent immediately acknowledges that request. 200 1203 OKThe call agent will then seize the incoming circuit, creating a connection: CRCX 1204 endpoint-1@rgw-2567.whatever.net SGCP 1.0
C: A3C47F21456789F0
L: p:10, a:G.711;G.726-32
M: recvonly
The gateway immediately acknowledges the creation, sending back the identification of the newly created connection and the session description used to receive audio data: 200 1204 OK
I:FDE234C8

v=0
c=IN IP4 128.96.41.1
m=audio 3456 RTP/AVP 0 96
a=rtpmap:96 G726-32/8000

The SDP announcement, in our example, specifies the address at which the gateway is ready to receive audio data (128.96.41.1), the transport protocol (RTP), the RTP port (3456) and the audio profile (AVP). The audio profile refers to RFC 1890, which defines that the payload type 0 has been assigned for G.711 transmission. The gateway is also ready to use ADPCM encoding at 32 kbps (G.726 –4). There is no standard payload type associated to ADPCM, so the gateway mentions its readiness to use a non standard payload associated to the dynamic type 96. The "rtpmap" attribute entry associates the payload type 96 to G726-32.

The call agent, having seized the incoming trunk and completed a routing look up to identify the outgoing gateway, must now seize the outgoing trunk. It does so by sending a connection request to the e-gress gateway:

CRCX 1205 card23/21@trgw-7.whatever.net SGCP 1.0
C: A3C47F21456789F0
L: p:10, a:G.711;G.726-32
M: sendrecv

v=0
c=IN IP4 128.96.41.1
m=audio 3456 RTP/AVP 0 96
a=rtpmap:96 G726-32/8000

The create connection command has the same parameters as the command sent to the ingress gateway, with two differences: We observe that the call identifier is identical for the two connections. This is normal: the two connections belong to the same call, which has a global identifier in our system.

The trunking gateway will acknowledge the connection request, sending in the session description its own parameters such as address, ports and RTP profile:

200 1205 OK
I:32F345E2

v=0
c=IN IP4 128.96.63.25
m=audio 1297 RTP/AVP 0 96
a=rtpmap:96 G726-32/8000

The call agent will relay the information to the ingress gateway, using a Modify Connection request: MDCX 1206 endpoint-1@rgw-2567.whatever.net SGCP 1.0
C: A3C47F21456789F0
I:FDE234C8
M: recvonly

v=0
c=IN IP4 128.96.63.25
m=audio 1297 RTP/AVP 0 96
a=rtpmap:96 G726-32/8000

The gateway immediately acknowledges the modification: 200 1206 OKAt that stage, we have established a half duplex transmission path. The phone attached to the RGW will be able to receive the signals, such as tones or announcements, that the remote switch may send through the trunking gateway.

When the call progresses, the call agent will receive from the remote switch progress messages, for example an "address complete" message (ACM). The call agent will analyze the message to determine whether signal are transmitted in band. If this is not the case, the call agent will instruct the RGW to generate ringing tones by sending a notification request:

RQNT 1207 endpoint-1@rgw-2567.whatever.net SGCP 1.0
X: 0123456789AE
R: hu
S: rt
The gateway immediately acknowledges the request: 200 1207 OKAfter the remote user goes off hook, the call agent will receive an answering message (ANM) from the remote switch. At that point, it will send a notification request to the gateway, to stop the ringing tones, and a modification message, to place the connection in full duplex mode: RQNT 1208 endpoint-1@rgw-2567.whatever.net SGCP 1.0
X: 0123456789AF
R: hu

MDCX 1209 endpoint-1@rgw-2567.whatever.net SGCP 1.0
C: A3C47F21456789F0
I:FDE234C8
M: sendrecv

The gateway will acknowledge these two requests: 200 1208 OK

200 1209 OK

At this point, the connection is established.

After some time, the call agent will have to tear down the call. It will do so by sending to both gateways a delete connection request:

DLCX 1210 endpoint-1@rgw-2567.whatever.net SGCP 1.0
C: A3C47F21456789F0
I:FDE234C8

DLCX 1211 card23/21@trgw-7.whatever.net SGCP 1.0
C: A3C47F21456789F0
I:32F345E2 

The gateways will respond with a message that should include a "call parameters" header fields: 250 1210 OK
P: PS=1245, OS=62345, PR=780, OR=45123, PL=10, JI=27, LA=48

250 1211 OK
P: PS=790, OS=45700, PR=1230, OR=61875, PL=15, JI=27, LA=48

At this point, the user, in our scenario, hangs up the call. This event is notified to the call agent, according to the policy received in the last notification request: NTFY 2005 endpoint-1@rgw-2567.whatever.net SGCP 1.0
X: 0123456789AF
O: hu
After this notification, the call agent should send an acknowledgement: 200 2005 OKIt should then issue a new notification request, to be ready to detect the next call issued by the residential gateway: RQNT 1212 endpoint-1@rgw-2567.whatever.net SGCP 1.0
X: 0123456789B0
R: hd
The gateway will acknowledge this message: 200 1212 OKBoth gateways, at this point, are ready for the next call.
 

5.2 Basic call, TGW to RGW

 
CO SS7/ISUP TGW CA CDB ACC RGW Usr
IAM ->            
 
IAM
- - -
->        
      Check ->      
     
<-
IP      
   
<-
Create 

Connection

       
   
Ack
->        
     
Create
Connection
- - - - - - ->  
     
<-
- - - - - - Ack  
   
<-
Modify 

Connection

       
   
Ack
->        
     
Notification
Request
- - - - - - -> ring
     
<-
- - - - - - Ack  
 
<-
- - - ACM        
<-
ACM            
              off hook
     
<-
- - - - - - Notify  
     
Ack
- - - - - - ->  
     
Notification
Request
- - - - - - ->  
     
<-
- - - - - - Ack  
   
<-
Modify  

Connection 

       
   
Ack
->        
   
(cut-in)
Call start  - - - - >    
 
<-
- - - ANM        
<-
ANM            
              on hook
     
<-
- - - - - - Notify  
     
Ack
- - - - - - ->  
     
Delete
Connection
- - - - - - ->  
   
<-
Delete 

Connection

       
 
<-
- - - REL        
<-
REL            
   
Perf
data
->        
     
<-
- - -
- - -
perf data  
     
Call end
- - -
- >    
     
Notification
Request
- - -
- - -
->  
     
<-
- - -
- - -
Ack  
This diagram shows the various exchange of messages during a call from a telephone user to a residential user. During these exchanges the SGCP is used by the call agent to control both the TGW and the residential gateway. The exchanges occur on two sides.

Upon reception of the IAM message, the call agent will immediately seize the incoming trunk, creating a connection:

CRCX 1237 card23/21@trgw-7.whatever.net SGCP 1.0
C: A3C47F21456789F0
L: p:10, a:G.711;G.726-32
M: recvonly
The gateway immediately acknowledges the creation, sending back the identification of the newly created connection and the session description used to receive audio data: 200 1237 OK
I: FDE234C8

v=0
c=IN IP4 128.96.41.1
m=audio 3456 RTP/AVP 0 96
a=rtpmap:96 G726-32/8000

The SDP announcement, in our example, specifies the address at which the gateway is ready to receive audio data (128.96.41.1), the transport protocol (RTP), the RTP port (3456) and the audio profile (AVP). The audio profile refers to RFC 1890, which defines that the payload type 0 has been assigned for G.711 transmission. The gateway is also ready to use ADPCM encoding at 32 kbps (G.726 –4). There is no standard payload type associated to ADPCM, so the gateway mentions its readiness to use a non standard payload associated to the dynamic type 96. The "rtpmap" attribute entry associates the payload type 96 to G726/4.

The call agent, having seized the incoming trunk, must now reserve the outgoing circuit. It does so by sending a connection request to the residential gateway:

CRCX 1238 endpoint-1@rgw-2567.whatever.net SGCP 1.0
C: A3C47F21456789F0
L: p:10, a:G.711;G.726-32
M: sendrecv

v=0
c=IN IP4 128.96.41.1
m=audio 3456 RTP/AVP 0 96
a=rtpmap:96 G726-32/8000

The create connection command has the same parameters as the command sent to the ingress gateway, with two differences: We observe that the call identifier is identical for the two connections. This is normal: the two connection belong to the same call, which has a global identifier in our system.

The trunking gateway will acknowledge the connection request, sending in the session description its own parameters such as address, ports and RTP profile:

200 1238 OK
I:32F345E2

v=0
c=IN IP4 128.96.63.25
m=audio 1297 RTP/AVP 0 96
a=rtpmap:96 G726-32/8000

The call agent will relay the information to the ingress gateway, using a Modify Connection request: MDCX 1239 card23/21@trgw-7.whatever.net SGCP 1.0
C: A3C47F21456789F0
I:FDE234C8
M: recvonly

v=0
c=IN IP4 128.96.63.25
m=audio 1297 RTP/AVP 0 96
a=rtpmap:96 G726-32/8000

The gateway immediately acknowledges the modification: 200 1239 OKAt that stage, we have established a half-duplex transmission path. The call agent must now ring the residential gateway. It will send a notification request, which will consist of the following lines: RQNT 1240 endpoint-1@rgw-2567.whatever.net SGCP 1.0
X: 0123456789B1
R: hd
S: rg
The gateway, at that point, is instructed to look for an off-hook event, and to report it. It will first acknowledge the request, repeating in the acknowledgement message the transaction id that the call agent attached to the query. 200 1240 OKUpon reception of this message, the call agent sends an address complete message (ACM) to the calling switch, which will generate ringing tones for the calling user.

When the off hook event is noticed, the gateway initiates a notification request to the call agent:

NTFY 2001 endpoint-1@rgw-2567.whatever.net SGCP 1.0
X: 0123456789B0
O: hd
The call agent immediately acknowledges that notification. 200 2001 OKThe call agent must now ask the residential gateway to notify the occurrence of an on-hook event. It does so by sending a notification request to the residential gateway: RQNT 1241 endpoint-1@rgw-2567.whatever.net SGCP 1.0
X: 0123456789B1
R: hu
The gateway acknowledges that request:
 

In parallel, the call agent will send a modification request to the trunking gateway, to place the connection in full duplex mode:

MDCX 1242 card23/21@trgw-7.whatever.net SGCP 1.0
C: A3C47F21456789F0
I:FDE234C8
M: sendrecv
The trunking gateway will acknowledge that request: The call agent can now send an answer message (ANM) to the calling switch.

After some time, the call agent will have to tear down the call. In our example, this is triggered by the residential user, who hangs up. The notify request is sent to the call agent:

NTFY 2005 endpoint-1@rgw-2567.whatever.net SGCP 1.0
X: 0123456789B1
O: hu
The call agent acknowledges the notification.

        200 2005 OK

It will then send to both gateways a delete connection request:

DLCX 1243 endpoint-1@rgw-2567.whatever.net SGCP 1.0
C: A3C47F21456789F0
I:FDE234C8

DLCX 1244 card23/21@trgw-7.whatever.net SGCP 1.0
C: A3C47F21456789F0
I:32F345E2

The gateways will respond with a message that should include a "call parameters" header fields: 200 1243 OK
P: PS=1245, OS=62345, PR=780, OR=45123, PL=10, JI=27, LA=48

200 1244 OK
P: PS=790, OS=45700, PR=1230, OR=61875, PL=15, JI=27, LA=48

The gateway should now issue a new notification request, to be ready to detect the next call issued by the residential gateway: RQNT 1245 endpoint-1@rgw-2567.whatever.net SGCP 1.0
X: 0123456789B2
R: hd
The call agent will acknowledge this request: 200 1245 OKBoth gateways, at this point, are ready for the next call.
 

6. References