payphone | notes and code for my payphone project | Frontend Framework library

 by   jcs Perl Version: Current License: No License

kandi X-RAY | payphone Summary

kandi X-RAY | payphone Summary

payphone is a Perl library typically used in User Interface, Frontend Framework, React applications. payphone has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

These are some notes from my project to install a working payphone in my home and configure it to make and receive calls through an Asterisk PBX. This is a Western Electric/AT&T 1D2 single-slot "dumb" payphone, popular in the 1980s. It came with a T-key but no upper or lower locks or keys. The handset was pretty gross and there were no upper or lower instruction cards. Shipping was a bit expensive since the phone weighs nearly 50 pounds. I purchased a new handset, mounting backplate, and mounting studs. I located some old instruction cards on eBay and upper and lower locks with key sets. The instruction cards install by unscrewing a very tiny allen bolt in the front of the housing to allow the card to slide up and then back down. The replacement handset was wired differently than the handset that came with the phone, which initially caused the mouthpiece not to transmit any audio. By touching a AA battery to the wires of the disconnected handset, I was able to figure out which wires went to the earpiece and which to the mouthpiece. The handset's red wire is connected to terminal 3, yellow to 4, green to 6, and black to 8. To mount the phone to my wall, I drilled 5 holes into a wall stud and secured the backing plate to the wall with 2 1/4" screws. The mounting studs hand-screwed into the back of the phone which allowed the phone to easily hang on the backplate, aligning the 12 holes in the back of the phone to the 1/4x20 threaded holes in the backplate. The phone is mounted at the standard height of 63" from the floor to the top of the housing. Back when all payphones were owned by the phone company, a POTS line provisioned for a payphone provided dialtone to the phone. When coins were inserted, the phone's totalizer sent simultaneous 1700+2200 Hz tones down the line for each 5 cents (nickel = one 66 ms tone, dime = two 66 ms tones with a 66 ms pause in between, quarter = five 33 ms tones with 33 ms pauses). The phone company's Automated Coin Toll Service (ACTS) would respond to the tones generated by the phone (or your red box) and allow the dialed phone number to connect for a certain amount of time. Newer "smart" (Elcotel-style) payphones are commonly owned by private companies (Customer Owned Coin Telephones - COCOTs) and don't require a specially-provisioned phone line. The phone has an embedded circuit board that has to be programmed with rate information, allowing the phone itself to determine whether the call is allowed to go through based on the number dialed and the amount of coins inserted. These phones would have to get reprogrammed every so often by a company that calls into the pay phone and uploads new rate information to it. (If you're looking to acquire a payphone for personal use, avoid these "smart" phones. An easy way to tell them apart from the outside is that "dumb" phones have the coin slot on the left side and "smart" phones usually have it on the right. Inside it's easy to tell; just look for a big modern-looking circuit board.). Since this phone has always worked with a normal POTS line, making it work now just requires hooking up the red and green wires of an RJ11 cable to the Ring and Tip terminals in the phone. It rings, dials, and otherwise functions just like a normal analog telephone. I connected the phone to a Grandstream HT701 SIP ATA and was able to make and receive calls through an Asterisk soft PBX, with dialtone coming from the ATA. I registered an inbound number through Twilio (appropriately enough, one ending in -2600) and routed it to the Asterisk server via SIP. Since this a payphone, after all, it should require depositing coins to make a call. Much older phones (like 3-slot rotary phones) required coins to be deposited before hearing a dial tone. These were mostly phased out by the 1970s and replaced with phones that provided a dial tone first, allowing emergency calls without depositing coins as well as depositing extra coins for long-distance calls. Using Asterisk, this payphone will be configured to provide a dial tone first and allow free emergency calls, but require 25 cents to call any other number. Since the ATA only establishes audio between the phone and Asterisk after a recognizable pattern of digits has been dialed (and sent to Asterisk all at once in one INVITE request), Asterisk would not be able to respond to coin tones generated before dialing. Using the ATA's "Offhook Auto-Dial" feature, I configured it to automatically (silently) dial 0 as soon as the handset was picked up. An AGI script on the Asterisk server would then take over, generating its own dialtone and responding to any tones sent by the phone. Now that Asterisk is receiving the 1700+2200 Hz tones generated when coins are inserted, some code is needed to actually recognize them. Using Asterisk EAGI would allow a program to read the raw audio stream and analyze it for the proper tone frequencies using the Goertzel algorithm, but doing so would be pretty complicated. Since Asterisk is already doing in-band dual-tone multi-frequency (DTMF) detection for numerical digits, modifying it to recognize the coin tones is much less complicated. This patch to Asterisk's DSP module recognizes the 1700+2200 Hz tone and turns it into a $ digit, allowing any AGI or other code handling numeric digits to easily recognize coin tones. Now that the amount of inserted coins can be recognized, along with any digits dialed, it's possible to make a full script that can refuse to connect calls and play an error message until a certain amount of money is inserted. Toll-free numbers, 911, etc. can be connected before any coins are collected.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              payphone has a low active ecosystem.
              It has 207 star(s) with 10 fork(s). There are 18 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 0 open issues and 1 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of payphone is current.

            kandi-Quality Quality

              payphone has 0 bugs and 0 code smells.

            kandi-Security Security

              payphone has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              payphone code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              payphone does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              payphone releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of payphone
            Get all kandi verified functions for this library.

            payphone Key Features

            No Key Features are available at this moment for payphone.

            payphone Examples and Code Snippets

            No Code Snippets are available at this moment for payphone.

            Community Discussions

            QUESTION

            BLE Connection failure : Connection is refused due to unacceptable BD_ADDR
            Asked 2020-Nov-24 at 20:00

            My setup is as follows:

            1. BLE Peripheral in Raspberry Pi 3
            2. nRF tool in Android Phone
            3. My App in the same Android Phone (uses react-native-ble-manager)

            When I connect to the Raspberry Pi using nRF tool, it connects successfully. But, when I connect using my own Android App it fails.

            In the Raspberry Pi, I ran sudo btmon command to examine the failure log which is shown below:

            ...

            ANSWER

            Answered 2020-Nov-24 at 20:00

            Your event log shows that you're connecting using Bluetooth Classic. If you want to use BLE, use a connectGatt variant where you can select LE as transport parameter.

            Source https://stackoverflow.com/questions/64985001

            QUESTION

            What is the best way to update html continuously without the Maximum call stack size error in javascript
            Asked 2020-Mar-13 at 05:57

            I'm writing a simple text-based game for a friend's website. I need to be able to change an HTML element or update the HTML page without running into the Maximum call stack exceeded error. I'm currently using

            ...

            ANSWER

            Answered 2020-Mar-13 at 05:57

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install payphone

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/jcs/payphone.git

          • CLI

            gh repo clone jcs/payphone

          • sshUrl

            git@github.com:jcs/payphone.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link