Softpanorama

Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
May the source be with you, but remember the KISS principle ;-)
Skepticism and critical thinking is not panacea, but can help to understand the world better

VOIP

News Recommended Links SIP trunks providers SIP VoIP Protocols Basics SIP Phones Softphones
Asterisk Trixbox FreePBX FreeSwitch      
Magic jack Google Voice Skype VOIP security Phone Fraud Humor Etc

Asterisk is probably the most popular open source VOIP PBX solution. Recently the number of Asterisk users has been increasing dramatically. FreeSwitch also grows in popularity and is used in pretty large deployments. 

Asterisk is the open source IP PBX developed by Mark Spencer. Provides voicemail, conferencing, interactive voice modules and call distribution among its basic features. There are several important open source projects based on Asterisk. Among them

Several sites such as  voip-info.org provides configuration guides, tutorials, forums and some interesting pieces of source codes which you can implement in your Asterisk server at no cost.

Site http://www.nerdvittles.com/  provides step by step tutorials and a list or very interesting list of 100 projects for beginners and advanced users.          
 

NEWS CONTENTS

Old News

[Jan 27, 2020] How to configure an Asterisk dialplan for intra-office calling Enable Sysadmin

Jan 27, 2020 | www.redhat.com

How to configure an Asterisk dialplan for intra-office calling Learn how to configure Asterisk to let two softphones call each other.

Posted January 21, 2020 | by Anthony Critelli

Image
"Telephone - Amalgamated Wireless of Australasia, 300 CBT, circa 1940" is licensed under CC BY 4.0
In the previous article , you learned how to configure the PJSIP channel driver to connect a simple softphone client with your Asterisk installation. However, your phones still can't call each other, and you haven't given them numerical "extensions" yet. Connecting channels together in Asterisk is the work of the dialplan. In this article, you'll learn the basics of the dialplan: What it is, how it's configured, and how to use it to connect phones together.

As a reminder, this is the setup we're configuring:

Image
Network diagram credit: https://extensions.libreoffice.org/extensions/vrt-network-equipment
Dialplan fundamentals

The Asterisk dialplan is responsible for routing calls, so it is often referred to as the heart of an Asterisk system. The dialplan is written in a special scripting language, and it is extremely powerful. You might think of phone systems as simply accepting and connecting calls, but Asterisk is capable of much more. With the dialplan, you can design rich, voice-driven applications. For example, you could create the following call flow for a small business:

  1. An external call comes into Asterisk from a standard telephone number.
  2. An Interactive Voice Response (IVR) system might ask the user to enter basic information, such as their account number.
  3. Asterisk accepts the user's input. The IVR looks up their account and presents them with information (e.g., information about outstanding invoices).
  4. Optionally, the user can be routed to a queue of available customer service representatives. When the employee receives the customer's call, the system provides them with all of the customer's details and saves the caller some time.

While there are other programming interfaces for interacting with Asterisk, the dialplan is the most basic, and understanding it is fundamental to understanding how Asterisk handles calls. According to Asterisk the Definitive Guide , there are four fundamental components to the Asterisk dialplan:

If you're new to Asterisk, this breakdown probably sounds complicated. While Asterisk dialplans certainly can be complex, a simple phone system only requires a simple dialplan. Let's take a look at the dialplan needed to support your intra-office calling scenario. The dialplan is configured in /etc/asterisk/extensions.conf :

[office-phones]

exten => 1001,1,Dial(PJSIP/alice-softphone)

exten => 1002,1,Dial(PJSIP/bob-softphone)

The snippet above is all that is necessary to allow your two phones to call each other. Let's step through each part of this dialplan:

To recap: When a call comes into the office-phones context, Asterisk tries matching that call to an extension. When extension 1001 is dialed, the first step (priority) tells Asterisk to dial the PJSIP endpoint for Alice's phone. When extension 1002 is dialed, the same thing happens for Bob's phone.

This is great so far, but how exactly does a call make its way into the dialplan? The answer lies in the PJSIP endpoint configuration from the previous article:

[alice-softphone]
type=endpoint
context=office-phones
disallow=all
allow=ulaw
auth=alice-auth
aors=alice-softphone
More Linux resources

Notice that the context for each phone is set to office-phones . This setting tells Asterisk that any calls coming from the alice-softphone or bob-softphone endpoints should enter the dialplan in the office-phones context. When Bob dials a number (say, 9000) from his softphone, Asterisk looks in the office-phones context for the matching extension 9000. In the sample dialplan above, this call will fail because there is no matching extension.

You don't have to configure all of your phones to enter the dialplan in the same context. In fact, you'll likely find good reasons to specifically put phones in other contexts. Consider a business that wants to only allow certain people to make international calls, while everyone else is restricted to local calls. You might have two extensions: One to allow unrestricted calling, and one that only allows calls to numbers that start with the local area code. Those with international calling privileges would be placed in the international context, while everyone else would be placed in the local-only context.

That was a lot of theory. Let's get back to the command line and test out the changes that we made to the dialplan. First, you must non-disruptively reload the dialplan to enact the changes you made in the config file:

asterisk-1*CLI> dialplan reload
Dialplan reloaded.

Next, you can inspect the dialplan directly from the Asterisk CLI to ensure that your changes are present:

asterisk-1*CLI> dialplan show office-phones
[ Context 'office-phones' created by 'pbx_config' ]
   '1001' => 1. Dial(PJSIP/alice-softphone) [extensions.conf:3]
   '1002' => 1. Dial(PJSIP/bob-softphone) [extensions.conf:5]

-= 2 extensions (2 priorities) in 1 context. =-

Notice that Asterisk includes the exact file name and line number where an extension and its priority can be found. This information is useful when troubleshooting behavior in your phone system.

With the dialplan reloaded and your changes clearly in place, you should be able to place a test call from Linphone (or whatever SIP endpoint you're using). First, launch the Asterisk CLI with extra verbosity using asterisk -rvvv :

[root@asterisk-1 asterisk]# asterisk -rvvv
Asterisk 16.6.1, Copyright (C) 1999 - 2018, Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 16.6.1 currently running on asterisk-1 (pid = 4138)

Next, place a call from Alice's phone to extension 1002. Assuming that you registered an additional softphone (or physical phone) for Bob, the extension should show as ringing :

Image

The Asterisk CLI also prints informational messages about the call's progression since it was set to verbose mode. You can see the inbound call being handled by the dialplan and handed off to the PJSIP channel driver to dial Bob's softphone. Eventually, once Bob answers, Asterisk bridges the audio for the call together so that both parties can hear each other:

 == Setting global variable 'SIPDOMAIN' to 'asterisk-1.acritelli.com'
                  -- Executing [1002@office-phones:1] Dial("PJSIP/alice-softphone-00000008", "PJSIP/bob-softphone") in new stack
                  -- Called PJSIP/bob-softphone
                  -- PJSIP/bob-softphone-00000009 is ringing
                  -- PJSIP/bob-softphone-00000009 is ringing
                  -- PJSIP/bob-softphone-00000009 answered PJSIP/alice-softphone-00000008
                  -- Channel PJSIP/bob-softphone-00000009 joined 'simple_bridge' basic-bridge <edd9402c-6df0-4fff-a81e-57826dadc652>
                  -- Channel PJSIP/alice-softphone-00000008 joined 'simple_bridge' basic-bridge <edd9402c-6df0-4fff-a81e-57826dadc652>
                  -- Channel PJSIP/bob-softphone-00000009 left 'native_rtp' basic-bridge <edd9402c-6df0-4fff-a81e-57826dadc652>
                  -- Channel PJSIP/alice-softphone-00000008 left 'native_rtp' basic-bridge <edd9402c-6df0-4fff-a81e-57826dadc652>
 == Spawn extension (office-phones, 1002, 1) exited non-zero on 'PJSIP/alice-softphone-00000008'
asterisk-1*CLI>

You have now created enough Asterisk configuration to allow both of your phones to call each other. Congratulations!

Adding another extension

You've now seen basic dialplan configuration that allows two phones to call each other. I also mentioned a few times that Asterisk decouples the concept of a physical phone from an extension because an extension is simply a set of instructions in the dialplan. Let's add another simple extension to the dialplan to see exactly what I mean:

[office-phones]

exten => 1001,1,Dial(PJSIP/alice-softphone)

exten => 1002,1,Dial(PJSIP/bob-softphone)

exten => 9000,1,Answer()
same => n,Playback(hello-world)
same => n,Hangup()

The above configuration adds an additional extension (9000) to the dialplan. When this extension is dialed, Asterisk:

  1. Answers the call.
  2. Plays a hello-world file. This is a sound file included with Asterisk. By default, Asterisk searches for sounds in /usr/lib/asterisk/sounds/ .
  3. Hangs up the call.

Notice the use of the same => n syntax. This is a common and helpful bit of syntactic sugar in the dialplan. Remember that each extension has one or more priorities , or steps, associated with it. The same => n syntax saves you some typing and tells Asterisk that this step is just the next priority for the same extension. The above configuration could also be written as:

exten => 9000,1,Answer()
exten => 9000,2,Playback(hello-world)
exten => 9000,3,Hangup()

With your new configuration in place, reload the dialplan and try dialing extension 9000 to see what happens. Again, the key concept to understand is that you have created an extension that has no physical device associated with it. Asterisk fully decouples the concept of devices and extensions.

Wrapping up

In this article, you learned about the Asterisk dialplan and wrote enough dialplan configuration to enable two phones to call each other. The Asterisk dialplan is extremely powerful, allowing you to build rich communications applications. I strongly recommend that you check out the official Asterisk dialplan documentation and the fifth edition of Asterisk: The Definitive Guide to help you better understand everything that the dialplan has to offer.

In the [next article], you'll work on connecting your phone system to an external provider to enable inbound and outbound calling. [Note: Don't forget to add the link.] Topics: Networking VOIP Anthony Critelli Anthony Critelli is a Linux systems engineer with interests in automation, containerization, tracing, and performance. He started his professional career as a network engineer and eventually made the switch to the Linux systems side of IT. He holds a B.S. and an M.S. More about me

[Jan 26, 2020] Can I connect my landline to the PC and receive calls and make phone calls through this (through the PC) - Quora

Jan 26, 2020 | www.quora.com

Update Cancel

a p d v EoA b QCFY y YNDC U P dtacP a aDju e UuZ s mhNd s IC l w e cAOm r x ss A rfap G NkAPl Which tools are used for monitoring the network traffic and issue in an enterprise network?

You can use any number of tools to monitor your company's network. Some of these tools specialize in just one thing. Wireshark, for example, records and analyzes data traffic.

Co...

(Continue Reading) You dismissed this ad. The feedback you provide will help us show you more relevant content in the future. Undo Answer Wiki 6 Answers Terry Lambert

Terry Lambert , Did kernel and Bluetooth stack work on the iPhone, cell modems on Chromebooks Answered Mar 28, 2019 · Author has 11.7k answers and 33.3m answer views

Yes.

A landline is an analog telephony line, and is usually called a POTS ( Plain Old Telephone Service ) line.

You can put an analog telephony card into a PC that has slots for cards.

This is pretty much how you build your own PBX using Asterisk .

You can also use digital telephony cards to provide connectivity for VOIP handsets within your office.

Typically these handsets are what are known as "IP Phones".


If you want to do this with a laptop, you can do it with a USB dongle.

You can still find USB interfaces "voice modems", such as the US Robotics USR5637 56K USB Controller Dial-Up External Fax Mo...

Continue Reading Loading

Yes.

A landline is an analog telephony line, and is usually called a POTS ( Plain Old Telephone Service ) line.

You can put an analog telephony card into a PC that has slots for cards.

This is pretty much how you build your own PBX using Asterisk .

You can also use digital telephony cards to provide connectivity for VOIP handsets within your office.

Typically these handsets are what are known as "IP Phones".


If you want to do this with a laptop, you can do it with a USB dongle.

You can still find USB interfaces "voice modems", such as the US Robotics USR5637 56K USB Controller Dial-Up External Fax Modem with Voice available for sale at various locations.

There are also cheaper versions, but they are a crap shoot as to whether they're going to work very well or not. The Conexant ones, which are used in the Imported520 products are about 1/6th the price of the US Robotics, and tend to have good reviews. I've never personally use one. 4.9k views · View 4 Upvoters · View Sharers · Answer requested by Alberto Bucciante Related Questions More Answers Below

Dean Rubine Dean Rubine Former Faculty at Carnegie Mellon School Of Computer Science 1991-1994 Studied at Carnegie Mellon University Graduated 1991 Lives in New Hampshire 4.5m content views 224.9k this month Top Writer 2018 Active in 4 Spaces Dean Rubine Dean Rubine Dean Rubine Former Faculty at Carnegie Mellon School Of Computer Science 1991-1994 Studied at Carnegie Mellon University Graduated 1991 Lives in New Hampshire 4.5m content views 224.9k this month Top Writer 2018 Active in 4 Spaces Dean Rubine , former Faculty at Carnegie Mellon School Of Computer Science (1991-1994) Answered Mar 27, 2019 · Author has 4k answers and 4.5m answer views

You certainly used to be able to back in the nineties. Back then computers usually came with RJ11 jacks to plug them into the phone network so you could access dialup services, even dialup internet. Some of the modems evolved into general phone devices, supporting two way voice audio as well as data.

I actually won a computer in 1993; it was an ASUS with Windows 3.11 if I recall, which was subtitled "Windows for Multimedia" or some such. It had a telephone app (we called them programs back then) that let you use the computer as a speakerphone and answering machine. I think it used the then n...

Continue Reading Loading

You certainly used to be able to back in the nineties. Back then computers usually came with RJ11 jacks to plug them into the phone network so you could access dialup services, even dialup internet. Some of the modems evolved into general phone devices, supporting two way voice audio as well as data.

I actually won a computer in 1993; it was an ASUS with Windows 3.11 if I recall, which was subtitled "Windows for Multimedia" or some such. It had a telephone app (we called them programs back then) that let you use the computer as a speakerphone and answering machine. I think it used the then new TAPI API to control it.

The prize computer has this very goofy feature where it would actually boot up when the phone rang, presumably to fire up the answering machine and take a message. But it took a good fraction of a minute to boot; any caller had long hung up.

These days if you want to use your computer as a phone it's generally a VOIP thing like Skype, going out over the internet to some server which can access the regular phone network. But some offices have VOIP with a local PBX connected to shared local POTS (Plain Old Telephone Service) lines right in the office.

You need to find the right device to let you do it these days. You can probably find a TAPI modem with USB on one end and RJ11 on the other and some software to make it work. I haven't tried it for 25 years so I won't try to be more specific. 2.6k views

s AUY p REfs o qFqqi n giDS s VkeB o Fg r Zhug e wKr d qgAM bpyN b smpJ y bQe WPRi T vvBy e CRiYl l cY l kg o F LDhH M Gg o Ucl b fLS i F l ims e mr Switch to Tello for unbeatable prices. Build your own plan with minutes, text & data and pay only for what you use. No contract, no catch. Start Now You dismissed this ad. The feedback you provide will help us show you more relevant content in the future. Undo John Nakulski John Nakulski , I worked for Australia's largest phone company. Answered Mar 30, 2019 · Author has 1.1k answers and 1.5m answer views

You've described what a Reverse ATA is and does, approximately. I've seen this question here on Quora before. Such devices used to exist. You could put together a solution that does this today, at a little cost and some effort.

You're better off ditching your landline and using Skype or a VoIP service.

If it's for an elderly person or someone with hearing loss ot a disability, get a seniors phone or a seniors video phone. 1.2k views · Answer requested by Alberto Bucciante Chris Summers Chris Summers , Worked in cellphone sales and service for 5 years, computer also for 15 years. Answered May 24, 2019 · Author has 7.9k answers and 5m answer views

PCs use to come with a 56k modem that did just that. You could still do that either by getting a card for a tower or by a USB adapter. There are several programs out there that will also work with this set to use the line as your telephone and you could use a headset with a mic to use the computer as your telephone too. You would need to look on a site like Newegg or tigerdirect for the cards or adapters. 1.3k views · Answer requested by Alberto Bucciante Alberto Bucciante Studied at Universidad De León Lives in Bristol, UK Alberto Bucciante Related Questions More Answers Below

Charles Verrier Charles Verrier , Worked in IT for 30 years Answered Mar 27, 2019 · Author has 1.6k answers and 413.2k answer views

Yes -but not easily.

It used to be called CTI (Computer Telephony Integration) and you could do things like get your PC to dial numbers from a database, or automatically recognise incoming calls and display the contact record for the caller.

There was a software standard called TAPI (Telephony Application Programmers Interface) that standardised the software/hardware interaction, although it suffered from quite bad fragmentation in different manufacturers.

This kind of technology has largely been replaced or superseded by VOIP, so it may be tricky to find hardware or software that still talks ...

Continue Reading Loading

Yes -but not easily.

It used to be called CTI (Computer Telephony Integration) and you could do things like get your PC to dial numbers from a database, or automatically recognise incoming calls and display the contact record for the caller.

There was a software standard called TAPI (Telephony Application Programmers Interface) that standardised the software/hardware interaction, although it suffered from quite bad fragmentation in different manufacturers.

This kind of technology has largely been replaced or superseded by VOIP, so it may be tricky to find hardware or software that still talks to good old fashioned landlines now.

There are devices like this

Computer Telephony CTI Card - USB TAPI-compatible Voice Modem

[Jan 26, 2020] How to connect my telephone line to PC and answer phone calls using headsets

Jan 26, 2020 | www.quora.com

Update Cancel

a RrJ d sP AsNXT b WyA y xIO pek T YH e gQDS l zTzWC l Fy o lBsG osRgW M Pb o mr b F i qmM l t e Ugyn Switch to Tello for unbeatable prices. Build your own plan with minutes, text & data and pay only for what you use. No contract, no catch. Start Now You dismissed this ad. The feedback you provide will help us show you more relevant content in the future. Undo Answer Wiki 3 Answers Altuğ Gür


Altuğ Gür , Avid Bluetooth user for about two decades Answered Dec 13 2016 · Author has 841 answers and 1.9m answer views

This was a rather interesting thing around the end of 90s but quickly lost traction.

There are still solutions but mostly outdated and compatibility/support is questionable so YMMV.

Avanquest classic phone tools promises to deliver this functionality so you may give it a go.

PhoneTools

So does CallSoft.

Call Soft Advanced Voice/Fax Software for Windows

Price range for both products are about $US30.

However, if you're open to suggestions, I'd recommend small landline extension devices that connect directly to phone. They come with a simple but functional headset with mic. You just need to connect t...

Continue Reading Loading

This was a rather interesting thing around the end of 90s but quickly lost traction.

There are still solutions but mostly outdated and compatibility/support is questionable so YMMV.

Avanquest classic phone tools promises to deliver this functionality so you may give it a go.

PhoneTools

So does CallSoft.

Call Soft Advanced Voice/Fax Software for Windows

Price range for both products are about $US30.

However, if you're open to suggestions, I'd recommend small landline extension devices that connect directly to phone. They come with a simple but functional headset with mic. You just need to connect the small dialpad unit to the handset slot of your phone, plug the headset into the dialpad unit and you're done. This setup is not prone to software crashes, incompatibilities or performance issues yet they allow you to make and answer phone calls easily while leaving your hands free.

Been more than 20 years since I've used one so I'm not sure about the availability.

Hope this helps!

Edit:

Managed to find one!

Amazon.com: Work From Home Office Telephone Call Center Dial Key Pad Phone + Headset Headphone with Mute Volume Control: Electronics 9.2k views · View 1 Upvoter · Answer requested by Chintan Shah Chintan Shah Chintan Shah

[Jan 26, 2020] Connect an Asterisk system to the public switched telephone network

Jan 26, 2020 | www.redhat.com

Learn how to set up Asterisk so your softphones can receive incoming calls from outside and make outgoing calls outside your organization as well.

Posted January 23, 2020 | by Anthony Critelli

Image
"Telephone Pole" by Fried Dough is licensed under CC PDM 1.0
In two previous articles, you learned how to configure two SIP phones and the Asterisk dialplan to enable the phones to call each other. Having two phones that can call each other is great, but most organizations want to connect their phone system to the public switched telephone network (PSTN) to allow for inbound and outbound calling to others outside of the organization. In this article, you will learn some background about how to connect to the PSTN and you will see the Asterisk configuration needed for this connectivity.

Note: I've mentioned it several times throughout this series, but it is especially important for this article to understand how to secure your phone system. Connecting to a telephony provider can open you up to all sorts of issues, such as toll fraud, if you aren't careful about controlling who can connect to your phone system (e.g., via firewall rules). Be sure to read the README-SERIOUSLY.bestpractices.md documentation that comes with the Asterisk source code and understand every piece of configuration that you add to Asterisk.

Connecting to the PSTN

Obtaining a telephone number and connecting your phone system to the PSTN might sound like a difficult task, but it's actually pretty easy. Larger organizations may choose to use a local telecommunications provider or their local Internet company, but there are also a variety of online providers available (e.g., Twilio and VoIP.ms , among many others). I will be using VoIP.ms for the phone numbers in this article.

More Linux resources

No matter who you choose, the process is fairly straightforward. You will buy a phone number (often called a direct inward dial, or DID), and you'll configure your phone system to connect with the provider's phone system via SIP. This setup is often referred to as a SIP trunk . The process of configuring your phone system to work with your chosen provider can vary, so it's always best to consult the provider's documentation or work with their voice engineers if you run into trouble.

Let's take a look at the general best practices for configuring your phone service. These are not comprehensive, but they should provide a base of sound advice when working with your provider:

PJSIP configuration

The first step in configuring PSTN connectivity is to define the SIP configuration necessary for Asterisk to communicate with the IP telephony provider. This information will vary a bit by provider, but many of them provide information about the parameters that you need (VoIP.ms actually provides Asterisk-specific instructions ):

Image

In my case, the configuration in /etc/asterisk/pjsip.conf looks like this:

[voipms]
type=endpoint
transport=transport-udp
context=inbound-calls
disallow=all
allow=ulaw
auth=voipms
outbound_auth=voipms
aors=voipms

[voipms]
type=registration
transport=transport-udp
outbound_auth=voipms
client_uri=sip:redacted VoIP.ms username@newyork1.voip.ms:5060
server_uri=sip:newyork1.voip.ms:5060

[voipms]
type=auth
auth_type=userpass
username=redacted VoIP.ms username
password=redacted VoIP.ms password

[voipms]
type=aor
contact=sip:redacted VoIP.ms username@newyork1.voip.ms

[voipms]
type=identify
endpoint=voipms
match=newyork1.voip.ms

Most of this configuration probably looks familiar , but this configuration does introduce two new PJSIP section types: a registration and an identify . The registration section tells Asterisk to explicitly register with the upstream voice provider's server. The identify section tells Asterisk that SIP traffic coming from newyork1.voip.ms should match the voipms endpoint.

After reloading PJSIP, I can see that my local Asterisk server successfully registered with the provider's SIP infrastructure. Note that issues during this stage of the process are fairly common, and you may need to work with your provider to understand what "they see" so that you can effectively troubleshoot:

asterisk-1*CLI> pjsip show registrations

<Registration/ServerURI..............................> <Auth..........> <Status.......>
==========================================================================================

voipms/sip:newyork1.voip.ms:5060                  voipms            Registered

Objects found: 1
Inbound dialplan configuration

Next, Asterisk has to be told what to do with incoming and outgoing calls. Incoming and outgoing calls in Asterisk aren't fancy, they are just extensions in the dialplan like any other extension. I will discuss incoming calls first. Like any programming language, it's important to understand what your goals are before you start writing code. In my case, I wanted a dialplan that would:

  1. Answer an inbound call from the DID that I purchased from my provider.
  2. Allow the user to enter an extension (one for Alice, two for Bob).
  3. Call the appropriate user once the extension was dialed.

Notice that in the above PJSIP configuration, I am using the inbound-calls context for calls from my SIP provider. Here's what that context looks like in /etc/asterisk/extensions.conf :

[inbound-calls]

exten => 1234567890,1,Answer()
same => n,Playback(hello)
same => n,WaitExten(30)
same => n,Hangup()

exten => 1,1,Answer()
same => n,Dial(PJSIP/alice-softphone)

exten => 2,1,Answer()
same => n,Dial(PJSIP/bob-softphone)

Notice that I replaced my real DID with the fake 1234567890 for privacy reasons. You will want to use your real DID if you are following along. Also, notice that my phone number follows a United States numbering convention (a three-digit area code followed by a seven-digit number).

Let's step through this contents of this configuration together:

  1. When my DID is called, Asterisk matches the 1234567890 extension. It answers the call.
  2. Asterisk then plays a built-in "hello" message. In a real environment, you might want to record your own prompts for Asterisk to use.
  3. Asterisk then calls the WaitExten application with a value of 30. This value tells Asterisk to wait up to 30 seconds for the user to enter an extension.
  4. Assuming the user enters an extension of "1" or "2", the dialplan will jump to that extension. Notice that the "1" extension will call Alice's softphone, and the "2" extension will call Bob's softphone.

Once the above configuration is in place, you can reload the dialplan and place a test call to your PSTN phone number. You should hear Asterisk say "hello," and you should be able to dial one of the extensions and have the phone on the other end ring.

Outbound dialplan configuration

Being able to place inbound calls is great, but most businesses expect outbound calling functionality as well. Luckily, this is fairly easy to configure.

First, recall from the previous article about intra-office calling that outbound calls for Alice and Bob's phones enter the dialplan in the office-phones context. Therefore, we need a way to match all outbound calls in this context and send them to the upstream provider.

Until now, you've seen extensions configured as exact matches. Extension 1001 matches and dials Alice, extension 1002 matches and dials Bob, and the extension for your inbound DID matches and allows the caller to input a selection. It would obviously be impractical to match every single possible outbound number that a user might dial. Thankfully, Asterisk provides a way to perform pattern matching.

To provide outbound calling for American numbers -- e.g., (123) 456-7890 -- my office-phones context looks like this:

[office-phones]

exten => 1001,1,Dial(PJSIP/alice-softphone)

exten => 1002,1,Dial(PJSIP/bob-softphone)

exten => 9000,1,Answer()
same => n,Playback(hello-world)
same => n,Hangup()

exten => _XXXXXXXXXX,1,Set(CALLERID(all)="Anthony Critelli <1234567890>")
same => n,Dial(PJSIP/${EXTEN}@voipms)

If you already took a look at the Asterisk wiki's linked pattern matching documentation, this syntax will look familiar. The outbound extension matches _XXXXXXXXXX , which is a fancy way of saying: "Match a sequence of 10 digits." The underscore indicates that this character is the beginning of a pattern match, similar to the use of the forward-slash (/) in many programming languages to indicate the use of a regular expression. Therefore, this extension will match any 10-digit extension that I send to it, such as standard 10-digit US phone numbers. A more complete example would also account for country codes, local calling, and other considerations. That is an exercise left up to the reader.

The first priority in this extension sets the CALLERID to a string of my choosing. You should replace the name and number with your own name and DID. This practice also introduces another concept in the Asterisk dialplan: The use of variables. In the configuration above, both CALLERID and EXTEN are variables that you have available to manipulate.

The second, and final, priority in the extension simply sends the call to the upstream provider via the PJSIP channel driver. This syntax is pretty straightforward, and it looks a lot like the dialplan that you already wrote to allow two phones to call each other.

With this configuration in place, you can reload your dialplan and try placing a test outbound call from Alice or Bob's phone. Assuming that everything went well, your call should succeed.

Wrapping up

If you've stuck with me from the beginning , then you have successfully implemented a basic phone system using the open source Asterisk PBX. You've come a long way. From understanding VoIP and Asterisk basics to installing and configuring Asterisk from scratch, you should now have an idea of how to configure a simple phone system. Minimally, I hope this series has sparked your interest in learning more about telephony and Asterisk.

If you want to continue your VoIP and Asterisk journey, then I recommend that you check out these resources:

Want more on networking and connectivity topics? Check out the Linux networking cheat sheet .

Asterisk 1.6 Dinosaur or Ostrich… It Really Doesn't Matter

April 16, 2008 | Nerd Vittles

Jonas:

Digium's point of view is a very dangerous one. The thing is that Asterisk is pretty crappy software (pieces mysteriously break than start working again in the next release, it's happened to me a few times) but the third party service and software ecosystem around it are better than anything else.

Digium has to realize this and do anything to keep third party developers and maintainers happy. If not, they won't stand a chance in future competition from big brands above as well as from smaller projects such as freeswitch below.

xxx:

Quick comment: this isn't just a "Digium thing" in the way upgrades work; this is typically how software development goes in all organizations. Major version number changes mean API changes. That's just how the world works. If you couldn't change an API, then you wouldn't be able to grow and expand the feature set in the software, or sometimes even fix bugs, or increase reliability and scalability.

I have not heard about any fixed date or time frame for EOL'ing Asterisk 1.4. Since a lot of people are still running 1.2, I would imagine 1.4 will be with us for a long time yet (certainly more than a year).

The 1.6 branch has come out, is in beta mode, and I'm not sure what all the hubbub is about in third party incompatibilities. All major version upgrades are going to have things change in them that you couldn't otherwise do, and thus third party applications are going to need to keep pace - and it's not like you HAVE to run 1.6 in production (in fact, you shouldn't… it's not even out of beta yet).

In addition, the 1.6 branch is going to use a different release methodology, which is really the main reason a 1.6 beta is even out in the first place. This does not indicate 1.4 is going EOL anytime soon. Digium's Business Edition C.1.x software was only released around January, and I doubt there is any rush to deprecate that piece of work.

You're probably going to have 1.4 and 1.6 in lockstep for quite some time. The difference between 1.4 and 1.6 is quite a bit less than the difference between 1.2 and 1.4. The reason for 1.6 is that since you CAN'T just release software every year and EOL the existing software, then that means you have to wait 2+ years before you can even start using the new features. Some people can't wait that long, so you have two paths available to you now. 1.6 will allow new features to go in at each minor version release (this means 1.6.x, where 'x' is the minor version, and 6 is the major version - this is significant). So now we have two different methodologies.

A branch that only receives bug fixes and security fixes (1.4), and a branch that receives bug fixes, security fixes, and is allowed to implement new features (this follows the same time of release strategy as the Linux kernel - this is not a new concept). Digium has now also started using release candidates before creating a new release (as per the communities request), so you have the ability to test for any bugs that may have been introduced before the full released is put out for public consumption.

If you need to run 1.4, then go ahead, nothing is going to stop you from doing that, and it's not going away anytime soon. If you need the latest and greatest, or there is some new feature you absolutely must run in production, then you can run a 1.6 machine (when it stabilizes and comes out of beta and release candidate status) with just the feature you absolutely need in a stripped down version, or after extensive testing, then you could put it into production.

I personally think Digium is doing the "Right Thing(tm)" here and giving us choice, and isn't that what this is all about?

stavros:

Despite the extra work it creates, I'm with Digium on this. It's often impossible to add flexibility or improve performance whilst maintaining API compatibility. The reason for the majority of API changes is to address short-sighted decisions in the original design; backwards compatibilty enforces perpetuation of the poor choice and a clean break must be made at some point. The re-plumbing work to which Jared refers is long overdue and, as he intimates, is necessary to provide the enterprise-grade platform for which you are all clamouring.

Whilst a simple upgrade tool for syntax in extensions.{conf|ael} might save a few folks a few minutes, I don't think that's where the bulk of this problem lies. We'd all love to have tool to automatically fix all the AGI/AMI code out there, written in PHP, Perl, C, etc, but it's impossible to do algorithmically. That said, I believe it would be possible to add a compatibility shim to PHPAGI, for instance, to allow most if not all existing PHP AGI scripts to run without modification.

The suggestion that Digium are responsible for fixing everyone else's code is simply ludicrous. As Jared explained, many of the devs can't legally touch much of the code that will need to be fixed. Even if they could I doubt they'd want to; fixing code with which you're not familiar is fraught with difficulties. It's even less appealing when you consider that much AGI code is crufty nonsense written by amateurs. The logical conclusion of this argument is that Microsoft must be similarly charged with fixing every third-party application broken by a service pack, and the Linux/glibc folks must cease scheduled development and spend the rest of eternity fixing all the userspace regressions just assigned to them by downstream!

I'm not sure how you reached your conclusion that Digium have their head in the sand based on Jared's response. You had the opportunity to shape the development of the areas of v1.6 which displease you. I'm afraid it was you with your head in the sand, ignorant of all the work happening in public view for all to see, discuss and even influence. If Digium's track-record with Asterisk v1.2 is anything to go by, you've a long time yet before v1.4 will be unmaintained. There's plenty of time to adapt and to test before you need to look at using v1.6 in production.

Please stop criticising the Asterisk devs for doing necessary work. You may not see it, but they do have our best interests in mind. The benefits of a more maintainable, better architected and more consistent Asterisk codebase far outweigh any short-term heartache during the transition.

[WM: There's a significant difference in saying that "Digium [is] responsible for fixing everyone else's code" and saying that "Digium has responsibility for not breaking everyone else's code." If you reread the article, I think you'll find that I suggested the latter. As for a conversion utility saving a few folks a few minutes, I've spent the better part of six months cleaning up the carnage in dozens of applications that was directly caused by the needless syntax obsolescence imposed in Asterisk 1.4. And for what? I provided a good example in the article that broke virtually every dialplan. Suggesting that such changes were necessary to "improve the engine" is pure B.S. Funny you'd mention Microsoft. I wrote a shareware database management system (WAMPUM) in 1985 for DOS that still runs just fine under Windows XP and Vista.

In fact, I regularly hear from folks that still are using it… almost two decades later! Maybe that's the reason Microsoft is still around while Lotus 1-2-3 (that owned 95% of the spreadsheet market at one point) is now just a blip in the history books.

If you recall, Lotus developers came up with the brilliant idea to change much of 1-2-3's spreadsheet syntax. It gave everyone the perfect opportunity to switch to Excel.]

Using trixbox CE as a SIP Gateway

Jun 05, 2009 | VoipStore
If you have a need to have multiple PBX systems running and you want them all to make and receive calls, you will run into a major problem with that because of NAT issues and port forwarding limitations. In this article, I will explain how to use a trixbox CE system as a front-end gateway that will manage the trunks to the SIP providers and forward calls to the different PBX systems as well as allow the PBX systems to dial out through the trixbox CE system.

Besides testing different PBX platforms like I do, why might you want to do a setup like this? There are several reasons I can think of:

While this is only showing a SIP provider to multiple PBX's, the concept can also be applied to a SIP trunk coming into the gateway and then a PRI connection to a legacy PBX that doesn't support SIP trunks, thus allowing a non-IP PBX system to use VoIP trunks.

We won't go into the setup of the actual SIP trunk into the trixbox CE (FreePBX) system as that is dependant upon the provider and should be pretty straightforward. What we will need to do is create trunks from the other PBX systems into the trixbox CE box in order to route calls

Voice Marketing Vendors | Voice Broadcasting | Business.com

10 Best VoIP Web Hosts Compared - 2009 WHDb

Dot5Hosting: Home and commercial users can tap a VoIP system into Dot5Hosting, as this company's servers are linked to the Internet via fiber-optic connections that span more than seven diverse backbones and well-known providers such as Congent, So net and Time Warner. Their systems include a high power UPS generator electrical backup, closed circuit monitoring and redundant air-conditioning systems. But that's not the only redundancy they boast - they utilize Dell and IBM servers which run Dual Intel Xeon processors with 2GB of DDR-RAM and SCSI hard drives with RAID-1 redundancy. Current packages start at $3.95 per month.

Asterisk Voip hosting - Web Hosting Talk

SimonT,

We provide VoIP service to business customers and do so with asterisk, we have load balanced dell servers with P4 2.8Ghz HT processors and during peak usage each node is handling around 100-120 concurrent calls with almost no load.

so as others have said, you don't need much in the way of hardware, figure 30Mhz of CPU per call.

Login, Inc. - Data Solutions Provider

[Sep 14, 2009] Wide Open VoIP Top 50 Open Source VoIP Apps Virtual Hosting Blog

For many businesses, open source VoIP programs and apps offer a great way to save thousands of dollars every year in telephony costs. Better yet, open source programs are fully customizable to a business' specific needs, making them a popular solution that often just can't be beat. This popularity hasn't just helped business, but has also driven many open source programs to the forefront of their industry. In fact, it has been speculated that open source VoIP solutions could surpass the popularity of the ubiquitous desktop solution Linux. Here are a few of the open source programs and developers out there that have had loads of success as VoIP and open source solutions for it become more and more common in businesses around the world.

Recommended Links

Totek - Asterisk VoIP (SIP) News & Technology Source - Home



Etc

The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D


Copyright © 1996-2018 by Dr. Nikolai Bezroukov. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) in the author free time and without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

You can use PayPal to make a contribution, supporting development of this site and speed up access. In case softpanorama.org is down you can use the at softpanorama.info

Disclaimer:

The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

Last modified: March 12, 2019