
CISCO 7942G and 7940 phones in conjunction with Asterisk 11
These devices fell into my hands. I’m not very friendly with Cisco, so I got into Google and set up these devices. This article helped a lot , but there are errors in it that are not compatible with some revisions of 7942G.
Out of the box, phones work with Cis protocols, so you must first upgrade to SIP.
Let's start from scratch.
DHCP in my case is MikroTik. Add the option with the value '10 .1.1.1 'to the properties of DHCP server 150, where 10.1.1.1 is your future TFTP server. We write it with single quotes. In some cases, they say to indicate as option 66, but it didn’t work with me.
I did everything on the same CentOS 6.7. Everything is simple here. tftp-server is in the start-up delivery, so you do not need to install it. If anything:
Turn it on and write the logs.
In this file we are interested in the lines server_args and disable. The first is reduced to the form: The second is simply set to no . Create a folder and give rights:
Reboot and enjoy:
I collected the file - settings, firmware and Russian locale. Just unzip to the root / tftpboot. You can download it here .
Immediately configure the phone. In the file SEPmymac.cnf.xml, change SIP_NUM to the user number on the asterisk, SIP_PASS, respectively, the password. Instead of 10.1.1.99, we indicate our telephony server. Rename the file itself - change mymac to the device pop-up in capital letters.
In line:
Specify the time zone. Tsisok has everything of his own, even time zones. The time zone of Kaliningrad was looking for half a day. As a result, here:
A couple of lines below indicate the NTP server. For these purposes, I raised it to the same CentOS where Asterisk is spinning.
First, install, if not worth it:
The config is in /etc/ntp.conf. Add a line there, where we indicate the subnet that has access to this server. We start the server:
When you turn on, the Cisco 7942 will now try to pull the config from the TFTP server. The firmware is also indicated in the config, it will also pull it up. In total, it should boot with the desired firmware, settings and locale. It will take time, but the whole process will be displayed on the screen.
For the 7942G to work properly, the dialplan.xml file is also required, which should also be in the root of the TFTP server. Paste the following contents into it.
Out of the box, phones work with Cis protocols, so you must first upgrade to SIP.
Let's start from scratch.
Configure DHCP
DHCP in my case is MikroTik. Add the option with the value '10 .1.1.1 'to the properties of DHCP server 150, where 10.1.1.1 is your future TFTP server. We write it with single quotes. In some cases, they say to indicate as option 66, but it didn’t work with me.
Raise TFTP
I did everything on the same CentOS 6.7. Everything is simple here. tftp-server is in the start-up delivery, so you do not need to install it. If anything:
yum install tftp-server
Turn it on and write the logs.
nano /etc/xinetd.d/tftp
In this file we are interested in the lines server_args and disable. The first is reduced to the form: The second is simply set to no . Create a folder and give rights:
-p -c -u root -s /tftpboot -v
mkdir /tftpboot && chmod 777 /tftpboot
Reboot and enjoy:
service xinetd restart
Firmware and setup 7942G
I collected the file - settings, firmware and Russian locale. Just unzip to the root / tftpboot. You can download it here .
Immediately configure the phone. In the file SEPmymac.cnf.xml, change SIP_NUM to the user number on the asterisk, SIP_PASS, respectively, the password. Instead of 10.1.1.99, we indicate our telephony server. Rename the file itself - change mymac to the device pop-up in capital letters.
In line:
GMT Standard/Daylight Time
Specify the time zone. Tsisok has everything of his own, even time zones. The time zone of Kaliningrad was looking for half a day. As a result, here:
Spoiler heading
1 Dateline Standard Time -720
2 Samoa Standard Time -660
3 Hawaiian Standard Time -600
4 Alaskan Standard / Daylight Time -540
5 Pacific Standard / Daylight Time -480
6 Mountain Standard / Daylight Time -420
7 US Mountain Standard Time -420
8 Central Standard / Daylight Time -360
9 Mexico Standard / Daylight Time -360
10 Canada Central Standard Time -360
11 SA Pacific Standard Time -300
12 Eastern Standard / Daylight Time -300
13 US Eastern Standard Time -300
14 Atlantic Standard / Daylight Time -240
15 SA Western Standard Time -240
16 Newfoundland Standard / Daylight Time -210
17 South America Standard / Daylight Time -180
18 SA Eastern Standard Time -180
19 Mid-Atlantic Standard / Daylight Time -120
20 Azores Standard / Daylight Time -60
21 GMT Standard / Daylight Time +0
22 Greenwich Standard Time +0
23 W. Europe Standard / Daylight Time +60
24 GTB Standard / Daylight Time +60
25 Egypt Standard / Daylight Time +60
26 E. Europe Standard / Daylight Time +60
27 Romance Standard / Daylight Time +120
28 Central Europe Standard / Daylight Time +120
29 South Africa Standard Time +120
30 Jerusalem Standard / Daylight Time +120
31 Saudi Arabia Standard Time +180
32 Russian Standard / Daylight Time +180
33 Iran Standard / Daylight Time +210
34 Caucasus Standard / Daylight Time +240
35 Arabian Standard Time +240
36 Afghanistan Standard Time +270
37 West Asia Standard Time +300
38 Ekaterinburg Standard Time +300
39 India Standard Time +330
40 Central Asia Standard Time +360
41 SE Asia Standard Time +420
42 China Standard / Daylight Time +480
43 Taipei Standard Time +480
44 Tokyo Standard Time +540
45 Cen. Australia Standard / Daylight Time +570
46 AUS Central Standard Time +570
47 E. Australia Standard Time +600
48 AUS Eastern Standard / Daylight Time +600
49 West Pacific Standard Time +600
50 Tasmania Standard / Daylight Time +600
51 Central Pacific Standard Time +660
52 Fiji Standard Time +720
53 New Zealand Standard / Daylight Time +720
2 Samoa Standard Time -660
3 Hawaiian Standard Time -600
4 Alaskan Standard / Daylight Time -540
5 Pacific Standard / Daylight Time -480
6 Mountain Standard / Daylight Time -420
7 US Mountain Standard Time -420
8 Central Standard / Daylight Time -360
9 Mexico Standard / Daylight Time -360
10 Canada Central Standard Time -360
11 SA Pacific Standard Time -300
12 Eastern Standard / Daylight Time -300
13 US Eastern Standard Time -300
14 Atlantic Standard / Daylight Time -240
15 SA Western Standard Time -240
16 Newfoundland Standard / Daylight Time -210
17 South America Standard / Daylight Time -180
18 SA Eastern Standard Time -180
19 Mid-Atlantic Standard / Daylight Time -120
20 Azores Standard / Daylight Time -60
21 GMT Standard / Daylight Time +0
22 Greenwich Standard Time +0
23 W. Europe Standard / Daylight Time +60
24 GTB Standard / Daylight Time +60
25 Egypt Standard / Daylight Time +60
26 E. Europe Standard / Daylight Time +60
27 Romance Standard / Daylight Time +120
28 Central Europe Standard / Daylight Time +120
29 South Africa Standard Time +120
30 Jerusalem Standard / Daylight Time +120
31 Saudi Arabia Standard Time +180
32 Russian Standard / Daylight Time +180
33 Iran Standard / Daylight Time +210
34 Caucasus Standard / Daylight Time +240
35 Arabian Standard Time +240
36 Afghanistan Standard Time +270
37 West Asia Standard Time +300
38 Ekaterinburg Standard Time +300
39 India Standard Time +330
40 Central Asia Standard Time +360
41 SE Asia Standard Time +420
42 China Standard / Daylight Time +480
43 Taipei Standard Time +480
44 Tokyo Standard Time +540
45 Cen. Australia Standard / Daylight Time +570
46 AUS Central Standard Time +570
47 E. Australia Standard Time +600
48 AUS Eastern Standard / Daylight Time +600
49 West Pacific Standard Time +600
50 Tasmania Standard / Daylight Time +600
51 Central Pacific Standard Time +660
52 Fiji Standard Time +720
53 New Zealand Standard / Daylight Time +720
A couple of lines below indicate the NTP server. For these purposes, I raised it to the same CentOS where Asterisk is spinning.
NTP server
First, install, if not worth it:
yum install ntp
The config is in /etc/ntp.conf. Add a line there, where we indicate the subnet that has access to this server. We start the server:
restrict 10.0.0.0 mask 255.0.0.0 nomodify notrap
/etc/init.d/ntpd start
Direct firmware
When you turn on, the Cisco 7942 will now try to pull the config from the TFTP server. The firmware is also indicated in the config, it will also pull it up. In total, it should boot with the desired firmware, settings and locale. It will take time, but the whole process will be displayed on the screen.
For the 7942G to work properly, the dialplan.xml file is also required, which should also be in the root of the TFTP server. Paste the following contents into it.
7940
Ко мне данный аппарат попал уже прошитый, но логика примерно такая же. Конфиг выглядит следующим образом:
# SIP Default Configuration File
# Image Version
# image_version: P0S3-8-12-00
# Proxy Server
proxy1_address: "10.1.1.99"
proxy2_address: "";
proxy3_address: "";
proxy4_address: "";
proxy5_address: "";
proxy6_address: "";
# Proxy Server Port (default - 5060)
proxy1_port: 5060
proxy2_port: 5060
proxy3_port: 5060
proxy4_port: 5060
proxy5_port: 5060
proxy6_port: 5060
# Proxy Registration (0-disable (default), 1-enable)
proxy_register: 1
# Phone Registration Expiration [1-3932100 sec] (Default - 3600)
timer_register_expires: 600
# Codec for media stream (g711ulaw (default), g711alaw, g729a)
preferred_codec: g711alaw
# NAT/Firewall Traversal
nat_enable: 0; 0-Disabled (default), 1-Enabled
nat_address: ""; WAN IP address of NAT box (dotted IP or DNS A record only)
voip_control_port: 5060; UDP port used for SIP messages (default - 5060)
start_media_port: 16384; Start RTP range for media (default - 16384)
end_media_port: 32766; End RTP range for media (default - 32766)
nat_received_processing: 0; 0-Disabled (default), 1-Enabled
# SIP Configuration File
# 7940 w/2 lines
# Line 1 Parameters
line1_name: "SIP_NUM"
line1_shortname: "SIP_NUM"
line1_authname: "SIP_NUM"
line1_contact: "SIP_NUM"
line1_displayname: "FirstName LastName"
line1_password: "SIP_PASS"
# Line 2 Parameters
line2_name: ""
line2_authname: ""
line2_displayname: ""
line2_password: ""
# Phone Label (Text desired to be displayed in upper right corner)
# Has no effect on SIP messaging
phone_label: ""
# Remote Access Parameters for console or telnet login
phone_prompt: "SIP Phone"
phone_password: "cisco"
user_info: none
Раскомментурем строчку image и указываем версию прошивки. Сами прошивки брать на официальном сайте или на торрентах. Файл конфига называем SIPmymac.cnf – вместо mymac опять таки мак-адрес устройства.
Допиливаем звонки.
Как установить картинку можно посмотреть тут.