# NMS_V5DeleteChannel

Removes an HDLC channel from a provisioned active variant on a specified interface.

#### Prototype

NMS_V5_RESULT_T NMS_V5DeleteChannel ( NMS_V5_INTERFACE_ID_T interfaceId, NMS_V5_CHANNEL_LOCATION_T channel_loc)

Argument | Description
interfaceId | Interface ID of a provisioned interface.
channel_loc | HDLC channel location specified by the following structure: typedef union _NMS_V5_CHANNEL_LOCATION_T { struct { DWORD boardNb; DWORD trunkNb; DWORD timeslotNb; } CG; }NMS_V5_CHANNEL_LOCATION_T See the Details section for field descriptions.

#### Return values

Return value | Description
NMSV5_SUCCESS |
NMSV5_INTERNAL_FAILURE | Internal failure. Refer to the trace log for more information.
NMSV5_INVALID_CHANNEL | Specified HDLC channel is not provisioned on the specified interface.
NMSV5_INVALID_INTERFACE_ID | Specified interface is not provisioned.
NMSV5_NOT_INITIALIZED | NMS V5 library was not initialized with NMS_V5Initialize.

#### Details

NMS_V5DeleteChannel removes an HDLC link (usually associated with ISDN data over V5.2 interface) from an active variant of a provisioned interface without requiring the application to re-provision the interface. NMS_V5DeleteChannel stops and destroys the specified HDLC channel and destroys the switch connections made for this channel between an E1 channel location and a DSP processing HDLC data. NMS_V5DeleteChannel does not affect the operation of other HDLC channels and E1 links provisioned on this interface.

The NMS_V5_CHANNEL_LOCATION_T structure includes the following fields:

Field | Description
boardNb | Logical board number where an HDLC instance is located (as defined by NMS OAM).
trunkNb | Logical trunk number associated with the HDLC channel (as defined by NMS OAM).
TimeslotNb | Physical timeslot associated with the HDLC channel.

#### See also

NMS_V5AddChannel, NMS_V5AddE1, NMS_V5DeleteE1

#### Example

void DeleteChannel( void )
{
NMS_V5_RESULT_T NmsResult;
DWORD InterfaceId;
NMS_V5_CHANNEL_LOCATION_T NMSChannelLoc;
printf("NMS_V5DeleteChannel:\n");
/* Get parameters */
promptdw_nodft("Enter interfaceId", &InterfaceId);
/* Ask for channel location parameters */
GetChannelLocationNMS( &NMSChannelLoc );
NmsResult = NMS_V5DeleteChannel( InterfaceId, NMSChannelLoc );
printf ("NMS_V5DeleteChannel: Result=%s\n",PRINT_RESULT(NmsResult));
}