<div class="content"><p>The Open packet is transmitted from a TAPI <a href="489de77f-16d8-4c4f-939a-f795e8b42893#gt_60e0e1fa-66fe-41e1-b5e3-ceab97e53506" data-linktype="relative-path">client</a> to a TAPI <a href="489de77f-16d8-4c4f-939a-f795e8b42893#gt_434b0234-e970-4e8c-bdfa-e16a30d96703" data-linktype="relative-path">server</a> in a <a href="489de77f-16d8-4c4f-939a-f795e8b42893#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">remote procedure call</a>.
Sending this packet MUST open the specified phone device. </p><p>A phone device can be opened by using either owner privilege
or monitor privilege. An application that opens the phone with owner privileges
can control the lamps, display, ringer, and hookswitch or hookswitches of the
phone. An application that opens the phone device with monitor privilege is
notified only about events that occur at the phone, such as hookswitch changes
or button presses. Opening a phone device in owner mode also provides
monitoring of the phone device.</p><p>Ownership of a phone device is exclusive; that is, at any
time, only one application can have a phone device opened with owner
privileges. However, a phone device can be opened multiple times with monitor
privilege.</p><table>
 <tbody><tr>
  <th><p><br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>1<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>2<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>3<br/>0</p></th>
  <th><p><br/>1</p></th>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Req_Func</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Reserved1</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">hPhoneApp</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">dwDeviceID</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">hPhone</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">dwNegotiatedVersion</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">dwExtVersion</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">OpenContext</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">dwPrivilege</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">hRemotePhone</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Reserved2</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Reserved3</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Reserved4</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Reserved5</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Reserved6</p>
  </td>
 </tr>
</tbody></table><p><b>Req_Func (4 bytes): </b>The identifier of the
function that will be invoked on the remote server. This value MUST be set to
107.</p><dl>
<dd>
<p><b>Return Values</b></p>
</dd>
<dd>
<p>On completion of <a href="c28c36d0-579b-4e20-a100-f4e71012d5f8" data-linktype="relative-path">ClientRequest</a>, this field
MUST contain the result of the encapsulated telephony request. A value of 0
indicates success, and a <a href="b1c6fae0-09ca-4f7b-85f6-1324376d231c" data-linktype="relative-path">PHONEERR_Constants</a>
value indicates failure. The remote server MUST complete this call synchronously.</p>
</dd>
<dd>
<p>Returns zero if the request succeeds or a negative
error number if an error occurs. Common return values are:</p>
</dd>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Name</p>
   </th>
   <th>
   <p>Value</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>PHONEERR_ALLOCATED</p>
  </td>
  <td>
  <p>0x00000001</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_NODRIVER</p>
  </td>
  <td>
  <p>0x00000019</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_BADDEVICEID</p>
  </td>
  <td>
  <p>0x00000002</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_NOMEM</p>
  </td>
  <td>
  <p>0x0000001A</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_INCOMPATIBLEAPIVERSION</p>
  </td>
  <td>
  <p>0x00000003</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_OPERATIONFAILED</p>
  </td>
  <td>
  <p>0x0000001C</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_INCOMPATIBLEEXTVERSION</p>
  </td>
  <td>
  <p>0x00000004</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_OPERATIONUNAVAIL</p>
  </td>
  <td>
  <p>0x0000001D</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_INVALAPPHANDLE</p>
  </td>
  <td>
  <p>0x00000007</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_RESOURCEUNAVAIL</p>
  </td>
  <td>
  <p>0x0000001F</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_INVALPOINTER</p>
  </td>
  <td>
  <p>0x00000015</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_UNINITIALIZED</p>
  </td>
  <td>
  <p>0x00000022</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_INVALPRIVILEGE</p>
  </td>
  <td>
  <p>0x00000016</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_REINIT</p>
  </td>
  <td>
  <p>0x00000023</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_INUSE</p>
  </td>
  <td>
  <p>0x00000006</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_NODEVICE</p>
  </td>
  <td>
  <p>0x00000018</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_INIFILECORRUPT</p>
  </td>
  <td>
  <p>0x00000005</p>
  </td>
 </tr></tbody></table>
</dd></dl><p><b>Reserved1 (4 bytes): </b>An unsigned 32-bit
integer. MUST be set to zero when sent and MUST be ignored on receipt. </p><p><b>hPhoneApp (4 bytes): </b>An <a href="55b72ff6-9236-401b-846a-e8a78dfada1b" data-linktype="relative-path">HPHONEAPP</a>. The handle to
the application registration with TAPI. This field MUST have been obtained by
sending the <a href="a600d262-0bb1-447b-8a0d-6f57d3a8ec18" data-linktype="relative-path">Initialize</a>
packet.</p><p><b>dwDeviceID (4 bytes): </b>An unsigned 32-bit
integer. The identifier of the phone device to be opened. A valid value of
dwDeviceID is in the range 0 to dwNumDevs – 1. The client obtains dwNumDevs by
sending a Initialize packet to the remote server.</p><p><b>hPhone (4 bytes): </b>An <a href="0c93f481-3429-48c5-a9e6-f0568c4cabd9" data-linktype="relative-path">HPHONE</a>. Set to
TAPI_NO_DATA (0xFFFFFFFF). Upon successful completion of the request, this
field contains the handle for the phone device to be used by TAPI in subsequent
calls to identify the device.</p><p><b>dwNegotiatedVersion (4 bytes): </b>An unsigned
32-bit integer. The version that is negotiated via the <a href="59e34869-7701-4eb5-95d4-f8ce908ce17a" data-linktype="relative-path">NegotiateAPIVersion</a>
request.</p><p><b>dwExtVersion (4 bytes): </b>An unsigned 32-bit
integer. The extension version number under which the application and the
service provider agree to operate. This number is zero if the application does
not use any extensions. This number is obtained from <a href="6ee86f03-d1e2-4823-98e1-9e5fc97c11bc" data-linktype="relative-path">NegotiateExtVersion</a>. </p><p><b>OpenContext (4 bytes): </b>An unsigned 32-bit
integer. The Callback instance, set to 0.</p><p><b>dwPrivilege (4 bytes): </b>An unsigned 32-bit
integer. The privilege that is requested. This parameter MUST use one of the <a href="a4b8c72d-0fab-4dbd-8ac8-5064fe8e458e" data-linktype="relative-path">PHONEPRIVILEGE_Constants</a>.</p><p><b>hRemotePhone (4 bytes): </b>An unsigned 32-bit
integer. If this field is nonzero, the server MUST use this value for
ASYNCEVENTMSG.hDevice for all unsolicited event and completion notifications
that are sent to the client, instead of the returned hPhone value.</p><dl>
<dd>
<p>Similar handle-swapping semantics can exist between
TAPI service and telephony service providers</p>
</dd></dl><p><b>Reserved2 (4 bytes): </b>An unsigned 32-bit
integer. This field is used for padding and MUST be ignored on receipt. It can
be any value.</p><p><b>Reserved3 (4 bytes): </b>An unsigned 32-bit
integer. This field is used for padding and MUST be ignored on receipt. It can
be any value.</p><p><b>Reserved4 (4 bytes): </b>An unsigned 32-bit
integer. This field is used for padding and MUST be ignored on receipt. It can
be any value.</p><p><b>Reserved5 (4 bytes): </b>An unsigned 32-bit
integer. This field is used for padding and MUST be ignored on receipt. It can
be any value.</p><p><b>Reserved6 (4 bytes): </b>An unsigned 32-bit
integer. This field is used for padding and MUST be ignored on receipt. It can
be any value.</p></div>