📜 ⬆️ ⬇️

CISCO 7942G and 7940 phones in conjunction with Asterisk 11

These devices fell into my hands. I am not on friendly terms with Cisco because 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 the 7942G.

Out of the box, the phones work with Tsis protocols, so you must first flash on SIP.

Let's start from scratch.

Configure DHCP


DHCP in my case is MikroTik. Add in the properties of the DHCP server 150 an option with the value '10 .1.1.1', where 10.1.1.1 is your future TFTP server. We register it with single quotes. In some cases, it is said to specify the 66 as an option, but it did not work for me.
')

Raise TFTP


I did everything on the same CentOS 6.7. It's simple. tftp-server is in the starting delivery, so you don’t need to install it. If anything:

yum install tftp-server 

Turn it on and let him write logs.

 nano /etc/xinetd.d/tftp 

In this file, we are interested in the server_args and disable lines. First we bring to the form:

-p -c -u root -s /tftpboot -v


The second is just put no .

Create a folder and give rights:

 mkdir /tftpboot && chmod 777 /tftpboot 

Reboot and enjoy:

 service xinetd restart 

7942G Firmware and Setup


I collected the file - settings, firmware and Russian locale. Just unzip to root / tftpboot. You can download it here .

Immediately configure the phone. In the SEPmymac.cnf.xml file, change the SIP_NUM to the user number on the asterisk, SIP_PASS, respectively, the password. Instead of 10.1.1.99 we specify our telephony server. The file itself is renamed - mymac is changed to the device poppy in capital letters.

In line:

 <timeZone>GMT Standard/Daylight Time</timeZone> 

Specify the time zone. In tsisok all his own, even time zones. The time zone of Kaliningrad sought a half day In the end, here:

Spoiler header
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

A couple of lines below indicate the NTP server. For this purpose, I raised it to the very same CentOS, where Asterisk is spinning.

NTP server


To begin, install, if not worth it:

 yum install ntp 

The config lies in /etc/ntp.conf. We add there a line where we specify the subnet that has access to this server.

restrict 10.0.0.0 mask 255.0.0.0 nomodify notrap


We start the server:

 /etc/init.d/ntpd start 

Directly firmware


When enabled, Cisco 7942 will now attempt to pull up the config from the TFTP server. The config also contains the firmware, it will also pull it up. In total, it should be loaded with the necessary firmware, settings and locale. It will take time, but the whole process will be displayed on the screen.

For normal operation of the 7942G, a dialplan.xml file is also required, which must also lie in the root of the TFTP server. Paste the following content into it.

 <DIALTEMPLATE> <TEMPLATE MATCH="*" Timeout="3"/> <!-- Anything else --> </DIALTEMPLATE> 

7940


This machine came to me already flashed, but the logic is about the same. The config looks like this:

 # 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 

Uncomment the image line and specify the firmware version. Themselves take the firmware on the official website or on torrents. The config file is called SIPmymac.cnf - instead of mymac, again, the MAC address of the device.

We finish the calls.

How to install the picture can be viewed here .

Source: https://habr.com/ru/post/268821/


All Articles