Tuesday, March 22, 2016

1120e/1140e with asterisk with licence manager available to you

In my case, we had a full Nortel/Avaya CS1K deployment on hand for our office, so I have a licence server for all our softphones and VPN etc.  Maybe you do as well.  So even though I am pointing my Nortel phones at asterisk, I still point them at the licence server via TFTP.  This opens up a whole bunch of new features that the stock phone won't let you do (at least wouldn't for me)

For those of you who want to do this, here's what I do:

in my 1140eSIP.cfg file, I have this additional entry:

[LICENSING]
#need this for "Advanced features"
DOWNLOAD_MODE AUTO
VERSION 000003
FILENAME ipctoken.rev2.cfg 

This sets up the licence file to be downloaded by your phone.

Now refer to my post about autoprovisiong 1140/1120 phones with asterisk if you haven't already.  

example for SIP0019E1F2A126.cfg that would be in your TFTP server.  Your 1100 series phone by default looks for this file when it has the SIP firmware build on it.

#--The user for the phone--#
DEF_USER1 8001

AUTOLOGIN_ID_KEY01 8001@whatevername.net
AUTOLOGIN_AUTHID_KEY01 8001
AUTOLOGIN_PASSWD_KEY01 294b912bafhf73hffd0b8dff6sf5a3ae68gds4d2
#The @domain MUST MATCH the DNS_DOMAIN value!!!!!

DNS_DOMAIN whatevername.net
SIP_DOMAIN1 whatevername.net

#--server1 INTERNAL--#
SERVER_IP1_1 192.168.1.1
SERVER_PORT1_1 5061

#--server2 EXTERNAL--#
SERVER_IP1_2 123.123.123.123
SERVER_PORT1_2 5061

#--We NAT the phone for external connections.  I enable this and enable rport in freepbx--#
USE_RPORT YES

RTP_MIN_PORT 10000
RTP_MAX_PORT 20000

SIP_UDP_PORT 5061

#--Auth-use MD5 to encrypt the authorization keys--#
AUTH_METHOD AUTH_INT

#--Server retries is default 3.  You can increase it if you want--#
#SERVER_RETRIES1 4

#--this  AUTOLOGIN portion has the phone login automatically using the secret assigned--#
#--to the extension in Asterisk--#
AUTOLOGIN_ENABLE USE_AUTOLOGIN_ID
PROMPT_AUTHNAME_ENABLE NO

#--you can show a banner on the phone.  Department name, company name, whatever--#
FORCE_BANNER YES
BANNER ShowThisOnPhoneLCD

#--Enable the 3 lines below if you want to place a speedcall list in--#
#--Place the speedcall.txt file in your TFTP server--#
#--This example puts the speedcall on key 6 on an 1140e phone--#
#SPEEDLIST_LABEL QUEUE
#DEFAULT_SPEEDDIALLIST_FILE QUEUE_Speeddiallist.txt
#SPEEDLIST_KEY_INDEX 6

TIMEZONE_OFFSET -18000
FORCE_TIME_ZONE YES

VMAIL *97
VMAIL_DELAY 300
MAX_APPEARANCES 3
DEF_LANG English
DEF_AUDIO_QUALITY High
ENABLE_LLDP YES
ADMIN_PASSWORD 26567*738
ADMIN_PASSWORD_EXPIRY 0

DEF_AUDIO_QUALITY High
MAX_LOGINS 3
USB_HEADSET UNLOCK
ENABLE_USB_PORT YES
EXP_MODULE_ENABLE NO
ENABLE_SERVICE_PACKAGE NO
IM_MODE DISABLED
AVAYA_AUTOMATIC_QoS NO
VQMON_PUBLISH NO
SIP_TLS_PORT 0
ENABLE_BT NO
# Enable SSH
SSH YES
SSHID admin
SSHPWD 7783993

ASTERISK and UNISTIM Nortel 2002P2 Phones

Here's how I made a bunch of UNISTIM 2002P2s work with asterisk.  Specifically I used IncrediblePBX13 on CENTOS 6.7

The heart of this came from Mike "THE MAN!" MCNAMARA and Dale on his page.  They really provided me all the fundamental steps to get this to work.  I'm just collecting it here for my own record, and maybe to help someone out a little bit with my explanation of the process.

I did this on a bare metal build of CENTOS 6.7 using IncrediblePBX 13-12.2
UNISTIM drivers come with it and so far, works reasonably well.  I'm not sure if I would depend a large deployment on it, but its resurrected a box of phones that I had given up on.

So the assumption is that you have a pretty good understanding of the asterisk system.

So, in /etc/asterisk/unistim.conf is where you assign the phones you want to connect to your PBX.
I use FREEPBX for the GUI and created an extesnion (8860 in my example), but all that will do is assign a voicemailbox for your user really.  All the configs for the actual phone are stored in the file.

Here's my UNISTIM.CONF file:
______________________________________________________________
[general]
port=5000                ; UDP port
autoprovisioning=yes
qualify=yes
[8860]                                        ; extension of the device for reference
line => 8860                            ;the actual extension of the device
device=00148BF43A20            ; mac address of the phone (look on the back should be there)
maintext0="Asterisk"                ; default = "Welcome", 24 characters max. Shows on the LCD
callerid="First Last" <5558860> ;CLID that asterisk will pass
context=from-internal    ; context, default="default"
mailbox=8860         ; Specify the mailbox number. Used by Message Waiting Indication
linelabel="8860"     ; Softkey label for the next line=> entry, 9 char max.
rtp_port=10000       ; RTP port used by the phone, default = 10000. RTCP = rtp_port+1
rtp_method=3         ; If you don't have sound, you can try 1, 2 or 3, default = 0
status_method=0    ; If you don't see status text, try 1, default = 0
extension=line        ; Add an extension into the dialplan. Only valid in context specified previously.
                                ; none=don't add (default), ask=prompt user, line=use the line number

dateformat=1          ; 0 = month/day, 1 (default) = day/month
timeformat=1          ; 0 = 0:00am ; 1 (default) = 0h00, 2 = 0:00
contrast=5               ; define the contrast of the LCD. From 0 to 15. Default = 8
country=us              ; country (ccTLD) for dial tone frequency. See README, default = us
------------------------------------------------------------------------------
I saved this file.

Then I went to the phone, plugged it into the network.  Followed these basic config patterns.
(boot the phone, when you see the NORTEL text show, slide your fingers along the bottom row of buttons under the LCD from left to right)

EAP Enable? [0-N, 1-Y]: 0
DHCP? [0-N, 1-Y]: 1
Cached IP? [0-N, 1-Y]: 1
DHCP:0-Full,1-Partial: 1
S1 IP: xxx.xxx.xxx.xxx (Asterisk's Server IP Address) S1 PORT: 5000
S1 ACTION: 1
S1 RETRY COUNT: 10
S2 IP: xxx.xxx.xxx.xxx (Asterisk's Server IP Address)
S2 PORT: 5000
S2 ACTION: 1
S2 RETRY COUNT: 10
Cfg XAS? [0-No, 1-Yes]: 0
VOICE VLAN?[0-N, 1-Y]: 0
PC PORT?[0-OFF,1-ON]: 1
DATA VLAN? [0-N, 1-Y]: 0
PCUntagAll?0-No,1-Yes: 0
DUPLEX0-AUTO,1-FULL: 1
SPEED0-10Mb,1-100Mb: 1
GARP Ignore?[0-N, 1-Y]: 1

Saved the configuration file

Then I reloaded the config file in asterisk
Command line prompt asterisk -rx reload

The phone attempted to connect to the asterisk ip address, and presto.  worked first try.

The whole thing really worked, I had it working in less than 10 minutes.

OTHER INFO
You can reboot a 2002 series phone with the following sequence:
mute  up  down  up  down  up  mute  9  release

Country codes for dial tone
country=us fr au nl uk fi za pt ee mx in de ch dk cn es be sg il br hu lt pl jp no at nz tw cl se

There is a pile of great info here on the asterisk.org page

Thursday, March 3, 2016

Speed Dial provisioning 1100 series 1140 1120 Avaya Nortel phones

Building upon the deployment .cfg files in my previous posts, here's some things you can add to your 1140 / 1120 phones automatically

SPEED DIAL LIST
We have some users that need to log in and out of a queue and put in some away/pause codes. 

On the 1140, we built a speedcall list for these to make the process easier by pressing 1 or 2 buttons, vs remember "*238 or *25 etc

So, in your general.cfg or your SIPmac.CFG files, you add in this value:

SPEEDLIST_LABEL QUEUE
DEFAULT_SPEEDDIALLIST_FILE Speeddiallist.txt
SPEEDLIST_KEY_INDEX 4

speedlist_label is the name of the speedial list as it will show on a key on your phone.
_file is the name of the file that you will build with your speedials in your TFTP directory

speedlist_key_index is the key that you want to assign to this speeddial list.  The 1140/1120 phone button numbers start in the lower right, and move up, then continue on the lower left and then up.
So, on an 1120 with 4 buttons, giving it an index value of 4 will put it in the upper left corner.  An 1140 using the same list would apper in the lower left corner (since it has 6 line keys)

in your TFTP directory create a file called Speeddiallist.txt

In that file, it will look something like this

[key]
label=NOT READY - BREAK
target=*726@10.1.100.13

[key]
label=NOT READY - LUNCH
target=*727@10.1.100.13

[key]
label=Login/Logout
target=*822@10.1.100.13

the word "key" is interrpreted as a new line.  The label is what appears on the phone LCD display, and the target is the actual number that the phone will dial when pressed.

TIME ZONE

If you need to assign time zones to your phones, you can do this through the .cfg files.
Simply add in the following two lines and place the appropriate offset for your geographical location.

TIMEZONE_OFFSET -18400
FORCE_TIME_ZONE YES

Location Time zone offset (seconds)
(GMT-10:00) Hawaii -36000
(GMT-09:00) Alaska -32400
(GMT-08:00) Pacific time -28800
(US and Canada)
(GMT-07:00) Mountain time (US and Canada) -25200
(GMT-06:00) Central time -21600
(US and Canada)
(GMT-05:00) Eastern time -18000
(US and Canada)
(GMT-04:00) Atlantic time -14400
(US and Canada)
(GMT-03:00) Brasilia, -10800
Buenos Aires
(GMT+00:00) Greenwich, 0
Dublin, Lisbon, London
(GMT+01:00) Amsterdam, 3600
Berlin, Rome, Stockholm,
Madrid, Paris
(GMT+02:00) Athens, 7200
Istanbul, Cairo, Helsinki,
Jerusalem
(GMT+03:00) Moscow, St. 10800
Petersburg
(GMT+05:30) Bombay, Calcutta, Madras, New 18000
Delhi
(GMT+08:00) Beijing, 28800
Chongqing, Hong Kong,
Singapore, Taipei
(GMT+09:00) Osaka, 32400
Sapporo, Tokyo, Seoul
(GMT+10:00) Canberra, 36000
Melbourne, Sydney
(GMT+12:00) Auckland, 43200
Wellington

1100 series phone configuration files for asterisk

Now that your phones have the SIP firmware on them, you'll need to get them to load their configuration file that they will need to talk to asterisk.


Note the MAC address of your phone.  Create a file in your TFTP directory that is SIPmacaddress.cfg.  Inside that file, put in the information below, swapping in your Server IP, extension number and password.  The items that need your specific input are in BOLD. 

NOTE:  If your asterisk implementation utilizes PJSIP, change the server_port1_1 5060 port to 5061

Once you have put this information in below, save the file.  Reboot the phone.

DNS_DOMAIN asterisk.local
SIP_DOMAIN1 asterisk.local
SERVER_IP1_1 X.X.X.X
SERVER_PORT1_1 5060
SERVER_RETRIES1 3
DEF_USER1 ASTERISK

FORCE_BANNER YES
BANNER TechSupport
AUTOLOGIN_ENABLE USE_AUTOLOGIN_ID
PROMPT_AUTHNAME_ENABLE NO
AUTOLOGIN_ID_KEY01 1006@asterisk.local
AUTOLOGIN_AUTHID_KEY01 1006
AUTOLOGIN_PASSWD_KEY01 YourExtensionPassword

###add more extensions to buttons alter the lines below##
###you can have up to 6 different extensions.####

#AUTOLOGIN_ID_KEY02 YYYY@asterisk.local
#AUTOLOGIN_AUTHID_KEY02 EXTENSION
#AUTOLOGIN_PASSWD_KEY02 PASSWORD

VMAIL *97
VMAIL_DELAY 300
MAX_APPEARANCE 1
DEF_LANG English
DEF_AUDIO_QUALITY High
LLDP_ENABLE YES
ADMIN_PASSWORD 26567*738
ADMIN_PASSWORD_EXPIRY 0
DEF_AUDIO_QUALITY High

# Settings below disable extended AVAYA license features that prevent login
# if you don't have a proper license server
MAX_LOGINS 1
USB_HEADSET LOCK
EXP_MODULE_ENABLE NO
ENABLE_SERVICE_PACKAGE NO
IM_MODE DISABLED
AVAYA_AUTOMATIC_QoS NO
VQMON_PUBLISH NO
SIP_TLS_PORT 0
ENABLE_BT NO