Code Monkey home page Code Monkey logo

dialplan's Introduction

dialplan

The dialplan project is two things. One it's a structured gathering of dialplan data you can find on the web. It describes how you dial out of country, how you make national calls and what is the international country prefix. Looking at the entry for Germany you can see

"+49": 
  country: 
  - de
  nprefix: "0"
  iprefix: "00"

that the international country code is 49. In Germany you make national calls by prefixing the area code with a single "0". When dialing out of Germany you would use the international prefix "00". Which means in practise 030... reaches someone in Berlin, while 001... is a call to the US. Calls to "+49" end up in Germany, "+4930" in Berlin even. Given that you know where you are they let you convert between local numbers and the international representation.

If you have updates to the data please send updates for the yaml file - the original source. The other files are just derived from that.

Implementations

The second part of the project are the APIs to make use of the data. So far there are (early) implementations for:

Objective-C

NSString *number = [[DialPlan sharedInstance] internationalizeNumber:@"0301234" forCode:@"+49"];

Ruby

plan = DialPlan::DialPlan.new(path)
country = plan.country('+49')    
assert_equal '+49179', country.internationalizeNumber('0179')

License

All code and data is released under the Apache License 2.0.

Related projects

dialplan's People

Contributors

tcurdt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.