|
|||||
The GET_PORTS_INFO function
retrieves the current configuration and activity of fax ports on a NET
SatisFAXtion server. In the reply
taglist from the server, information about each port is placed in a section that begins with the
PORT_NAME tag. In addition to the port name, each
PORT_NAME section includes tags that describe the configuration (HOW_CONFIGURED)
and current state (PROTOCOL_STATE and PORT_STATUS) of
the port.
If a fax port is actively sending or receiving, message tags are included in the PORT_NAME section, including the MESSAGE_HANDLE of the message being sent and the CONNECTION_SECONDS that tells how long the fax port has been on-line. When preparing the taglist for this function, you are encouraged to include a section filled with tags that you truly need, beginning with the RESPONSE_INCLUDE_ONLY tag, to limit the amount of data returned from the server (see example below). This function requires a valid REGISTERED_NAME and REGISTERED_PASSWORD tag pair to execute. |
|||||
Type | Max Size | Multiple Allowed | |||
Function | N/A | No | |||
Example: |
|||||
function GetSendPortCount() { var SendPortCount=0; var Tl, Sl, Count, Index, Config; Tl = CAS.New(); CAS.AddTag(Tl,"GET_PORTS_INFO",""); CAS.AddTag(Tl,"REGISTERED_NAME",REGISTERED_NAME.value); CAS.AddTag(Tl,"REGISTERED_PASSWORD",REGISTERED_PASS.value); Sl = CAS.CreateSection(Tl,"RESPONSE_INCLUDE_ONLY",""); CAS.AddTag(Sl,"HOW_CONFIGURED",""); CAS.AddTag(Sl,"PROTOCOL_STATE",""); CAS.AddTag(Sl,"MESSAGE_HANDLE",""); CAS.CloseSection(Sl); // Send on this already open session Tl = CAS.Send(Instance,Tl); if ((Count = parseInt(CAS.GetTag(Tl,"NUMBER_OF_PORTS",0))) > 0) { for ( Index=0; Index<Count; Index++) { Sl = CAS.OpenSection(Tl,"PORT_NAME["+Index+"]"); Config = parseInt(CAS.GetTag(Sl,"HOW_CONFIGURED",0)); if (Config == 2 || Config == 3) { SendPortCount++; } CAS.CloseSection(Sl); } } return( SendPortCount); } |
|||||
See Also: |
|||||
Get Ports Info, PORT_NAME, PORT_STATUS, HOW_CONFIGURED, PROTOCOL_STATE, REGISTERED_NAME, REGISTERED_PASSWORD |