<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">

<html>

<head>
<title>NaturalAccess GR303 and V5 Libraries Developer's Manual: Using the NMS GR303 library </title>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<meta name=NMSConversion content="4.0.8">
<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">
<link rel="stylesheet" href="dialogic_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">
<!--
if (navigator.appName !="Netscape")
{   document.write("<link rel='stylesheet' href='dialogic.css'>");}
//-->
</script>
<style type="text/css">
<!--
ul.whs1 { list-style:disc; }
table.whs2 { width:100%;   x-border-left:1px table-solid; x-border-top:1px table-solid; x-border-right:1px table-solid; x-border-bottom:1px table-solid; border-collapse:separate; border-spacing:0px; }
col.whs3 { width:6.65%; }
col.whs4 { width:93.35%; }
td.whs5 { background-color:#CCCCCC; vertical-align:top;   padding-right:10px; padding-left:10px; }
p.whs6 { font-weight:bold; }
td.whs7 { background-color:#ffffff; vertical-align:top;   padding-right:10px; padding-left:10px; }
img_whs8 { float:none; width:537px; height:523px; border-style:none; }
table.whs9 {   x-border-left:1px table-solid; x-border-top:1px table-solid; x-border-right:1px table-solid; x-border-bottom:1px table-solid; border-collapse:separate; border-spacing:0px; }
tr.whs10 { background-color:#CCCCCC; x-cell-content-align:top; vertical-align:top; }
td.whs11 { vertical-align:top; padding-left:5px;  padding-right:5px;  }
tr.whs12 { x-cell-content-align:top; vertical-align:top; }
div.whs13 { width:100%; }
p.whs14 { text-align:center; }
p.whs15 { text-align:center; font-size:xx-small; }
-->
</style><script type="text/javascript" language="JavaScript">
<!--
if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
{
  var strNSS = "<style type='text/css'>";
  strNSS += "p.whs15 {font-size:x-small; }";
  strNSS +="</style>";
  document.write(strNSS);
}
//-->
</script>
<script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
<!--
function reDo() {
  if (innerWidth != origWidth || innerHeight != origHeight)
     location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
	origWidth = innerWidth;
	origHeight = innerHeight;
	onresize = reDo;
}
onerror = null; 
//-->
</script>
<style type="text/css">
<!--
div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }
-->
</style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
<script type="text/javascript" language="javascript" src="whver.js"></script>
<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
</head>
<body><script type="text/javascript" language="javascript1.2">
<!--
if (window.gbWhTopic)
{
	if (window.addTocInfo)
	{
	addTocInfo("NMS GR303 programming model\nUsing the NMS GR303 library");
addAvenueInfo("Untitled","developing_gr303_applications_.htm","programming_scenarios.htm");
addButton("show",BTN_TEXT,"Show table of contents for this manual","","","","",0,0,"","","");

	}
	if (window.writeBtnStyle)
		writeBtnStyle();

	if (window.writeIntopicBar)
		writeIntopicBar(1);

	if (window.setRelStartPage)
	{
	setRelStartPage("default.htm");

		autoSync(1);
		sendSyncInfo();
		sendAveInfoOut();
	}
}
else
	if (window.gbIE4)
		document.location.reload();
//-->
</script>
<h1>Using 
 the NMS GR303 library</h1>

<p>This topic presents the following information:</p>

<ul type="disc" class="whs1">
	
	<li class=kadov-p><p><a href="#Initializing the NMS GR303 library">Initializing 
 the NMS GR303 library</a></p></li>
	
	<li class=kadov-p><p><a href="#Provisioning an NMS GR303 interface">Provisioning 
 an NMS GR303 interface</a></p></li>
	
	<li class=kadov-p><p><a href="#Starting and monitoring an NMS GR303 interface">Starting 
 and monitoring an NMS GR303 interface</a></p></li>
	
	<li class=kadov-p><p><a href="#Modifying an NMS GR303 interface">Modifying 
 an NMS GR303 interface</a></p></li>
	
	<li class=kadov-p><p><a href="#Re_provisioning_an_NMS_GR303_interface">Re-provisioning 
 an NMS GR303 interface</a></p></li>
	
	<li class=kadov-p><p><a href="#Sending and receiving HDLC channel data">Sending 
 and receiving HDLC channel data</a></p></li>
	
	<li class=kadov-p><p><a href="#Retrieving channel and link status information">Retrieving 
 channel and link status information</a></p></li>
	
	<li class=kadov-p><p><a href="#Stopping an NMS GR303 interface">Stopping 
 an NMS GR303 interface</a></p></li>
	
	<li class=kadov-p><p><a href="#Destroying an NMS GR303 interface">Destroying 
 an NMS GR303 interface</a></p></li>
	
	<li class=kadov-p><p><a href="#Exiting the NMS GR303 library">Exiting 
 the NMS GR303 library</a></p></li>
	
	<li class=kadov-p><p><a href="#NMS GR303 library state diagram">NMS 
 GR303 library state model</a></p></li>
</ul>

<h2><a name="Initializing the NMS GR303 library"></a>Initializing the NMS 
 GR303 library </h2>

<p>When the GR303 system starts up, invoke <a href="nmsgr303initialize.html"><span 
 style="color: #0000ff;
		font-style: normal;
		font-weight: bold;
		x-text-underline: off;
		x-text-overline: off;
		x-text-line-through: off;
		text-transform: none;
		vertical-align: baseline;
		/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303Initialize</B></font></span></a> 
 to load the NMS GR303 library, start the library's internal processing 
 tasks, and initialize its internal software structures. </p>

<p>Invoke <a href="nmsgr303settrace.html"><span style="color: #0000ff;
														font-weight: bold;
														x-text-underline: off;
														/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303SetTrace</B></font></span></a> 
 any time after loading the physical library. Arguments for <span style="font-weight: bold;"><B>NMS_GR303SetTrace</B></span> 
 specify the level of tracing performed by the library, and whether the 
 library returns tracing information to the application or logs the information 
 in a file.</p>

<h2><a name="Provisioning an NMS GR303 interface"></a>Provisioning an NMS 
 GR303 interface</h2>

<p>After initializing the NMS GR303 library, call <a href="nmsgr303provisioninterface.html"><span 
 style="color: #0000ff;
		font-weight: bold;
		x-text-underline: off;
		/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303ProvisionInterface</B></font></span></a> 
 to specify the hardware-specific HDLC channel locations, configure HDLC 
 data processing function callbacks, and allocate memory for receiving 
 data from the physical layer. The NMS GR303 library:</p>

<ul type="disc" class="whs1">
	
	<li class=kadov-p><p>Configures and resets HDLC channels on the board.</p></li>
	
	<li class=kadov-p><p>Begins monitoring DS1 links associated with HDLC 
 channels.</p></li>
	
	<li class=kadov-p><p>Resets any internal statistics structures.</p></li>
	
	<li class=kadov-p><p>Automatically sets the signaling mode to RAW for 
 timeslots occupied by the HDLC channels.</p></li>
</ul>

<p>Start the provisioned interface to enable data to flow through HDLC 
 channels. The NMS GR303 library starts to monitor DS1 links as soon as 
 the links are provisioned. Therefore, applications can call <a href="nmsgr303getds1status.html"><span 
 style="color: #0000ff;
		font-style: normal;
		font-weight: bold;
		x-text-underline: off;
		x-text-overline: off;
		x-text-line-through: off;
		text-transform: none;
		vertical-align: baseline;
		/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303GetDS1Status</B></font></span></a> 
 and <a href="nmsgr303resetds1status.html"><span style="color: #0000ff;
														font-style: normal;
														font-weight: bold;
														x-text-underline: off;
														x-text-overline: off;
														x-text-line-through: off;
														text-transform: none;
														vertical-align: baseline;
														/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303ResetDS1Status</B></font></span></a> 
 to obtain DS1 link status information or reset the status of existing 
 DS1 links.</p>

<p>NMS recommends that applications provision and start the upper layers 
 of the GR303 protocol after starting the NMS GR303 physical layer interface 
 with <a href="nmsgr303startinterface.html"><span style="color: #0000ff;
															font-weight: bold;
															x-text-underline: off;
															/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303StartInterface</B></font></span></a>. 
 In some cases, the upper layers of the stack can expect incoming HDLC 
 traffic after the interfaces are provisioned but before they are started.</p>

<p>GR303 applications must establish a mapping between the physical layer 
 structures for hardware-specific HDLC device locations and upper layer 
 GR303 protocol related structures. Because the physical layer is not aware 
 of the protocol association for each hardware resource (for example, whether 
 the DS1 link is active or standby mode, or whether a DS0 link is carrying 
 EOC or TMC data) the application should map this information for the upper 
 layers of the GR303 protocol stack.</p>

<h2><a name="Starting and monitoring an NMS GR303 interface"></a>Starting 
 and monitoring an NMS GR303 interface</h2>

<p>After provisioning the NMS GR303 interface, invoke <a href="nmsgr303startinterface.html"><span 
 style="color: #0000ff;
		font-weight: bold;
		x-text-underline: off;
		/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303StartInterface</B></font></span></a> 
 to start each interface. When the application starts the interface, the 
 HDLC channels provisioned on the interface become operational and data 
 begins to flow through the associated T1 links. When the IDT on the local 
 exchange side of the interface is connected and started, the application 
 can expect LAPD data. Invoke the <a href="nmsgr303phsenddata.html"><span 
 style="color: #0000ff;
		font-weight: bold;
		x-text-underline: off;
		/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303PhSendData</B></font></span></a> 
 to transfer data from the upper layers of the GR303 stack to the physical 
 layer. When the application invokes <span style="font-weight: bold;"><B>NMS_GR303PhSendData</B></span>, 
 the NMS GR303 library layer then sends the data to the specified HDLC 
 channel. </p>

<p>Invoke <a href="nmsgr303getds1status.html"><span style="color: #0000ff;
															font-style: normal;
															font-weight: bold;
															x-text-underline: off;
															x-text-overline: off;
															x-text-line-through: off;
															text-transform: none;
															vertical-align: baseline;
															/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303GetDS1Status</B></font></span></a> 
 and <a href="nmsgr303resetds1status.html"><span style="color: #0000ff;
														font-style: normal;
														font-weight: bold;
														x-text-underline: off;
														x-text-overline: off;
														x-text-line-through: off;
														text-transform: none;
														vertical-align: baseline;
														/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303ResetDS1Status</B></font></span></a> 
 to obtain or reset status information associated with DS1 links, and <a href="nmsgr303getchannelstatistics.html"><span style="color: #0000ff;
														font-style: normal;
														font-weight: bold;
														x-text-underline: off;
														x-text-overline: off;
														x-text-line-through: off;
														text-transform: none;
														vertical-align: baseline;
														/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303GetChannelStatistics</B></font></span></a> 
 and <a href="nmsgr303resetchannelstatistics.html"><span style="color: #0000ff;
	font-style: normal;
	font-weight: bold;
	x-text-underline: off;
	x-text-overline: off;
	x-text-line-through: off;
	text-transform: none;
	vertical-align: baseline;
	/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303ResetChannelStatistics</B></font></span></a> 
 to access or reset statistical information associated with HDLC channels. 
 </p>

<h2><a name="Modifying an NMS GR303 interface"></a>Modifying an NMS GR303 
 interface</h2>

<p>The NMS GR303 library allows the application to add or modify HDLC channel 
 locations on the interface at the physical layer without stopping and 
 re-provisioning the interface. Use <a href="nmsgr303modifychannellocation.html"><span 
 style="color: #0000ff;
		font-style: normal;
		font-weight: bold;
		x-text-underline: off;
		x-text-overline: off;
		x-text-line-through: off;
		text-transform: none;
		vertical-align: baseline;
		/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303ModifyChannelLocation</B></font></span></a> 
 to change the location of any provisioned HDLC channel or to add HDLC 
 data links to a provisioned interface (when there are less than four existing 
 provisioned channels).</p>

<p>Applications cannot remove existing channels from a provisioned interface. 
 To reduce the number of HDLC channels at the physical layer, the application 
 must destroy the existing interface, and then re-provision the interface 
 with a smaller number of channels.</p>

<h2><a name=Re_provisioning_an_NMS_GR303_interface></a>Re-provisioning 
 an NMS GR303 interface</h2>

<p>Perform the following steps to re-provision an interface:</p>

<table cellpadding="5" x-use-null-cells cellspacing="0" width="100%" border="1" class="whs2">
<col class="whs3">
<col class="whs4">

<tr>
<td bgcolor="#CCCCCC" width="6.65%" class="whs5">
<p class="whs6">Step</p></td>
<td bgcolor="#CCCCCC" width="93.35%" class="whs5">
<p class="whs6">Action</p></td></tr>

<tr>
<td bgcolor="#FFFFFF" width="6.65%" class="whs7">
<p>1</p></td>
<td bgcolor="#FFFFFF" width="93.35%" class="whs7">
<p>Stop the interface (if it is started) with <a href="nmsgr303stopinterface.html"><span 
 style="color: #0000ff;
		font-weight: bold;
		x-text-underline: off;
		/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303StopInterface</B></font></span></a>.</p></td></tr>

<tr>
<td bgcolor="#FFFFFF" width="6.65%" class="whs7">
<p>2</p></td>
<td bgcolor="#FFFFFF" width="93.35%" class="whs7">
<p>Destroy the current interface with <a href="nmsgr303destroyinterface.html"><span 
 style="color: #0000ff;
		font-weight: bold;
		x-text-underline: off;
		/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303DestroyInterface</B></font></span></a>.</p></td></tr>

<tr>
<td bgcolor="#FFFFFF" width="6.65%" class="whs7">
<p>3</p></td>
<td bgcolor="#FFFFFF" width="93.35%" class="whs7">
<p>Re-provision the interface with <a href="nmsgr303provisioninterface.html"><span 
 style="color: #0000ff;
		font-weight: bold;
		x-text-underline: off;
		/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303ProvisionInterface</B></font></span></a>.</p></td></tr>

<tr>
<td bgcolor="#FFFFFF" width="6.65%" class="whs7">
<p>4</p></td>
<td bgcolor="#FFFFFF" width="93.35%" class="whs7">
<p>Start the interface with <a href="nmsgr303startinterface.html"><span 
 style="color: #0000ff;
		font-weight: bold;
		x-text-underline: off;
		/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303StartInterface</B></font></span></a>.</p></td></tr>
</table><br>

<p>Whenever possible, it is simpler to modify an interface with <a href="nmsgr303modifychannellocation.html"><span 
 style="color: #0000ff;
		font-style: normal;
		font-weight: bold;
		x-text-underline: off;
		x-text-overline: off;
		x-text-line-through: off;
		text-transform: none;
		vertical-align: baseline;
		/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303ModifyChannelLocation</B></font></span></a> 
 than to destroy it and re-provision a new one.</p>

<h2><a name="Sending and receiving HDLC channel data"></a>Sending and receiving 
 HDLC channel data</h2>

<p>After starting an interface, invoke <a href="nmsgr303phsenddata.html"><span 
 style="color: #0000ff;
		font-style: normal;
		font-weight: bold;
		x-text-underline: off;
		x-text-overline: off;
		x-text-line-through: off;
		text-transform: none;
		vertical-align: baseline;
		/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303PhSendData</B></font></span></a> 
 to asynchronously send data to a specific HDLC channel. The NMS GR303 
 library returns transfer request results to the application as soon as 
 the data transfer is complete. If necessary, it also performs any buffering 
 needed to transfer the data.</p>

<p>If the outgoing message queue overflows, the NMS GR303 library returns 
 an <span style="color: #000000;
					font-style: normal;
					font-weight: normal;
					x-text-underline: off;
					x-text-overline: off;
					x-text-line-through: off;
					text-transform: none;
					vertical-align: baseline;
					/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >EVENT_TX_QUEUE_FULL</font></span> 
 notification error. The library uses an application-defined callback function 
 to transfer the HDLC error message data from the physical layer to the 
 application. The library copies the data into memory that was allocated 
 when the application provisioned the interface.</p>

<h2><a name="Retrieving channel and link status information"></a>Retrieving 
 channel and link status information</h2>

<p>As soon as an application provisions an interface, the NMS GR303 library 
 begins to monitor any DS1 links that carry provisioned HDLC channels, 
 and to maintain channel statistics for the channels. </p>

<p>To query link status and channel statistic information, invoke <a href="nmsgr303getchannelstatistics.html"><span 
 style="color: #0000ff;
		font-weight: bold;
		x-text-underline: off;
		/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303GetChannelStatistics</B></font></span></a> 
 and <a href="nmsgr303getds1status.html"><span style="color: #0000ff;
														font-weight: bold;
														x-text-underline: off;
														/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303GetDS1Status</B></font></span></a>. 
 <span style="font-weight: bold;"><B>NMS_GR303GetDS1Status</B></span> returns 
 current DS1 link alarm status information and error information collected 
 over a specified period of time. <span style="font-weight: bold;"><B>NMS_GR303GetChannelStatistics</B></span> 
 reports success and error information for receive and transmit operations 
 on a specified HDLC channel.</p>

<p>To reset DS1 link status information or HDLC channel statistics, invoke 
 <a href="nmsgr303resetchannelstatistics.html"><span style="color: #0000ff;
															font-style: normal;
															font-weight: bold;
															x-text-underline: off;
															x-text-overline: off;
															x-text-line-through: off;
															text-transform: none;
															vertical-align: baseline;
															/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303ResetChannelStatistics</B></font></span></a> 
 or <a href="nmsgr303resetds1status.html"><span style="color: #0000ff;
														font-style: normal;
														font-weight: bold;
														x-text-underline: off;
														x-text-overline: off;
														x-text-line-through: off;
														text-transform: none;
														vertical-align: baseline;
														/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303ResetDS1Status</B></font></span></a>.</p>

<h2><a name="Stopping an NMS GR303 interface"></a>Stopping an NMS GR303 
 interface </h2>

<p>Call <a href="nmsgr303stopinterface.html"><span style="color: #0000ff;
															font-style: normal;
															font-weight: bold;
															x-text-underline: off;
															x-text-overline: off;
															x-text-line-through: off;
															text-transform: none;
															vertical-align: baseline;
															/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303StopInterface</B></font></span></a> 
 to stop an existing interface. When the interface stops, all HDLC data 
 transfer through the interface ceases, and the interface remains provisioned 
 but not operational. </p>

<p>The NMS GR303 library continues to monitor DS1 links on stopped interfaces, 
 and the library does not automatically reset HDLC channel statistics for 
 these links. Therefore, applications can still access or reset DS1 link 
 statistics for stopped interfaces by invoking <a href="nmsgr303getchannelstatistics.html"><span 
 style="color: #0000ff;
		font-style: normal;
		font-weight: bold;
		x-text-underline: off;
		x-text-overline: off;
		x-text-line-through: off;
		text-transform: none;
		vertical-align: baseline;
		/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303GetChannelStatistics</B></font></span></a> 
 or <a href="nmsgr303resetchannelstatistics.html"><span style="color: #0000ff;
	font-style: normal;
	font-weight: bold;
	x-text-underline: off;
	x-text-overline: off;
	x-text-line-through: off;
	text-transform: none;
	vertical-align: baseline;
	/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303ResetChannelStatistics</B></font></span></a>. 
 </p>

<p>To restart a stopped interface, call <a href="nmsgr303startinterface.html"><span 
 style="color: #0000ff;
		font-style: normal;
		font-weight: bold;
		x-text-underline: off;
		x-text-overline: off;
		x-text-line-through: off;
		text-transform: none;
		vertical-align: baseline;
		/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303StartInterface</B></font></span></a>.</p>

<h2><a name="Destroying an NMS GR303 interface"></a>Destroying an NMS GR303 
 interface</h2>

<p>Invoke <a href="nmsgr303destroyinterface.html"><span style="color: #0000ff;
	font-style: normal;
	font-weight: bold;
	x-text-underline: off;
	x-text-overline: off;
	x-text-line-through: off;
	text-transform: none;
	vertical-align: baseline;
	/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303DestroyInterface</B></font></span></a> 
 to destroy an existing interface. When an application destroys an interface, 
 the HDLC flow of data ceases, provision information is destroyed, and 
 the NMS GR303 library stops maintaining statistics information for any 
 DS1 links and HDLC channels associated with the interface. </p>

<p><span style="font-weight: bold;"><B>NMS_GR303DestroyInterface</B></span> also 
 resets the signaling mode of timeslots formerly occupied by the HDLC channels 
 to CAS mode.</p>

<h2><a name="Exiting the NMS GR303 library"></a>Exiting the NMS GR303 library</h2>

<p>To exit the RDT system, call <a href="nmsgr303exit.html"><span style="color: #0000ff;
	font-weight: bold;
	x-text-underline: off;
	/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303Exit</B></font></span></a>. 
 When an application calls <span style="font-weight: bold;"><B>NMS_GR303Exit</B></span>, 
 the NMS GR303 library:</p>

<ul type="disc" class="whs1">
	
	<li class=kadov-p><p>Stops all provisioned HDLC and framer instances.</p></li>
	
	<li class=kadov-p><p>Configures the signaling mode of any timeslots 
 associated with HDLC channels back to CAS.</p></li>
	
	<li class=kadov-p><p>Destroys all existing interfaces. </p></li>
</ul>

<p>Exiting the GR303 application gracefully (that is, invoking <a href="nmsgr303stopinterface.html"><span 
 style="color: #0000ff;
		font-weight: bold;
		x-text-underline: off;
		/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303StopInterface</B></font></span></a> 
 and <a href="nmsgr303destroyinterface.html"><span style="color: #0000ff;
															font-weight: bold;
															x-text-underline: off;
															/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303DestroyInterface</B></font></span></a> 
 before invoking <span style="font-weight: bold;"><B>NMS_GR303Exit</B></span>) 
 brings the board to a known state and allows you to restart without rebooting 
 the board.</p>

<h2><a name="NMS GR303 library state diagram"></a>NMS GR303 library state 
 model</h2>

<p>The following illustration shows state transitions for interfaces controlled 
 by the NMS GR303 library. You must comply with the illustrated conditions 
 when integrating NMS GR303 library functions into GR303 applications.</p>

<p><img src="images/303state.gif" width="537px" height="523px" border="0" class="img_whs8"> </p>

<p>The following table describes the NMS GR303 library interface states: 
 </p>

<table cellpadding="5" x-use-null-cells cellspacing="0" border="1" class="whs9">

<tr bgcolor="#CCCCCC" valign="top" class="whs10">
<td class="whs11">
<p class="whs6">State</p></td>
<td class="whs11">
<p class="whs6">Description</p></td></tr>

<tr valign="top" class="whs12">
<td class="whs11">
<p>Null</p></td>
<td class="whs11">
<p>The board is booted, configured, and initialized, but the NMS GR303 
 library is not loaded.</p></td></tr>

<tr valign="top" class="whs12">
<td class="whs11">
<p>Idle</p></td>
<td class="whs11">
<p>The NMS GR303 physical library is initialized. No communication link 
 is established between the GR303 application and the boards. Library tracing 
 can be configured. </p></td></tr>

<tr valign="top" class="whs12">
<td class="whs11">
<p>Provisioned</p></td>
<td class="whs11">
<p>The interface is provisioned on the physical layer. All necessary connections 
 are made between the application and HDLC/framer instances on the boards. 
 HDLC channels are configured, reset, and initialized, but disabled for 
 transmit and receive operations. </p>
<p>DS0 timeslots assigned to HDLC channels are internally set to RAW mode. 
 All other DS0 timeslots remain in CAS mode. </p>
<p>Applications can query the status of HDLC channels and DS1 links, modify 
 provisioned interface configurations, and modify the tracing configuration.</p></td></tr>

<tr valign="top" class="whs12">
<td class="whs11">
<p>Started</p></td>
<td class="whs11">
<p>The HDLC channels are enabled for transmit and receive operations. </p>
<p>Applications can query the status of HDLC channels and DS1 links, modify 
 provisioned interface configurations, and modify the tracing configuration.</p></td></tr>
</table><br>

<div placeholder id="footer" class="whs13">
 <p align="center" class="whs14">&nbsp;</p>
 <p align="center" class="whs14"><script type="text/javascript" language="JavaScript1.2">var mailSubject = 'Documentation link: ' + document.title;
var mailBody = 'Link to reference this topic:%0A %0A' + location.href;
var mailDisplay = '<img src="send_link.gif" border="0" alt="Send link to this topic">'; 
document.write( 
'<a href="mailto:Enter recipient email address' 
+ '?subject=' + escape(mailSubject) 
+ '&body=' + (mailBody) 
+ '">' + mailDisplay + '</a>' 
);</script></p>
 <p align="center" class="whs15">&#169; 
 Copyright 2009 Dialogic Corporation. All rights reserved.</p>
</div>
<script type="text/javascript" language="javascript1.2">
<!--
if (window.writeIntopicBar)
	writeIntopicBar(0);
//-->
</script>
</body>
</html>

