An act to add Sections 638.50, 638.51, 638.52, and 638.53 to the Penal Code, relating to privacy.

The people of the State of California do enact as follows:


SECTION 1.
Section 638.50 is added to the Penal Code, to read:
638.50.
For purposes of this chapter, the following terms have the following meanings:
(a) “Wire communication” and “electronic communication” have the meanings set forth in subdivision (a) of Section 629.51.
(b) “Pen register” means a device or process that records or decodes dialing, routing, addressing, or signaling information transmitted by an instrument or facility from which a wire or electronic communication is transmitted, but not the contents of a communication. “Pen register” does not include a device or process used by a provider or customer of a wire or electronic communication service for billing, or recording as an incident to billing, for communications services provided by such provider, or a device or process used by a provider or customer of a wire communication service for cost accounting or other similar purposes in the ordinary course of its business.
(c) “Trap and trace device” means a device or process that captures the incoming electronic or other impulses that identify the originating number or other dialing, routing, addressing, or signaling information reasonably likely to identify the source of a wire or electronic communication, but not the contents of a communication.
SEC. 2.
Section 638.51 is added to the Penal Code, to read:
638.51.
(a) Except as provided in subdivision (b), a person may not install or use a pen register or a trap and trace device without first obtaining a court order pursuant to Section 638.52 or 638.53.
(b) A provider of electronic or wire communication service may use a pen register or a trap and trace device for any of the following purposes:
(1) To operate, maintain, and test a wire or electronic communication service.
(2) To protect the rights or property of the provider.
(3) To protect users of the service from abuse of service or unlawful use of service.
(4) To record the fact that a wire or electronic communication was initiated or completed to protect the provider, another provider furnishing service toward the completion of the wire communication, or a user of that service, from fraudulent, unlawful, or abusive use of service.
(5) If the consent of the user of that service has been obtained.
(c) A violation of this section is punishable by a fine not exceeding two thousand five hundred dollars ($2,500), or by imprisonment in the county jail not exceeding one year, or by imprisonment pursuant to subdivision (h) of Section 1170, or by both that fine and imprisonment.
(d) A good faith reliance on an order issued pursuant to Section 638.52, or an authorization made pursuant to Section 638.53, is a complete defense to a civil or criminal action brought under this section or under this chapter.
SEC. 3.
Section 638.52 is added to the Penal Code, to read:
638.52.
(a) A peace officer may make an application to a magistrate for an order or an extension of an order authorizing or approving the installation and use of a pen register or a trap and trace device. The application shall be in writing under oath or equivalent affirmation, and shall include the identity of the peace officer making the application and the identity of the law enforcement agency conducting the investigation. The applicant shall certify that the information likely to be obtained is relevant to an ongoing criminal investigation and shall include a statement of the offense to which the information likely to be obtained by the pen register or trap and trace device relates.
(b) The magistrate shall enter an ex parte order authorizing the installation and use of a pen register or a trap and trace device if he or she finds that the information likely to be obtained by the installation and use of a pen register or a trap and trace device is relevant to an ongoing investigation and that there is probable cause to believe that the pen register or trap and trace device will lead to any of the following:
(1) Recovery of stolen or embezzled property.
(2) Property or things used as the means of committing a felony.
(3) Property or things in the possession of a person with the intent to use them as a means of committing a public offense, or in the possession of another to whom he or she may have delivered them for the purpose of concealing them or preventing them from being discovered.
(4) Evidence that tends to show a felony has been committed, or tends to show that a particular person has committed or is committing a felony.
(5) Evidence that tends to show that sexual exploitation of a child, in violation of Section 311.3, or possession of matter depicting sexual conduct of a person under 18 years of age, in violation of Section 311.11, has occurred or is occurring.
(6) The location of a person who is unlawfully restrained or reasonably believed to be a witness in a criminal investigation or for whose arrest there is probable cause.
(7) Evidence that tends to show a violation of Section 3700.5 of the Labor Code, or tends to show that a particular person has violated Section 3700.5 of the Labor Code.
(8) Evidence that does any of the following:
(A) Tends to show that a felony, a misdemeanor violation of the Fish and Game Code, or a misdemeanor violation of the Public Resources Code, has been committed or is being committed.
(B) Tends to show that a particular person has committed or is committing a felony, a misdemeanor violation of the Fish and Game Code, or a misdemeanor violation of the Public Resources Code.
(C) Will assist in locating an individual who has committed or is committing a felony, a misdemeanor violation of the Fish and Game Code, or a misdemeanor violation of the Public Resources Code.
(c) Information acquired solely pursuant to the authority for a pen register or a trap and trace device shall not include any information that may disclose the physical location of the subscriber, except to the extent that the location may be determined from the telephone number. Upon the request of the person seeking the pen register or trap and trace device, the magistrate may seal portions of the application pursuant to People v. Hobbs (1994) 7 Cal.4th 948, and Sections 1040, 1041, and 1042 of the Evidence Code.
(d) An order issued pursuant to subdivision (b) shall specify all of the following:
(1) The identity, if known, of the person to whom is leased or in whose name is listed the telephone line to which the pen register or trap and trace device is to be attached.
(2) The identity, if known, of the person who is the subject of the criminal investigation.
(3) The number and, if known, physical location of the telephone line to which the pen register or trap and trace device is to be attached and, in the case of a trap and trace device, the geographic limits of the trap and trace order.
(4) A statement of the offense to which the information likely to be obtained by the pen register or trap and trace device relates.
(5) The order shall direct, if the applicant has requested, the furnishing of information, facilities, and technical assistance necessary to accomplish the installation of the pen register or trap and trace device.
(e) An order issued under this section shall authorize the installation and use of a pen register or a trap and trace device for a period not to exceed 60 days.
(f) Extensions of the original order may be granted upon a new application for an order under subdivisions (a) and (b) if the officer shows that there is a continued probable cause that the information or items sought under this subdivision are likely to be obtained under the extension. The period of an extension shall not exceed 60 days.
(g) An order or extension order authorizing or approving the installation and use of a pen register or a trap and trace device shall direct that the order be sealed until otherwise ordered by the magistrate who issued the order, or a judge of the superior court, and that the person owning or leasing the line to which the pen register or trap and trace device is attached, or who has been ordered by the court to provide assistance to the applicant, not disclose the existence of the pen register or trap and trace device or the existence of the investigation to the listed subscriber or to any other person, unless or until otherwise ordered by the magistrate or a judge of the superior court, or for compliance with Sections 1054.1 and 1054.7.
(h) Upon the presentation of an order, entered under subdivisions (b) or (f), by a peace officer authorized to install and use a pen register, a provider of wire or electronic communication service, landlord, custodian, or other person shall immediately provide the peace officer all information, facilities, and technical assistance necessary to accomplish the installation of the pen register unobtrusively and with a minimum of interference with the services provided to the party with respect to whom the installation and use is to take place, if the assistance is directed by the order.
(i) Upon the request of a peace officer authorized to receive the results of a trap and trace device, a provider of a wire or electronic communication service, landlord, custodian, or other person shall immediately install the device on the appropriate line and provide the peace officer all information, facilities, and technical assistance, including installation and operation of the device unobtrusively and with a minimum of interference with the services provided to the party with respect to whom the installation and use is to take place, if the installation and assistance is directed by the order.
(j) Unless otherwise ordered by the magistrate, the results of the pen register or trap and trace device shall be provided to the peace officer at reasonable intervals during regular business hours for the duration of the order.
(k) The magistrate, before issuing the order pursuant to subdivision (b), may examine on oath the person seeking the pen register or the trap and trace device, and any witnesses the person may produce, and shall take his or her affidavit or their affidavits in writing, and cause the affidavit or affidavits to be subscribed by the parties making them.
SEC. 4.
Section 638.53 is added to the Penal Code, to read:
638.53.
(a) Except as otherwise provided in this chapter, upon an oral application by a peace officer, a magistrate may grant oral approval for the installation and use of a pen register or a trap and trace device, without an order, if he or she determines all of the following:
(1) There are grounds upon which an order could be issued under Section 638.52.
(2) There is probable cause to believe that an emergency situation exists with respect to the investigation of a crime.
(3) There is probable cause to believe that a substantial danger to life or limb exists justifying the authorization for immediate installation and use of a pen register or a trap and trace device before an order authorizing the installation and use can, with due diligence, be submitted and acted upon.
(b) (1) By midnight of the second full court day after the pen register or trap and trace device is installed, a written application pursuant to Section 638.52 shall be submitted by the peace officer who made the oral application to the magistrate who orally approved the installation and use of a pen register or trap and trace device. If an order is issued pursuant to Section 638.52, the order shall also recite the time of the oral approval under subdivision (a) and shall be retroactive to the time of the original oral approval.
(2) In the absence of an authorizing order pursuant to paragraph (1), the use shall immediately terminate when the information sought is obtained, when the application for the order is denied, or by midnight of the second full court day after the pen register or trap and trace device is installed, whichever is earlier.
(c) A provider of a wire or electronic communication service, landlord, custodian, or other person who provides facilities or technical assistance pursuant to this section shall be reasonably compensated by the requesting peace officer’s law enforcement agency for the reasonable expenses incurred in providing the facilities and assistance.
SEC. 5.
No reimbursement is required by this act pursuant to Section 6 of Article XIII B of the California Constitution because the only costs that may be incurred by a local agency or school district will be incurred because this act creates a new crime or infraction, eliminates a crime or infraction, or changes the penalty for a crime or infraction, within the meaning of Section 17556 of the Government Code, or changes the definition of a crime within the meaning of Section 6 of Article XIII B of the California Constitution.

Summary: Existing law authorizes the Attorney General or a district attorney to make a written application to a judge of a superior court for an order permitting the interception of wire communication and electronic communication, as defined. Existing law permits an application to be made informally and granted orally if an emergency situation exists, and other factors are present. Existing law conditions the granting of an oral approval on the filing of a written application by midnight of the second full court day after the oral approval is made. Existing law prohibits a communication interception from lasting for longer than 30 days. Existing law permits an extension of the original order, not to exceed 30 days, upon a showing that there is continued probable cause that the information sought is likely to be obtained under the extension.
This bill would prohibit a person, other than a provider of electronic or wire communication service for specified purposes, from installing or using a pen register or a trap and trace device, as defined. The bill would authorize a peace officer to make a written application to a magistrate for an order permitting the installation and use of a pen register or a trap and trace device. The bill would require the magistrate to enter an ex parte order authorizing the installation and use of a pen register or a trap and trace device only in specified circumstances and would permit the magistrate to question the peace officer pertaining to the need for the information. The bill would also permit an application to be made informally and granted orally if an emergency situation exists, and other factors are present. The bill would condition the grant of an oral approval on the filing of a written application by midnight of the second full court day after the pen register or trap and trace device is installed. The bill would prohibit the installation and use of a pen register or trap and trace device for longer than 60 days. The bill would permit an extension of the original order, not to exceed 60 days, upon a showing that there is continued probable cause that the information sought is likely to be obtained under the extension. The bill would clarify that any location information obtained by a pen register or a track and trace device is limited to the information that can be determined from the telephone number.
The bill would make the prohibited installation or use of a pen register or a trap and trace device punishable by a fine not exceeding $2,500, or by imprisonment in the county jail not exceeding 1 year, or by imprisonment in state prison for offenders with specified prior convictions, or by both that fine and imprisonment. By creating a new crime, the bill would impose a state-mandated local program.
The California Constitution requires the state to reimburse local agencies and school districts for certain costs mandated by the state. Statutory provisions establish procedures for making that reimbursement.
This bill would provide that no reimbursement is required by this act for a specified reason.