Tag: 7940
my experiments with Cisco 7940 IP phone
by starprowler on Jun.27, 2009, under VoIP
12:40 AM 09 Dec 2007
Seem to have figured out the strange and seemingly erratic behaviour of the Cisco 7940.
Quick answer… in the SIP<mac_address>.cnf file enable NAT:
# NAT/Firewall Traversal
nat_enable: “1” ; <—- default is “0”. Have no idea why this works but…
nat_address: “”
voip_control_port: “5061”
start_media_port: “19000”
end_media_port: “20000”
nat_received_processing: “0”
I chanced on this when poring over the SIP logs. I noticed that the requests from the phone was coming from random ports. The SIP read said…
<— SIP read from 192.168.2.130:50218 —>
… but the Contact: SIp field said…
Contact: <sip:[email protected]:5060;transport=udp>
However, * responded…
<— Transmitting (NAT) to 192.168.2.130:50218 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.2.130:5060;branch=z9hG4bK4fba995f;received=192.168.2.130
Further down… i saw….
[Dec 8 17:32:01] VERBOSE[2565] logger.c: Sending to 192.168.2.130 : 50218 (NAT) ; <—!!
[Dec 8 17:32:01] VERBOSE[2565] logger.c: Using INVITE request as basis request – [email protected]
[Dec 8 17:32:01] VERBOSE[2565] logger.c: Found no matching peer or user for ‘192.168.2.130:50218’
wierd?? Dunno. So * was sending its reponses to the 50218 port in the above case, and obviously the phone wasn’t listening at that port! This meant that the 200 OK responses were not being received by the phone. So finally hit on this setting… didn’t make sense, but tried it coz that would be one setting that would affect source and target ports. It worked! I hope this is the last of my travails with the Cisco 7940 phone. All works fine… including the MWI! 🙂
After this the sip show peers, showed me….
6112/6112 192.168.2.130 D N 5061 Unmonitored
^^^^-!!! This came from the NAT/Firewall traversal setting.
Obviously the Phone firmware was using a random port (i.e., ignoring this setting) when used with a nat_enable: 0 setting.