Cisco 7940G

Hi. I realize that there are several threads on this topic but I’ve gone through pretty much all of them and still they were unable to help me. I was hoping a fresh pair of experienced eyes would be able to pick up something I missed. Here is my situation:

I have a Raspberry Pi set up as my Asterisk server. I am running Asterisk Version 11.11.0 and FreePBX Version I bought several 7940G’s off ebay, hoping to setup a pbx system at home as a little project. I have them running POS3-07-2-00. The problem is is that the phones wont register with the server. I have verified that they can see each other via a ping to both the phones to the server and vice-versa. I have tried other phones including the X-Lite soft-phone and the SPA232D on the same extensions and they worked without issue. Here below are my SIPDefault.cnf and SIP.cnf files:

#SIP Default Generic Configuration File
Image Version
image_version: P0S3-07-2-00

Proxy Server
proxy1_address: “” ; Can be dotted IP or FQDN
proxy2_address: “” ; Can be dotted IP or FQDN
proxy3_address: “” ; Can be dotted IP or FQDN
proxy4_address: “” ; Can be dotted IP or FQDN
proxy5_address: “” ; Can be dotted IP or FQDN
proxy6_address: “” ; Can be dotted IP or FQDN

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: 3600

Codec for media stream (g711ulaw (default), g711alaw, g729a)
preferred_codec: g711ulaw

TOS bits in media stream [0-5] (Default - 5)
tos_media: 5

Inband DTMF Settings (0-disable, 1-enable (default))
dtmf_inband: 1

Out of band DTMF Settings (none-disable, avt-avt enable (default), avt_always - always avt)
dtmf_outofband: avt

DTMF dB Level Settings (1-6dB down, 2-3db down, 3-nominal (default), 4-3db up, 5-6dB up)
dtmf_db_level: 3

SIP Timers
timer_t1: 2000 ; Default 500 msec
timer_t2: 4000 ; Default 4 sec
sip_retx: 10 ; Default 10
sip_invite_retx: 6 ; Default 6
timer_invite_expires: 180 ; Default 180 sec

New Parameters added in Release 2.0

Dialplan template (.xml format file relative to the TFTP root directory)
dial_template: dialplan

TFTP Phone Specific Configuration File Directory
tftp_cfg_dir: “” ; Example: ./sip_phone/

Time Server (There are multiple values and configurations refer to Admin Guide for Specifics)
sntp_server: “” ; SNTP Server IP Address
sntp_mode: directedbroadcast ; unicast, multicast, anycast, or directedbroadcast (default)
time_zone: GMT ; Time Zone Phone is in
dst_offset: 1 ; Offset from Phone’s time when DST is in effect
dst_start_month: March ; Month in which DST starts
dst_start_day: “29” ; Day of month in which DST starts
dst_start_day_of_week: Sun ; Day of week in which DST starts
dst_start_week_of_month: 5 ; Week of month in which DST starts
dst_start_time: 02 ; Time of day in which DST starts
dst_stop_month: Oct ; Month in which DST stops
dst_stop_day: “26” ; Day of month in which DST stops
dst_stop_day_of_week: Sun ; Day of week in which DST stops
dst_stop_week_of_month: 8 ; Week of month in which DST stops 8=last week of month
dst_stop_time: 2 ; Time of day in which DST stops
dst_auto_adjust: 1 ; Enable(1-Default)/Disable(0) DST automatic adjustment
time_format_24hr: 0 ; Enable(1 - 24Hr Default)/Disable(0 - 12Hr)
date_format: D/M/Y

Do Not Disturb Control (0-off, 1-on, 2-off with no user control, 3-on with no user control)
dnd_control: 0 ; Default 0 (Do Not Disturb feature is off)

Caller ID Blocking (0-disbaled, 1-enabled, 2-disabled no user control, 3-enabled no user control)
callerid_blocking: 0 ; Default 0 (Disable sending all calls as anonymous)

Anonymous Call Blocking (0-disabled, 1-enabled, 2-disabled no user control, 3-enabled no user control)
anonymous_call_block: 0 ; Default 0 (Disable blocking of anonymous calls)

DTMF AVT Payload (Dynamic payload range for AVT tones - 96-127)
dtmf_avt_payload: 101 ; Default 101

Sync value of the phone used for remote reset
sync: 1 ; Default 1

New Parameters added in Release 2.1
Backup Proxy Support
proxy_backup: “” ; Dotted IP of Backup Proxy
proxy_backup_port: 5060 ; Backup Proxy port (default is 5060)

Emergency Proxy Support
proxy_emergency: “” ; Dotted IP of Emergency Proxy
proxy_emergency_port: 5060 ; Emergency Proxy port (default is 5060)

Configurable VAD option
enable_vad: 0 ; VAD setting 0-disable (Default), 1-enable

New Parameters added in Release 2.2

NAT/Firewall Traversal
nat_enable: 0 ; 0-Disabled (default), 1-Enabled
nat_address: “UNPROVISIONED” ; WAN IP address of NAT box (dotted IP or DNS A record
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

Outbound Proxy Support
outbound_proxy: “” ; restricted to dotted IP or DNS A record only
outbound_proxy_port: 5060 ; default is 5060

New Parameter added in Release 3.0
Allow for the bridge on a 3way call to join remaining parties upon hangup
cnf_join_enable : 1 ; 0-Disabled, 1-Enabled (default)

New Parameters added in Release 3.1
Allow Transfer to be completed while target phone is still ringing
semi_attended_transfer: 1 ; 0-Disabled, 1-Enabled (default)

Telnet Level (enable or disable the ability to telnet into the phone)
telnet_level: 2 ; 0-Disabled (default), 1-Enabled, 2-Privileged

New Parameters added in Release 4.0

services_url: “” ; URL for external Phone Services
directory_url: “” ; URL for external Directory
logo_url: “” ; URL for branding logo to be used on phone display

HTTP Proxy Support
http_proxy_addr: “” ; Address of HTTP Proxy server
http_proxy_port: 80 ; Port of HTTP Proxy Server (80-default)

Dynamic DNS/TFTP Support
dyn_dns_addr_1: “” ; restricted to dotted IP
dyn_dns_addr_2: “” ; restricted to dotted IP
dyn_tftp_addr: “” ; restricted to dotted IP

Remote Party ID
remote_party_id: 0 ; 0-Disabled (default), 1-Enabled

New Parameters added in Release 4.4

Call Hold Ringback (0-off, 1-on, 2-off with no user control, 3-on with no user control)
call_hold_ringback: 0 ; Default 0 (Call Hold Ringback feature is off)

New Parameters added in Release 6.0
Dialtone Stutter for MWI
stutter_msg_waiting: 0 ; 0-Disabled (default), 1-Enabled

RTP Call Statistics (SIP BYE/200 OK message exchange)
call_stats: 0 ; 0-Disabled (default), 1-Enabled

#SIP Configuration Generic File

Line 1 appearance
line1_name: x

Line 1 Registration Authentication
line1_authname: “x”

Line 1 Registration Password
line1_password: “x password”

Line 1 Display name
line1_shortname: “Main”

Line 2 appearance
line2_name: y

Line 2 Registration Authentication
line2_authname: “y”

Line 2 Registration Password
line2_password: “y password”

New Parameters added in Release 2.0
All user_parameters have been removed
Phone Label (Text desired to be displayed in upper right corner)
phone_label: “Seomra C1” ; Has no effect on SIP messaging

Line 1 Display Name (Display name to use for SIP messaging)
line1_displayname: “x”

Line 2 Display Name (Display name to use for SIP messaging)
line2_displayname: “y”

New Parameters added in Release 3.0

Phone Prompt (The prompt that will be displayed on console and telnet)
phone_prompt: “SIP Phone” ; Limited to 15 characters (Default - SIP Phone)

Phone Password (Password to be used for console or telnet login)
phone_password: “cisco” ; Limited to 31 characters (Default - cisco)

User classifcation used when Registering [ none(default), phone, ip ]
user_info: none

I have also tried a complete install from scratch and still they did not register. Here is a copy of a telnet to the phone and an SSH to the server:

#Server side:
<— SIP read from UDP: —>
Via: SIP/2.0/UDP;branch=z9hG4bK4a9661b1
From: sip:[email protected]
To: sip:[email protected]
Call-ID: [email protected]
Date: Tue, 23 Sep 2014 21:03:52 GMT
User-Agent: CSCO/7
Contact: sip:[email protected]:5060
Content-Length: 0
Expires: 3600


— (11 headers 0 lines) —


<— SIP read from UDP: —>
Via: SIP/2.0/UDP;branch=z9hG4bK1d3ec183
From: sip:[email protected]
To: sip:[email protected]
Call-ID: [email protected]
Date: Tue, 23 Sep 2014 21:03:53 GMT
User-Agent: CSCO/7
Contact: sip:[email protected]:5060
Content-Length: 0
Expires: 3600

#Phone side:
Cisco Systems, Inc. Copyright 2000-2004
Cisco IP phone MAC:
Loadid: SW: P0S3-07-2-00 ARM: PAS3ARM1 Boot: PC030301 DSP: PS03AT43
SIP Phone> debug sip-messages
Enabling bug logging on this terminal - use ‘tty mon 0’ to disable
debugs: timestamp sip-messages
SIP Phone> [23:00:19] sip_sm_cc_channel_send_buf_fcn: Sent SIP message: handle=<2>:
<REGISTER sip: SIP/2.0
Via: SIP/2.0/UDP;branch=z9hG4bK291eb8af
From: sip:[email protected]
To: sip:[email protected]
Call-ID: [email protected]
Date: Tue, 23 Sep 2014 22:00:05 GMT
User-Agent: CSCO/7
Contact: sip:[email protected]:5060
Content-Length: 0
Expires: 3600

(>, length=<355>
[23:00:19] sip_sm_cc_channel_send_buf_fcn: Sent SIP message: handle=<3>:
<REGISTER sip: SIP/2.0
Via: SIP/2.0/UDP;branch=z9hG4bK76164ed8
From: sip:[email protected]
To: sip:[email protected]
Call-ID: [email protected]
Date: Tue, 23 Sep 2014 22:00:05 GMT
User-Agent: CSCO/7
Contact: sip:[email protected]:5060
Content-Length: 0
Expires: 3600

(>, length=<355>
[23:00:47] %E630 REG retries exceeded
[23:00:47] %E630 REG retries exceeded

Nat has been turned off. I’ve tried no and never settings, neither of which worked. Qualify setting likewise. I did notice that on the server side, it seems to be picking up the Register message on ports 50227 and 50228. Not sure if this makes a difference or how to change it if it does. Both the phone and server are on the same LAN.

Thanking in advance for any help given!!

The above typo is likely your issue. I would suggest leaving proxy_backup blank unless you have an actual backup proxy that the phones should be using if the primary proxy is unavailable.


Hi Tom

Firstly thank you for your help. I completely missed that. As soon as i corrected that to the IP address of the server the phone connected. Unfortunately, it did not register or at least not fully. What is happening now is that the phone can call to fully registered phones and can successfully dial 7777. However, when I try to call into the phone, the terminates in a busy tone and Im given the message “User Rejected” on the calling phone. Any ideas on this?

Once again thank you so so much for the help. It is greatly appreciated!


Well, as I mentioned before, I would recommend setting proxy_backup: “”

Also, it appears that your phone configuration file has at least some of the parameters for a second line. Is this on purpose? If so, I would recommend that you start with only one line and once that is working, then move to another. Here is a file we use for a 7940G:

# Line 1 Settings
line1_name: "2121"                      ; Line 1 Extension\User ID
line1_displayname: "2121"               ; Line 1 Display Name
line1_authname: "2121"                  ; Line 1 Registration Authentication
line1_password: "45t76iu98ws3"          ; Line 1 Registration Password
line1_shortname: "2121"                 ; Line 1 Short Name

# Line 2 Settings
line2_name: ""                          ; Line 2 Extension\User ID
line2_displayname: ""                   ; Line 2 Display Name
line2_authname: "UNPROVISIONED"         ; Line 2 Registration Authentication
line2_password: "UNPROVISIONED"         ; Line 2 Registration Password
line2_shortname: ""                     ; Line 2 Short Name

Lastly, I would recommend that you telnet to the phone and post the results of the commands “show reg” and “show status”.


Hi Tom

Sorry for the late reply but thinks got pretty hectic here.

I should have said before that when i tried removing the IP of the backup proxy previously, any time I tried to dial out I was greeted by “the number is currently not in service” voice. However, I tried it again now and it seemed to have not had an impact at all. The phone is still able to call other phones.

Again, thank you so much for your help. It is greatly appreciated

Here are the telnet printouts of show reg and show status:

Proxy Registration: ENABLED, state: IDLE
line APR state timer expires proxy:port

1 .1x REGISTERING 3600 215
2 … NONE 0 0 undefined:0
3 … NONE 0 0 undefined:0
4 … NONE 0 0 undefined:0
5 … NONE 0 0 undefined:0
1-BU .1x NONE 0 0 undefined:0

Note: APR is Authenticated, Provisioned, Registered
SIP Phone> show status

#Current Phone Status
W350 unprovisioned proxy_backup
W351 unprovisioned proxy_emergency
W310 1 Error(s) Parsing: SIPDefault.cnf
E630 REG retries exceeded

Does anyone have any ideas at all what be wrong? Any and all help is greatly appreciated!

I don’t, but if your phones have a web interface, I’d use that to get one phone set-up, and then try to create the configuration files based off what you had to do in the web interfaces. Some phones even let you download a configuration file based upon the settings you use in the web interface.

If you only have a few phones, setting them all up using the web interface might be easier than mastering the configuration files…

Have you tried the OSS Endpoint Manager? It’s free, it supports the phones in question and works well. I would default the phones before attempting to provision them; the most you’ll need to do is manually program the IP address of the PBX in the phones as the TFTP location if you’re not able to configure your DHCP server to provide that information.

I’m with Swordforthelord, we use those phones with OSS EPM and no issues.

Again, thank yo very much for the help!!

I have downloaded the OSS EPM and installed it but I’m a bit confused as to how to use it. I have configured the global variables as directed (I’ve left the NTP sever field blank if that makes a difference). I’ve selected and downloaded the module for the 7940 but I notice that there is an option under the 79x0 selection for “install firmware”. I tried clicking on this and it tried downloading something but the MD5 hash check failed. I then setup the phone under the device list. When I moved the phone it’s self, I changed the TFTP server on the phone to that of the Asterisk server. The phone then proceeded to go through the motions configuring VLAN ect but when it gets to requesting configuration, it quickly skips through to resetting and begins the process again.

Any ideas on what might be wrong?

Under Applications and Extensions, the settings for that extension should now have an Endpoint Manger category. It might be easier to set the phone’s MAC address and type from there.

Ive tried that. Ive also tried to set it as a 7940G as opposed to a 7940 and the phone is still cycling through the boot process and then resetting. Could it be a problem with the firmware?

It certainly could be a firmware issue. The settings the Endpoint Manager uses are based on the latest firmware version which it does not look like you are using.

It turns out that the source of all of my problems was the firmware!! I upgraded from 7.2 to 8.6 and hey presto, it connected successfully! Thank you to @rymes , @AdHominem , @Swordforthelord and @VoIPTek for your input and especially thank you to @Swordforthelord for suggesting the firmware upgrade!

No problem. The firmware was actually your idea! I merely supported it.

Sorry I did not reply earlier, I did not see the post you put up with the telnet command results (or any of the others, for that matter!). I’m glad it’s working now. The firmware may have been the problem with the OSS EPM, but not necessarily your problem before you tried that tool. If you use telnet to “show status” again (or press settings, 5, 1 on the phone) you will see any status messages. You should either see “No Errors” or just the “unprovisioned backup proxy” message. Anything else (like the “Error parsing SIPDefault.cnf” from before) is likely a sign that your config files have an error. Any errors should have been handled by the EPM at this point, though.

The only problems that we have encountered with these phones is that they require a switch capable of pre-standard POE (Cisco Small Business 200 and 300 support this, minus the smallest 200 series), and phones over IPSec connections fail to register after the tunnel drops. You have to force the phone to get a new IP Address to get them to register. We recently tracked that problem down to a NAT/Router issue that is not related to the phone itself (invalid conntrack entries), so we should be back to loving these phones again soon!


One last note: FWIW, we are successfully using FW version 8.12 on our 79x0 phones. If anyone finds out how to program the speed dial buttons using the configuration files, please drop me a PM!

hi garlicdip,

I am also using 7940G with freepbx and using oss endpoint manager.
I am really confused how to make configuration file. can you please share your config file parameters or your config file and also SEPmac and XML file.

Really appreciate your help in this regard.