Download 2N NetSpeaker
Transcript
Authorisation The AppName item is used for application identification. The application cannot continue communicating until it receives the <bind Status="OK"/> reply from the 2N® NetSpeaker Server. The server thus confirms the connection and creation of a communication channel. Explicit authorisation – LOGON method Or, you can enter your login and password simply as follows: 1. Check whether the library offers the LOGON method after receiving the request for authorisation and, if yes, then: 2. Send the instruction <auth Method="LOGON" LoginName="..." Password="..."/>; where ... is to be replaced with the user name and password (default name: Admin, password: 2n). 3. Wait for the reply: <auth Method="LOGON" Status="OK"/>. If the reply contains the Status attribute with OK value, it means that the XML bridge has been successfully authorised with the data received. Any different value of the Status attribute means that access has been denied. Besides the <auth Method="..." Status="OK"/> reply, successful authorisation is manifested by the following reply from the XML bridge to bind: <bind Status="OK"/>. This signals that the communication channel has been successfully configured and authorised and is ready for sending messages in both directions now. Request <bind ConnType="LOCAL" AppName="SpkCtiTest"/> Response <auth> <method Name="LOGON"/> </auth> Request <auth Method="LOGON" LoginName="login" Password="password"/> Response <auth Method="LOGON" Status="OK"/> Response <bind Status="OK"/> The following answers have been added for different situations: NNB_XML_STATUS_OK ... external application can start sending other commands. NNB_XML_STATUS_ALREADY_BOUND ... application ignores this error and can send commands, bind no longer needed. NNB_XML_STATUS_NEIGHBOUR_IS_UNREADY ... application must repeat the bind command after a time delay of 100 ms at least. 2N® TELEKOMUNIKACE a.s., www.2n.cz 69