Wednesday, April 28, 2010

Benefits of using trunk group instead of multiple T1/E1 trunks

(Explaination is based on benefits of creating trunkgroup of two T1 lines)

  • Less programming of trunk groups in the CO to manipulate overflow whether it be in or out. That is, if 1 trk group is busy there will be no need for overflow to the other trunk group. If it is one trunk group all the channels will hunt to next channel if they are in use whether it is inbound or outbound. Traditionally, incoming starts from trk member 1, outbound starts from trk member 46.

  • You will also get a backup d-channel that wil be available if the primary has a problem. If for some reason another span is needed, depending if the Asterisk is capable of doing this, it can be set-up as a full T1 rather than a PRI. This will get you an additional b-channel for voice and the full T1 can be a rider AND use the the d-channel signaling form the other spans.

Q: How can we achieve that in asterisk?

Ans: NFAS (Non-Facilities Associated Signaling) is an ISDN feature for sharing one ISDN D channel accross multiple ISDN PRI lines.

http://www.voip-info.org/wiki/view/NFAS

http://www.asterisk.org/doxygen/asterisk1.2/Config_zap.html

Thursday, April 15, 2010

SIP trunk between two Asterisk Servers

Let say I have two asterisk servers R01 and S01

; ****************
; *** SIP.CONF ***
; ****************
;
; Summary:
; - Configuration for SIP protocol
; - All phone registration information resides here
;
; Server: R01
; File location: /etc/asterisk/sip.conf
; *****************
;

[general]
disallow=all
allow=ulaw
canreinvite=no

register => trunk-S01-R01:welcome@[IP-add-of-S01]/trunk-S01-R01

[trunk-R01-S01]
type=friend
secret=welcome
host=dynamic
context=from-S01
;username=trunk-S01-R01

[1000]
type=friend
context=phones
host=dynamic
username=1000
secret=abc123



; ****************
; *** SIP.CONF ***
; ****************
;
; Summary:
; - Configuration for SIP protocol
; - All phone registration information resides here
;
; Server: S01
; File location: /etc/asterisk/sip.conf
; ***************
;

[general]
disallow=all
allow=ulaw
canreinvite=no

register => trunk-R01-S01:welcome@[IP-add-of-R01]/trunk-S01-R01

[trunk-S01-R01]
type=friend
secret=welcome
host=dynamic
context=from-R01
;username=trunk-R01-S01

[2000]
type=friend
context=phones
host=dynamic
username=2000
secret=abc123



DIALPLAN

;******************
;extensions.conf
;
;Server: R01
;******************

[globals]

[general]
autofallthrough=yes

[Internal]
exten => _1XXX,1,NoOp()
exten => _1XXX,n,Dial(SIP/${EXTEN},30);
exten => _1XXX,n,Playback(the-party-you-are-calling)
exten => _1XXX,n,Hangup()

[External]
exten => _2XXX,1,NoOp()
exten => _2XXX,n,Dial(SIP/trunk-R01-S01/${EXTEN},30)
exten => _2XXX,n,Hangup()

[phones]
include => Internal
include => External

[from-S01]
include => Internal


;******************
;extensions.conf
;
;Server: S01
;******************
[globals]

[general]
autofallthrough=yes

[Internal]
exten => _2XXX,1,NoOp()
exten => _2XXX,n,Verbose(1,I am in Internal)
exten => _2XXX,n,Dial(SIP/${EXTEN},30)
exten => _2XXX,n,Hangup()

[External]
exten => _1XXX,1,NoOp()
exten => _1XXX,n,Verbose(1,I am in External)
exten => _1XXX,n,Dial(SIP/trunk-S01-R01/${EXTEN},30);
exten => _1XXX,n,Playback(the-party-you-are-calling)
exten => _1XXX,n,Hangup()

[phones]
include => Internal
include => External

[from-R01]
include => Internal


>Start Asterisk #asterisk
>Go to Asterisk Console #asterisk -rv
CLI> sip show peers
CLI> sip show registry

Friday, April 9, 2010

SPAN in details (for Asterisk)

SPAN is the trunk parameter defined in /etc/dahdi/system.conf [ traditionally /etc/zaptel.conf ] for the PRI interface.

Trunk can be T1/E1.

span = [span num], [timing], [line build out], [framing], [coding]

e.g span = 1,0,0,esf,b8zs

This means, the specified trunk is mapped to SPAN 1 of the T1 card. It uses internal clock of card as time source as second parameter is 0. LBO is 0 and it doesn't require to be changed most of the time as cable is not going to be more than 133ft from smart jack. Framing is esf. Coding is b8zs.
[ Also remember, each PRI card should have their own independent clock source ]
In brief, you can say, this particular trunk is esf,b8zs with internal clock as time source.


I would like to write about some other parameters defined in /etc/dahdi/system.conf

span = 1,0,0,esf,b8zs
bchan=1-23 #B-Channel defination
dchan=24 #D-Channel defination

Since bchan+dchan=24, it is T1 trunk configuration.
For E1 trunk, bchan+dchan=31

Also note that FRAMING and CODING is main factor that can distinguish between T1 and E1 trunk.
--------------T1----------------------E1
Framing -- esf / d4------------ ccs / cas
Coding ---- b8zs / ami -------- hdb3 / ami
-----------------------------------------


When you talk about Trunk, you also need to specify the switch type. Switchtype parameter is defined in /etc/asterisk/chan_dahdi.conf . It can be National or dms100 or 5ess

Default Switch: National
Nortel Switch : dms100 [ but it's weird that in my case, i had to use 5ess switchtype to interface my Asterisk Server with Nortel Switch]
Dialogic Fax Server Switch : dms100

So, PRI with following configuration can be said as T1 trunk with esf,b8zs signalling and National switchtype.

#/etc/dahdi/system.conf
span = 1,0,0,esf,b8zs

#/etc/asterisk/dahdi.conf
switchtype = National



Wonderful explaination at :

http://www.asteriskguru.com/tutorials/pri_zaptel.html
http://www.asteriskguru.com/tutorials/pri.html


Telcom Terminologies

ISDN : Integrated Service Digital Network
=> 1.544Mbps line
=> Based on T1/E1
=> Carry DSO signal

BRI : Basic Rate Interface for SOHO
2B + 1D

PRI : Primary Rate Interface for large enterprise
T1: 23B + 1D
E1: 30B + 1D

PRI channels are typically used by medium to large enterprises with digital PBXs to provide them digital access to PSTN.

PRI is service and T1 is the hardware used for delivery. For eg. TE420 is one of the T1 hardware for PRI.

B - Channel : B stands for Bearer; It's an ISDN channel that carries data
D - Channel: D stands for Delta; It's an ISDN channel that carries control and signaling information


CSU/DSU : Channel Service Unit/Data Service Unit
=> It is a digital interface to connect DTE device, like router, to a digital circuit (eg. T1/E1 line)
=> It operates at physical layer of OSI model.