Why?


Search This Blog

Sunday, January 18, 2015

Broadworks Setting up new TN in AS and Adtran for Analog line

Setting up new numbers in AS and Adtran for Analog line

Add TN in AS for Service Providers
Navigate to System > SPID
Choose Service Provider (SPID-120 is for local Phoenix)
Click Resources on far left then Numbers on mid right
Add/Remove/Edit Numbers in window
end

Add TN in AS for Service Providers/Group
Navigate to System > SPID > Group
Resources left. Assign Numbers right. Click Add in top row.
Add number so it is in Assigned to Group box on far right
end

Add TN in AS for Service Providers/Group/Users
Click Addresses in middle
Use phone number drop down select in window
end

Adding new TN for a Trunk Group (Business only)
Navigate to System > SPID > Group
Click Services left. Click Trunk Group on right
Click Edit on name of Trunk
Click Profile on far left and the Profile on mid right
Scroll to bottom and click Search
Scroll to bottom and click Edit on name/number you want to edit
Click Profile on far left then Addresses on mid right
Use phone number drop down select in window for change
end


Setting up TN in AS for FXS use in Adtran
Get Tn ready in AS for a non Trunk type number
    1. System > Service Provider > Groups > Group Name > Edit
    2. Click Users, search, then click on phone number.
    3. Click Profile on far left then Addresses mid right
    4. select TN from Phone Number drop down
    5. Select radio button Identity/Device Profile
    6. Select your device from  Identity/Device Profile Name
Set auth name and password for the TN from AS for use in Adtran
    1. System > Service Provider > Groups > Group Name >
    2. Click Profile far left then Users, search, then click on phone number.
    3. Click Utilities on far left then Authentication
    4. Authentication User Name: Set to user name (authnamehere)
    5. Password set: what you want (123456)
DO NOT register number under SIP Voice Trunk In Adtran settings. You reg this under the FXS voice user. see below.
In Adtran cli
    (copnfig)# voice user 6020000000                                 //6020000000 is replaced your number that you will use//
    (config-6020000000)# connect fxs 0/1                            //enter the fxs port you want to use//
    (config-6020000000)# password "1234"                            //enter 4 char password here//
    (config-6020000000)# description "Analog Line 6020000000"        //6020000000 is replaced your number that you will use
    (config-6020000000)# sip-identity 6020000000 T01 register auth-name "authnamehere" password "123456" //get auth-name from AS//
    (config-6020000000)# sip-authentication password "123456"









Broadworks General Systems Overview

General
    SBC - Session Border Controller. has public and private ip address. performs NAT and security/fraud checking. invites
    from customer go to SBC then SBC to NS to lookup address. SBC keeps port open between the client phone/pbx.
   
    AS - Application Servers. gives all the services/features and handle call setup and tear down. always in pairs
    (clusters). No dial plan!! if making call from inside the enterprise AS will route call if it stays inside its
    group. If it does not find the address it will ask the NS how to route the call. AS creates all the billing records.
    AS has to have NS tell it what call type and call category it is.
   
    NS - Network Server. Core routing for system. knows all the AS's in the enterprise, gateways, and holds all the dialplans.
    NS allows for single domain (voip.cableone.net) when using multiple AS clusters.
   
    MGC - Media Gateway's (PSTN). On incoming call converts to SIP and RTP and looks up address on NS for routing to AS.
   
    MS - Media servers. Handle three way calling, ring all, conferencing, IVR, plays busy greetings (audio files). voice mail
    records are handled by media server. We do not use them for RTP though. We use Level 3 for RTP.
   
    XSP - Web Server. proxy through for phone provisions to PS.
   
    PS - Profile Server.
   
    EMS - Element Management Server. Does alarming and data aggregation. Also able to download software updates and notify you of them.
    it does no auto patching
   
    AMS - skinny/SIP conversion with cisco phones
   

NS Network server - Core routing and translation server
Introduction

    SBC, AS, Gateway, XSP all communicate with NS to determine route.
   
    AS ask for routing on any destination outside of group?
   
    Gateways ask for routing calls inbound all the time (single domain with multi AS clusters).
   
    AS's use sync API to sync all enterprise, group, user, tn's, etc., info to NS so it can do lookups.
    sync API should never be turned off.
   
    NS_CLI/System/Device/RoutingNE> for gateways
    NS_CLI/System/Device/RoutingNE/Address> to give the gateway an address (IP or FQDN)

    NS_CLI/System/Device/ResourceNE> for media servers
    NS_CLI/System/Device/ResourceNE/Address> to give media server an address (IP or FQDN)
   
    NS_CLI/System/Device/HostingNE> for AS clusters/pairs
    NS_CLI/System/Device/HostingNE/Address> to give application server an address (IP or FQDN)

NS Network server - Core routing and translation server
Policies and Profiles   

    Controls number normalization, translation, billing, routing, digit manipulation. set of instructions that tells
    the NS how to do a task.
   
    NS_CLI/Policy/Profile> set profiles for inbound and outbound. set profiles for groups of customers. IE residential vs business.
   
    NearEndRtg, SvcCtrRtg, FarEndRtg are all policies to get a voip call out to PSTN.
   
    NS_CLI/System/Device/RoutingNE> get
    You can see what profile is assigned to the gateways.
   
    NS_CLI/SubscriberMgmt/Enterprise> get
    see hosting profiles for the enterprise.
   
    VTR (source number in e164 format, destination number)
   
   
   
   
   
   

Broadworks Some Useful Commands

Broadworks commands

login as bwadmin
to AS server


bwshowver (show version of broadworks)
showrun (show running services)
healthmon //-l, -d for detail// (Health monitor)
repctl - //stop, start, status, ls, lock all// (replication control)
synchcheck_full.pl
        This script is for redundant servers and ensures that the specified local
        database is identical to remote databases.
        All servers local and remote will be LOCKED. Otherwise, the result of this
        script is undefined. (Consequently, it should be run in periods of low usage.)
        NOTE: locking servers can take up to 10+ minutes.

ttstatus (TimesTen Status)
bin (takes you to bin dir)
conf (takes you to conf dir)
peerctl ls //just peerctl for other options// (cluster peer control)
            (peerctl lock on server pairs is for maint windows. locks out changes. does not prevent call processing)
           
stopbw (stops call processing!!!! turns off all services. used for upgrades, etc.)
startbw (restart services after you using stopbw)
peercmd (run commands on machines in cluster/pairs)
            (peercmd bwshowver\;showrun\&\&repctl status // runs three commands in a row on server cluster/pairs//

tech-support (script ran to gather support info. Make sure you have logging turned on in putty before running command)   
swmanshowver (display version of bw patching tool. needs to match with xchange.broadsoft.com version)


bwcli section
? = help
l  = login

l admin (login as admin from inside bwcli)
AS_CLI/System/Licensing> get (see licensing)
AS_CLI/Maintenance/ManagedObjects> qbw //will show status of running apps in broadworks. must all be unlocked.


CENTOS 6.6 and Asterisk 11.15.0 Install

Here is a setup I use in my lab for testing purposes. Production customer equipment is Nortel BCM (PBX) with T1/PRI to Adtran IAD 908 or 908e. The Adtran uses the Ethernet port to connect to our network where we use SIP Trunking via Broadsoft clusters. Since we don’t have spare Nortel BCM’s laying around I use Asterisk as my PBX. This allows me to test everything other than the BCM equipment, which I am not responsible for anyway. The T1/PRI card I use in my Asterisk server is the Digium Wildcard TE110P T1/E1.

I wanted to document the setup so anyone on my team could easily setup an asterisk server for the purpose described above. I will not go into the Adtran IAD setup or anything else outside the Asterisk server in this document.

I hope this helps someone.

CENTOS 6.6 and Asterisk 11.15.0 Install Part 1

1. Download CENTOS 6.6 Minimal Install ISO
2. Burn to CD/DVD
3. Boot PC on CD/DVD
4. Install OS
5. After Install reboot
6. Verify hostname
            # hostname
7. Setup Network

             # cd /etc/sysconfig/network-scripts
  1. change ifcfg-eth0 file to reflect like the following example below. Your UUID and HWADDR should not be changed. Below is just an example.
DEVICE=eth0
HWADDR=00:12:3F:B8:CD:FF
TYPE=Ethernet
UUID=d960e22d-214f-450c-b017-a3ad590bb225
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=x.x.128.8
NETMASK=255.255.255.0
GATEWAY=x.x.128.1
BROADCAST=x.x.128.255
DNS1=x.x.1.10
DNS2=x.x.1.12
8. Restart network services
# services network restart
9. Run ifconfig, ping from remote machine to server, and ping google.com from server to verify. Now you can ssh in from your workstation
10. update new install
# yum update –y
11. Disable SELinux
# vi /etc/selinux/config
and chang to:
SELINUX=disabled
12. Stop iptables
# service iptables stop
13. Prevent iptables from auto starting
# chkconfig iptables off
14. Reboot
# reboot


Setting up NTP in Centos 6.6

 First we need to make sure we have the correct date, time, and timezone. You can verify with:

# cat /etc/localtime

Set your time zone with (for Phoenix AZ USA)

#cp /usr/share/zoneinfo/America/Phoenix /etc/localtime


Now check date

# date
Sun Mar 29 01:10:44 MST 2015

You can verify this at the hardware level with:

# hwclock -r
Sun 29 Mar 2015 01:13:51 AM MST  -0.156631 seconds


If  these are incorrect then we can set the OS first and then update the hardware with the date command. The syntax is: date "day month year hh:mm:ss" So if we wanted to change this to March 2 2015 at 1:00pm we would use:

# date -s "2 MAR 2015 13:00:00"

When we have the date correct in the OS we can update the hardware with:

# hwclock -w

Now that we have the correct date and time lets install and setup ntp. First lets install ntp if not already installed.

# yum -y install ntp*

Next edit the the ntp.conf file so we are using the correct time servers.

# vi /etc/ntp.conf

I usually use the public servers from the pool.ntp.org project of:
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst


After you have those in lets start the service and make sure it is on in startup.

# service ntpd start
Starting ntpd:                                             [  OK  ]
# chkconfig ntpd on

Now lets verify the setup by looking at our peers.

# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*deekayen.net    209.51.161.238   2 u   43   64    3   75.257  -22.456   3.017
 origin.towfowi. 204.9.54.119     2 u   43   64    3   31.405  -14.629   2.683
 NTP2.playallian 129.6.15.30      2 u   43   64    3   50.576  -14.090   3.465
 sola-dal-09.ser 10.0.77.54       4 u   42   64    3   59.879   -1.507   2.629
l

CENTOS 6.6 and Asterisk 11.15.0 Install Part 2

NOTE: 2015/12/28
I have used my own doc many times to install Asterisk. but today I layed down CentOS release 6.6 (Final) with Kernel 2.6.32-504.el6.x86_64. I did not apply any updates. When it tried to install Kernel-devel it could not find it. Just Google "Kerenel-devel 2.6.32-504.el6.x86_64 RPM" and download it. You can then do a "yum install kernel-devel-2.6.32-504.el6.x86_64.rpm". Make sure you have the correct path to the file. After this you can continue. Without Kernel-devel you will not be able to compile the sources. You should try the command "yum install kernel-devel-$(uname -r)" first though before searching and downloading it manually.

1 Installation of Basic Dependencies
Asterisk 11.15.0 requires some prerequisite dependencies. Here is the command line to install them:
# yum -y install kernel-devel-$(uname -r) libtool* make gcc patch perl bison flex-devel gcc-c++ ncurses-devel flex libtermcap-devel autoconf* automake* autoconf libxml2-devel cmake sqlite* wget

2 Downloading Your Asterisk Source Code
Move to directory /usr/src by given command:
# cd /usr/src/
Now download the Source Code tar balls using these commands (one by one or at a time):
# wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz

3 Extraction of Downloaded Files
Extract the downloaded tar balls to their corresponding directories using:
# tar -zxvf dahdi-linux-complete*
# tar -zxvf libpri*
# tar -zxvf asterisk*

4 DAHDI Installation
DAHDI (Digium Asterisk Hardware Device Interface) can be installed using the command line:
# cd /usr/src/dahdi-linux-complete*
# make && make install && make config

5 LibPRI Installation
In order to enable your BRI, PRI and QSIG based hardware, you will be needing PRI Library or LibPRI. You can install these libraries using:
# cd /usr/src/libpri*
# make && make install

6 Changing Asterisk Directory
Now you have to move back to the Asterisk Installation Directory:
# cd /usr/src/asterisk*

7 Running Configure Script for Asterisk
At this point, you need to know your CentOS 6 Architecture (32 or 64 Bit). In many cases you are aware of it. In case you are not, try this command:
# uname -a
For 32 Bit, you will be getting response like:
2.6.18-238.12.1.el5 #1 SMP Tue May 31 13:23:01 EDT 2011 i686 i686 i386 GNU/Linux

For 64 Bit, system will respond with something like:
2.6.18-238.19.1.el5 #1 SMP Fri Jul 15 07:31:24 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

Based on your OS Architecture, go ahead with these commands for Asterisk Configuration Script. During the process the asterisk build menu may be displayed. Simply press the esc key one time to exit and continue the install.
For 32 Bit:
# ./configure && make menuselect && make && make install

For 64 Bit:
# ./configure --libdir=/usr/lib64 && make menuselect && make && make install

8 Installing Sample Files
Install Sample Files using:
# make samples

Once done, add the Asterisk Install Script in directory /etc/init.d/ using:
# make config

9 Starting DAHDI
To start DAHDI Device Drivers, use:
# service dahdi start
Loading DAHDI hardware modules:
  wct4xxp:                                                 [  OK  ]
  wcte43x:                                                 [  OK  ]
  wcte12xp:                                                [  OK  ]
  wcte13xp:                                                [  OK  ]
  wct1xxp:                                                 [  OK  ]
  wcte11xp:                                                [  OK  ]
  wctdm24xxp:                                              [  OK  ]
  wcaxx:                                                   [  OK  ]
  wcfxo:                                                   [  OK  ]
  wctdm:                                                   [  OK  ]
  wcb4xxp:                                                 [  OK  ]
  wctc4xxp:                                                [  OK  ]
  xpp_usb:                                                 [  OK  ]

Running dahdi_cfg:                                         [  OK  ]
 

10 Start Asterisk
Finally, start Asterisk:
# service asterisk start

11. Reboot
# reboot


CENTOS 6.6 and Asterisk 11.15.0 Install Part 3 setting up DAHDI

I am using the Digium Wildcard TE110P T1/E1 Card into an Adtran 908E. The Adtran has a SIP trunk to a CLEC. The T1/PRI card in the Asterisk server is used deliver 23 phone channels (1 channel out of the 24 is used for clocking) to/from the Adtran/Asterisk.
1 Generate system.conf file by running:
# /usr/sbin/dahdi_genconf
My /etc/dahdi/system.conf has the following
# Autogenerated by /usr/sbin/dahdi_genconf on Sun Dec 28 23:00:55 2014
# If you edit this file and execute /usr/sbin/dahdi_genconf again,
# your manual changes will be LOST.
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: WCT1/0 "Digium Wildcard TE110P T1/E1 Card 0" (MASTER) ESF/B8ZS
span=1,1,0,esf,b8zs
# termtype: te
bchan=1-23
dchan=24
echocanceller=mg2,1-23
# Global data
loadzone        = us
defaultzone     = us
As it says the above file, “Autogenerated by /usr/sbin/dahdi_genconf”. And “If you edit this file and execute /usr/sbin/dahdi_genconf again, your manual changes will be LOST.”
Now make sure your /etc/asterisk/chan_dahdi.conf has the following, add to end of file: (This will create the channels for you)

context=from-test
switchtype=national
siganling=pri_cpe
group=1
channel => 1-23

2 Now stop and start DAHDI and asterisk

# service asterisk stop
Stopping safe_asterisk:                                    [  OK  ]
Shutting down asterisk:                                    [  OK  ]

# service dahdi stop
Unloading DAHDI hardware modules: done

# service dahdi start
Loading DAHDI hardware modules:
 wct4xxp:                                                 [  OK  ]
 wcte43x:                                                 [  OK  ]
 wcte12xp:                                                [  OK  ]
 wcte13xp:                                                [  OK  ]
 wct1xxp:                                                 [  OK  ]
 wcte11xp:                                                [  OK  ]
 wctdm24xxp:                                              [  OK  ]
 wcaxx:                                                   [  OK  ]
 wcfxo:                                                   [  OK  ]
 wctdm:                                                   [  OK  ]
 wcb4xxp:                                                 [  OK  ]
 wctc4xxp:                                                [  OK  ]
 xpp_usb:                                                 [  OK  ]

D: auto '/sys/bus/dahdi_devices/devices/pci:0000:04:00.0'
auto-assign /sys/bus/dahdi_devices/devices/pci:0000:04:00.0
Running dahdi_cfg:                                         [  OK  ]

# service asterisk start
Starting asterisk:

3 Now lets verify


# lsdahdi
              ### Span  1: WCT1/0 "Digium Wildcard TE110P T1/E1 Card 0" (MASTER) ESF/B8ZS
 1 PRI        Clear       (EC: MG2 - INACTIVE)
 2 PRI        Clear       (EC: MG2 - INACTIVE)
 3 PRI        Clear       (EC: MG2 - INACTIVE)
 4 PRI        Clear       (EC: MG2 - INACTIVE)
 5 PRI        Clear       (EC: MG2 - INACTIVE)
 6 PRI        Clear       (EC: MG2 - INACTIVE)
 7 PRI        Clear       (EC: MG2 - INACTIVE)
 8 PRI        Clear       (EC: MG2 - INACTIVE)
 9 PRI        Clear       (EC: MG2 - INACTIVE)
10 PRI        Clear       (EC: MG2 - INACTIVE)
11 PRI        Clear       (EC: MG2 - INACTIVE)
12 PRI        Clear       (EC: MG2 - INACTIVE)
13 PRI        Clear       (EC: MG2 - INACTIVE)
14 PRI        Clear       (EC: MG2 - INACTIVE)
15 PRI        Clear       (EC: MG2 - INACTIVE)
16 PRI        Clear       (EC: MG2 - INACTIVE)
17 PRI        Clear       (EC: MG2 - INACTIVE)
18 PRI        Clear       (EC: MG2 - INACTIVE)
19 PRI        Clear       (EC: MG2 - INACTIVE)
20 PRI        Clear       (EC: MG2 - INACTIVE)
21 PRI        Clear       (EC: MG2 - INACTIVE)
22 PRI        Clear       (EC: MG2 - INACTIVE)
23 PRI        Clear       (EC: MG2 - INACTIVE)
24 PRI        HDLCFCS

# dahdi_scan
[1]
active=yes
alarms=OK
description=Digium Wildcard TE110P T1/E1 Card 0
name=WCT1/0
manufacturer=Digium
devicetype=Digium Wildcard TE110P T1/E1
location=PCI Bus 04 Slot 01
basechan=1
totchans=24
irq=0
type=digital-T1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=B8ZS,AMI
framing_opts=ESF,D4
coding=B8ZS
framing=ESF


Now from asterisk console do:
# asterisk -r
localhost*CLI> dahdi show status
Description                              Alarms  IRQ    bpviol CRC    Fra Codi Options  LBO
Digium Wildcard TE110P T1/E1 Card 0      OK      8      0      0      ESF B8ZS          0 db (CSU)/0-133 feet (DSX-1)
localhost*CLI>

localhost*CLI> dahdi show channels
  Chan Extension       Context         Language   MOH Interpret        Blocked    State      Description
pseudo                 default                    default                         In Service
     1                 from-test                  default                         In Service
     2                 from-test                  default                         In Service
     3                 from-test                  default                         In Service
     4                 from-test                  default                         In Service
     5                 from-test                  default                         In Service
     6                 from-test                  default                         In Service
     7                 from-test                  default                         In Service
     8                 from-test                  default                         In Service
     9                 from-test                  default                         In Service
    10                 from-test                  default                         In Service
    11                 from-test                  default                         In Service
    12                 from-test                  default                         In Service
    13                 from-test                  default                         In Service
    14                 from-test                  default                         In Service
    15                 from-test                  default                         In Service
    16                 from-test                  default                         In Service
    17                 from-test                  default                         In Service
    18                 from-test                  default                         In Service
    19                 from-test                  default                         In Service
    20                 from-test                  default                         In Service
    21                 from-test                  default                         In Service
    22                 from-test                  default                         In Service
    23                 from-test                  default                         In Service

Edit your /etc/asterisk/sip.conf and /etc/asterisk/extensions.conf files and get your phones registered.

CENTOS 6.6 and Asterisk Install 11.15.0 Part 4 Setting up Phones

Edit /etc/asterisk/sip.conf and add the example below, to bottom of file. Substitute phone number you will be using

[6026356915]
type=friend
callerid="Asterisk 100" 6026356915
secret=password
context=internal
host=dynamic
allow=all
dtmfmode=rfc2833

Edit /etc/asterisk/extensions.conf and add the following to end of file

[internal]
;used to pass special character’s to DAHDI (T1/PRI)
exten => _[*#0-9]!,1,Dial(DAHDI/g1/${EXTEN})
exten => _[*#0-9]!,n,Hangup

;used to pass numbers dialed to DAHDI (T1/PRI)
exten => _X.,1,Dial(DAHDI/g1/${EXTEN})
exten => _X.,n,Hangup

;used to pass extension dialed, 100, to registered phone of 6026356915
exten => 100,1,Dial(SIP/6026356915,20)
exten => 100,n,Playback(vm-goodbye)
exten => 100,n,Hangup

;this is what we used in chan_dahdi.conf
[from-test]
exten => 6026356915,1,Dial(SIP/6026356915,20)
exten => 6026356915,n,Playback(vm-goodbye)
exten => 6026356915,n,Hangup

Go to the asterisk console:
# asterisk –r

Issue command:
localhost*CLI> core reload
This will reload asterisk modules and reflect your changes.

Setup phone and register. Verify by:
localhost*CLI> sip show peers

Watch messages with
localhost*CLI> core set verbose 99

END