Skip to content

AccelerateNetworks/NumberSearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CodeQL .NET Build Status

NumberSearch

NumberSearch is the website for Accelerate Networks a Seattle-based communication services company. ☎

Try it out here!

NumberSearch.Mvc contains a session-based shopping cart and ecommerce system to enable customers to submit orders for products, services, and phone numbers. The number searching tool allows you to purchase a phone number and queries a PostgreSQL database hosted locally alongside the Mvc app to maximize performance. The Ingest app pulls between 300 thousand and a million purchasable phone numbers a day from a half dozen upstream VOIP carriers. The most popular area codes are refreshed every 15 minutes.

Porting is the process of moving a phone number from one carrier to another. When customers switch their VOIP service to Accelerate Networks they often choose to retain their existing phone numbers by using the porting process. The bulk phone number porting tool allows enterprise customers to move hundreds of numbers over to our network in a single order. It also verifies the current carrier and caller Id records to help our customers make sure that they are bringing over the phone numbers that intended too.

The Ops app is an administrative tool for processing orders submitted through the Mvc app and handling line of business task like registering phone number for E911 service, completing port requests, and managing the hardware inventory deployed onsite to customers.

There are three supporting libraries: Tests, DataAccess, and FirstCom. Tests is where all our unit, integration, and functional tests are written. The tests verify that our code can correctly and consistently interact with our vendors and 3rd party dependencies. The DataAccess library is a set of data models and SQL queries for interacting with the PostgreSQL database that is shared between the Mvc, Ops, and Ingest apps. Finally the FirstCom library exists to isolate the autogenerated code required to interact with a vendor’s SOAP API endpoints. 👀

The Messaging project is an API that abstracts our upstream SMS/MMS carriers from our internal services.

Architecture

NumberSearch drawio (6)

Run locally on Windows 11

  • Install Visual Studio 2022 Community Edition.
  • Open Visual Studio 2022 (VS2022).
  • Select the "Clone or check out code" option under "Getting Started" on the project selection splash screen.
  • Login to Github if required.
  • Clone this repo from the Master branch.
  • With the project directory now open in VS2022 click the "NumberSearch.sln" file to configure Visual Studio.
  • At the top center of the VS2022 window there is a button with a green arrow labelled "IIS Express" this will run the project on a local web server.
  • Make sure that NumberSearch.Mvc is the currently selected project.

Add configuration keys locally

  • In the VS 2022 menu bar click "Tools" > "NuGet Package Manager" > "Package Manager Console"
  • Run this command to setup a local secrets store "dotnet user-secrets init --project .\NumberSearch.Mvc".
  • Then run this command "dotnet user-secrets init --project .\NumberSearch.Tests".
  • More info and troubleshooting details on configuring user-secrets.

Run on a Debian Server

Install .Net Core SDK, navigate to the project folder and run dotnet publish --configuration Release

Number Import

Create a cronjob using crontab -e to run the ingest:

23 1 * * *  /usr/bin/dotnet /var/www/numberSearch.Ingest/NumberSearch.Ingest.dll >> /var/log/NumberSearchIngest.log 2>&1

Run as a service

Move numbersearch.service to the correct directory, enable it and start the process:

cp numbersearch.service /etc/systemd/system/numbersearch.service
chmod 644 /etc/systemd/system/numbersearch.service
systemctl daemon-reload
systemctl enable numbersearch.service
systemctl start numbersearch.service

Continuous Integration and Deployment

Check out our Azure DevOps pipelines.