* You are viewing the archive for the ‘Asterisk Tips’ Category

Asterisk Virtualization

Last Updated: 29-Nov-2013

If you are about to dive into the process of Asterisk virtualization or are considering the options for any VoIP Software or PBX phone system then some primary issues might be preventing you from moving (e.g. the lack of proper timing as you need it for IAX2 trunking). If this is your case, consider these options and the pro and cons of each one:

  • OpenVZ – Better resource usage, lower overhead. Primary issue is how to grant access to host node timing source (physical device, or dahdi_dummy in /dev/dahdi/) to the containerized Asterisk process.
  • KVM – Higher overhead, easier installation, ‘true virtualization’. Primary issue is not timing per se, but KVM scheduling. Timing source, while present from dahdi_dummy natively may still not get proper scheduling by KVM process. This could also affect general call quality (even non IAX2 trunked voice), DTMF, etc.
  • VMware – They are moving all server products to their ESXi engine. (The old VMware “server” and ESX products are moving to legacy status – with these you could actually do stuff on the kernel). ESXi is no longer a kernel you can mess with, can’t install drivers, etc. ESXi is being treated as an appliance that you cannot and should not touch (even authorized partners like HP only get to add software through VMware). Many of these devices are not (and will not be) recognized by the VMware kernel, so forgot about host support. At best you can pass-through the device to a single guest, but then you lose the whole point of a shared timing source.
  • XEN – Virtual machines can use both hardware- or paravirtualization. It has been used to separate machines where people should do their sip-registration (internet / intranet /
    pstn-gateway) and the actual dial-beast.

In order to take the most out of Asterisk virtualization besides easy scaling and ability to perform an upgrade in no-time, upgrade to the latest version of Asterisk, as it has a newer timing source that don’t rely on Dahdi and a complete rewrite of ConfBridge which doesn’t require Dahdi for mixing at all.

Tips For Installing And Configuring Digum Cards

What things do you wish you had been warned while configuring Digium Cards at client’s site? These tips and suggestions will help you avoid pitfalls that will arise (according to Murphy’s law) late in the night and when you have the bigger pressure to have the whole thing working.

This information is based on a brainstorm that was raised in the community user’s list.

Information you should ask for:

  • What are the Ts configuration settings? You could try to get an order form from the client.
    • Line coding (ami, b8zs, hdb3)
    • Framing (d4/esf, cas, ccs)
    • Jack type (RJ48X, RJ45)
    • ISDN protocol (NI2, etc.)
    • Primary D-Channel assignment
  • What’s the relationship between the Ts? NFAS ?
  • Will a telco’s tech who can make changes be available for you by phone?
  • Willl you be receiving digits, if so, how many?
  • How will CID be configured?
  • How they want you to send numbers on outgoing calls, do you need to insert the STD code even for a local call?

Things you must take into account:

  •  Sometimes Telco’s technicians tend to sound very secure of information they have not confirmed, so, don’t blindly believe what they say; and use something like
    exten => s,1,NoOp(Call to ${EXTEN})

    to see how they are _actually_ sending numbers to you. Start out by sending your numbers in the same format, but don’t expect consistency.

Reminders you might found useful:

  • The dahdi program dahdi_genconf creates 2 files:
  1. /etc/dahdi/system.conf
  2. /etc/asterisk/dahdi-channels.conf

The latter is the one that maintains the configuration for asterisk. File chan_dahdi.conf is where the configuration is maintain, you will need to have an

#insert dahdi-channels.conf

at the start of chan_dahdi.conf, otherwise it will never be read. Else you can type the configuration yourselft in chan_dahdi.conf

There are no contexts ( [XXXX] ) in chan_dahdi.conf, so you have specify the characteristics and then specify the channels the characteristics apply to.

characteristic-a = foo
characteristic-b = bar
channel = 1

characteristic-b = baz
channel = 2

results in channel 1 having foo and bar while channel 2 has foo and baz.

Lastly, get sure to bring caffeinated beverages with you, as it will help you keep sharper focus.

Websockets On Asterisk 11 And SipML5

In order to set up a user in Asterisk so that It can register via sipml5, on Asterisk 11. In the sip.conf entry for the account you are trying to register as place the following:

transport=ws

Example:

[3002]
username002
secret=XXXXXXXXX
host=dynamic
type=friend
context=test
disallow=all
allow=g729
;allow=all ; Allow codecs in order of preference
allow=ilbc
allow=silk8
allow=gsm
transport=ws

 

Now, modify the sipml5 library so that the URL looks like this: ws://example.org:8088/ws (with the /ws at the end, as instructed). In order to get sure that the 8088 port is open, and that Asterisk is actually listening for WebSockets traffic, remember to enable the http.conf module:

 

enabled=yes

 

Recommended VOIP Monitoring Tools

As system administrator, monitoring the continuity of services is vital. Today I would like to highlight some tools that could come in handy for VoIP monitoring.

Nagios

For those of you who didn’t know it, Nagios can be configured to monitor pretty much anything you want, including Asterisk servers. Actually, with Nagios the (much) harder part is deciding what’s relevant to monitor, and what your alarm thresholds should be set at.

Some VoIP community members have reported that they used Nagios to monitor ~4,000 hosts and about 8,000 to 10,000 services before they started running into scaling problems on a single box.

For this purpose you might want to take a look at Nagios’ NSCA (Nagios Service Check Acceptor), is a Linux/Unix daemon that allows you to integrate passive alerts and checks from remote machines and applications with Nagios. It’s useful for processing security alerts, as well as redundant and distributed Nagios setups.

SmokePing

This is a free and OpenSource Software written in Perl written by Tobi Oetiker, (the creator of MRTG and RRDtool) that keeps track of your network latency and can provide SIP Ping Probe capabilities. Between the functionality list it provides, we have:

  • Outstanding latency visualisation.
  • Interactive graph explorer.
  • Wide range of latency measurment plugins.
  • Master/Slave System for distributed measurement.
  • Highly configurable alerting system.
  • Live Latency Charts with the most ‘interesting’ graphs.

Monitor PBX (or Монитор АТС in russian, it’s original language)

The homepage of this tool (which is completely in Russian) says that it is an open source utility that allows real-time visualization of key performance indicators Asterisk based telephony server. And that it is designed to evaluate the performance of the system under test, and in commercial operation.

(I think they should really consider adding an English version of the website)

 

Sure there is a big span of very useful and extraordinary tools around. So far, taking ideas from the Asterisk Community I could recommend this two. If you know about any other tool that could be use for this purpose, don’t hesitate to contact me and I’ll get sure to mention it here.

Last Update: 01-Oct-2012

Flowroute: Howto Set Outbound Callerid (ast 1.4)?

The flowroute website mentions that they set callerid on outbound calls based on the presence of (in order of preference):
“P-Asserted-Identity”, “Remote-Party-ID” or “From:”.

I’ve been trying to make outbound callerid work via flowroute to no avail. Does anyone have an extensions.conf / sip.conf snippet howto make this work? This is for Asterisk 1.4.44.

Asterisk Directmedia

What is directmedia?

To put it simply, is the process where Asterisk tries to redirect the RTP media stream to go directly from the caller to the callee. Be careful that some devices do not support this (especially if one of them is behind a NAT). The default setting is YES, for example in the SIP protocol configuration file sip.conf.

When should I use directmedia in Asterisk?

If you have all clients behind a NAT, or for some other reason want Asterisk to stay in the audio path, you may want to turn this off.

If you want to allow media path redirection (reinvite) only when the peer where the media is being  sent is known to not be behind a NAT (as the RTP core can determine it based on the apparent IP address the media arrives from), set this to nonat.