Sunday 25 May 2014

GNS3 simulator with real network integration


It's really hard to get all network equipment at home for simulation.

1. It's very expensive
2. We are going to use for simulation and after that???

Hence Simulator :-)

GNS3 plays a vital role in Network Engineer's simulation life. So Voice Engineers.

While trying to simulate CME in router, it is mandatory to connect with real / SOHO network. Here is the configuration steps to integrate GNS3 simulator with real network.

Like GNS3 it's simple

1. Check your PC IP configuration where GNS3 is installed


2. Create a topology in GNS3 with a virtual router and a cloud node.

Router has a FastEthernet 0/0 interface which is connected on the Cloud C1 node's NIO Ethernet


3. Configure the NIO Ethernet of Cloud node with the LAN of the PC


4. Configure the Interface of fa0/0 of Router with an IP address which is in the same subnet of the PC

That's it. Now I can ping from any PC to the router in my network and vice versa

Note: It is not possible to ping between the router and the PC where GNS3 is installed




AsteriskTechs


Wednesday 19 February 2014


LLDP - Link Layer Discovery Protocol

Discovering neighbour devices in a network solves many configuration issues. 

Neighbour discovery protocols define a standard method for Ethernet network devices, such as switches and routers, to receive and/or transmit device-related information to other nodes on the network, and to store the information that is learned about other devices.

Link Layer Discovery Protocol (LLDP) is a Layer 2 protocol defined by the IEEE Standard 802.1AB-2005.

LLDP allows Ethernet network devices to advertise details about themselves, such as device configuration, capabilities and identification, to directly connected devices on the network that are also using LLDP. 

LLDP is a “one hop” protocol; LLDP information can only be sent to and received by devices that are directly connected to each other by the same link. Devices that are directly connected to each other are called neighbours. Advertised information is not forwarded on to other devices on the network


LLDP is designed to be managed with Simple Network Management Protocol (SNMP). We provide a command line interface to manage LLDP, however SNMP is the recommended interface as LLDP is designed to be automatically managed from Network Management Systems (NMS).

Advertisements are sent in packets called LLDP Data Units (LLDPDUs). The data sent and received via LLDPDUs is useful for many reasons. For example, the switch can discover which of the other devices on the network are each other’s neighbours, and through which ports they connect to each other.
You can configure the switch to do the following:

  • transmit information about itself to neighbours
  • receive device information from neighbours
  • store and manage received information in an LLDP MIB

Each device that uses LLDP has its own LLDP agent, which is a software entity that implements LLDP. The LLDP agent is responsible for the reception, transmission, and management of LLDP.



LLDP defines the following:

  • A set of common advertisement messages (Type Length Values).
  • A protocol for transmitting and receiving advertisements. 
  • A method for storing the information that is contained within received advertisements

Type Length Values

The LLDP agent transmits and receives information via LLDPDUs. A single LLDPDU contains multiple advertisement messages, each of which is communicated within a Type Length Value (TLV). TLVs are short information elements which communicate complex data, such as variable length strings, in an organized format. Each TLV advertises a single type of information that identifies the sending device, for example, its device ID, type, or the address or addresses. 


Each LLDPDU contains at least four mandatory TLVs by default. You can also configure the switch to send up to five optional additional TLVs. 

Thursday 13 February 2014


Asterisk Voice Delay

Unlike standard telephony, where there is no perceivable delay between voice transmission and receipt, at least on local calls, VOIP introduces a number of extra layers than can increase this delay.

Here are a few things you can look at to reduce this delay:
 
  • Ensure all codecs in use are non compressed. Any compression will add additional delays.
  • Use the same codecs on each end. Conversion means extra processing, adding delays.
  • Turn off all jitterbuffers. These introduce a small delay to compensate for fluctuations in latency.
  • Use the smallest packet size possible. Usually this is 30 or 20ms but it may be possible to reduce it, depending   on the phone hardware.
  • Ensure the media is not being passed through the PBX, so the phone is sending audio directly to the other   endpoint. For sip use -+canrevite=no+=.

Monday 10 February 2014



Asterisk dialplan - An overview


The dialplan is truly the heart of any Asterisk system, as it defines how Asterisk handles inbound and outbound calls. In a nutshell, it consists of a list of instructions or steps that Asterisk will follow. Unlike traditional phone systems, Asterisk’s dialplan is fully customizable. To successfully set up your own Asterisk system, you will need to understand the dialplan.


The Asterisk dialplan is specified in the configuration file named extensions.conf.


The dialplan is made up of four main concepts: contexts, extensions, priorities, and applications.


Contexts


Dialplans are broken into sections called contexts. Contexts are named groups of extensions, which serve several purposes. Contexts keep different parts of the dialplan from interacting with one another. An extension that is defined in one context is completely isolated from extensions in any
other context, unless interaction is specifically allowed.


Extensions

In the world of telecommunications, the word extension usually refers to a numeric identifier given to a line that rings a particular phone. In Asterisk, however, an extension is far more powerful, as it defines a unique series of steps (each step containing an application) that Asterisk will take that call through. Within each context, we can define as many (or few) extensions as required. When a particular extension is triggered (by an incoming call or by digits being dialed on a channel), Asterisk will follow the steps defined for that extension. It is the extensions, therefore, that specify what happens to calls as they make their way through the dialplan. Although extensions can certainly be used to specify phone extensions in the traditional sense cause the SIP telephone set on John’s desk to ring), in an Asterisk dialplan, they can be used for much more. The syntax for an extension is the word exten, followed by an arrow formed by the equals sign and the greater-than sign, like this:

exten =>


Priorities


Each extension can have multiple steps, called priorities. Each priority is numbered sequentially, starting with 1, and executes one specific application. As an example, the following extension would answer the phone (in priority number 1), and then hang it up (in priority number 2):


exten => 123,1,Answer()
exten => 123,2,Hangup()



Unnumbered priorities


In older releases of Asterisk, the numbering of priorities caused a lot of problems. Imagine having an extension that had 15 priorities, and then needing to add something at step 2. All of the subsequent priorities would have to be manually renumbered. Asterisk does not handle missing steps or misnumbered priorities, and debugging these types of errors was pointless and frustrating. Beginning with version 1.2, Asterisk addressed this problem. It introduced the use of the n priority, which stands for “next.” Each time Asterisk encounters a priority named n, it takes the number of the previous priority and adds 1. This makes it easier to make changes to your dialplan, as you don’t have to keep renumbering all your steps. For example, your dialplan might look something like this:


exten => 123,1,Answer()
exten => 123,n,do something
exten => 123,n,do something else
exten => 123,n,do one last thing
exten => 123,n,Hangup()



Priority labels

Starting with Asterisk version 1.2 and higher, common practice is to assign text labels to priorities. This is to ensure that you can refer to a priority by something other than its number, which probably isn’t known, given that dialplans now generally use unnumbered priorities. To assign a text label to a priority, simply add the label inside parentheses after the priority, like this:


exten => 123,n(label),application()


Applications


Applications are the workhorses of the dialplan. Each application performs a specific action on the current channel, such as playing a sound, accepting touch-tone input, dialing a channel, hanging up the call, and so forth. In the previous example, you were introduced to two simple applications: Answer() and Hangup(). You’ll learn more about how these work momentarily.




Ref: Asterisk - The Future of Telephony


We will update with detailed explanation of dialplan with realtime examples in our next post.

Thank you

AsteriskTechs

Sunday 1 December 2013

Asterisk and SIP Protocol


The Session Initiation Protocol (SIP) is a peer-to-peer protocol, and while it is common to have a setup where endpoints act as clients, and some sort of gateway acts as a server, the protocol itself thinks in terms of peer-to-peer relationships. What this means is that a SIP telephone is quite capable of making a direct connection to another SIP telephone, without a PBX in between.


The reality is that most SIP transactions happen through a server of some sort, and in the case of Asterisk, it is common to have the PBX remain in the middle, bridging all connections. When a SIP call is made from a telephone to another telephone through Asterisk, there are actually two calls happening: a call from the originating set to Asterisk, and another separate call from Asterisk to the destination set (this second leg of the call might not even use SIP). Asterisk bridges the two together.

Using a SIP phone with Asterisk means that you will want to configure the SIP telephone to send all its calls to Asterisk, even though the device is quite capable of directly connecting to another SIP endpoint without the Asterisk server. The phone will treat Asterisk as its proxy server (even though Asterisk is in fact a Back to Back User Agent, or B2BUA), and will look to Asterisk for routing decisions for all calls.

Saturday 30 November 2013

Asterisk integration with Cisco Unified Communication Manager using SIP Trunk

Today we are gonna integrate Asterisk with Cisco Unified Communications Manager.

Below is the setup:



Configuration on CUCM:

Configure Cisco IP Communicator with the TFTP address and copy the 'Device Name'.

























Create a phone in CUCM:


CUCM application -> Device -> Phone -> Add New

Phone Type: Cisco IP Communicator




















Select the device protocol: SIP



















Device Name: Enter the Device Name copied on Cisco IP Communicator






















Below are mandatory fields has to be filled in while Cisco IP Communicator

Device Pool:
SIP Profile:
Phone Button Template:
Device Security Profile:


Create SIP Trunk:

























Mention the IP address of Asterisk for registraton



Create a Route Pattern:

























Asterisk Extensions starts with patter 98XXX. Hence the pattern is managed as below with the Gateway as 'Asterisk' SIP Trunk.







  Now we are going to manage ASTERISK:
 SIP extensions and SIP trunk has to be created on /etc/asterisk/sip.conf





































Calls has to reach the extensions when dialed. So a dialplan has to be managed in /etc/asterisk/extension.conf









Note: I will explain in details about the sip.conf and extension.conf in a later post.

Registering XLite on Asterisk with the credentials configured in sip.conf




Asterisk SIP registration status



That's it. We are good to make a call.


Calling from Cisco IP communicator to Asterisk extension










Please find the configuration as text for your reference:


/etc/asterisk/sip.conf:


;Asterisk extensions
[98001]
secret=1234
context=cisco
qualify=yes
type=friend
host=dynamic


[98002]
secret=1234
context=cisco
qualify=yes
type=friend
host=dynamic


;SIP Trunk to Cisco
[fromcisco]
type=friend
qualify=yes
allow=all
nat=no
insecure=very
host=10.1.1.25
context=cisco
dtmfmode=rfc2833


register=>cisco@10.1.1.25

/etc/asterisk/extension.conf


[cisco]
exten => _98XXX,1,AGI(lookup.agi)
exten => _98XXX,n,Set(CALLERID(name)=${lookupcid})
exten => _98XXX,n,Dial(SIP/${EXTEN},5)
exten => _98XXX,n,Voicemail(${EXTEN}@default)
exten => _98XXX,n,Hangup()


exten => 99999,1,VoiceMailMain()


exten => _7XXXX,1,Dial(SIP/fromcisco/${EXTEN},20)
exten => _7XXXX,n,Hangup()


Hope you find a good time :)


Thanks,
Asterisk Techs Team

Welcome All

Greetings Folks,


This blog is to explore Asterisk PBX. I would post Asterisk based techs and infos on this blog.

First, what is Asterisk PBX:

It is a open source software switch / PBX / Telephony System created by Mark Spencer of Digium in 1999.

Like any PBX, it allows attached telephones to make calls to one another, and to connect to other telephone services, such as the public switched telephone network (PSTN) and Voice over Internet Protocol (VoIP) services. Its name comes from the asterisk symbol, *.

Asterisk is released under a dual license model, using the GNU General Public License (GPL) as a free software license and a proprietary software license to permit licensees to distribute proprietary, unpublished system components.

Originally designed for Linux, Asterisk also runs on a variety of different operating systems including NetBSD, OpenBSD, FreeBSD, Mac OS X, and Solaris. Asterisk is small enough to run in an embedded environment like Customer-premises equipment-hardware running OpenWrt.
 
The PBX comes with AGI and AMI which are API. Using these APIs it is possible to design the call flow or working of the telephony system with almost any programming language.
 
 Lets see Asterisk Techs in the forthcoming posts.Hope you all enjoy.
 
Please share your feedback to improve the blog.
 
Warm greetings,
Asterisk Techs Team :)