Jump to content

Source Port vs Contact Port


echan101

Recommended Posts

There might be a bug in Axon PBX (or with Cisco IP phones!). Cisco 7970 and Cisco 7960 phones send their SIP Registration request from random ports, but I think they expect the response on the "Contact" port. See below for a WireShark capture of three packets (Register > Authentication required > Port unreachable).

 

What do you think? To NCH developers: Could you please take a quick look at this?

 

---------------------------------------------------------------------------------------------------

 

No. Time Source Destination Protocol Info

1 0.000000 10.0.2.3 10.0.2.2 SIP Request: REGISTER sip:10.0.2.2

 

Frame 1 (522 bytes on wire, 522 bytes captured)

Ethernet II, Src: Cisco_8f:8d:b6 (00:0d:28:8f:8d:b6), Dst: CompaqCo_ba:1d:6c (00:08:02:ba:1d:6c)

Internet Protocol, Src: 10.0.2.3 (10.0.2.3), Dst: 10.0.2.2 (10.0.2.2)

User Datagram Protocol, Src Port: 50524 (50524), Dst Port: 5060 (5060)

Session Initiation Protocol

Request-Line: REGISTER sip:10.0.2.2 SIP/2.0

Message Header

Via: SIP/2.0/UDP 10.0.2.3:5062;branch=z9hG4bK5e5b5796

From: <sip:7960@10.0.2.2>;tag=000d288f8db6000a3ae61be4-16e7b19f

To: <sip:7960@10.0.2.2>

Call-ID: 000d288f-8db60003-034cb4f7-5952fe59@10.0.2.3

Max-Forwards: 70

CSeq: 109 REGISTER

User-Agent: Cisco-CP7960G/8.0

Contact: <sip:7960@10.0.2.3:5062;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-000d288f8db6>";+u.sip!model.ccm.cisco.com="7"

Content-Length: 0

Expires: 3600

 

---------------------------------------------------------------------------------------------------

 

No. Time Source Destination Protocol Info

2 0.000137 10.0.2.2 10.0.2.3 SIP Status: 401 Unauthorized (0 bindings)

 

Frame 2 (440 bytes on wire, 440 bytes captured)

Ethernet II, Src: CompaqCo_ba:1d:6c (00:08:02:ba:1d:6c), Dst: Cisco_8f:8d:b6 (00:0d:28:8f:8d:b6)

Internet Protocol, Src: 10.0.2.2 (10.0.2.2), Dst: 10.0.2.3 (10.0.2.3)

User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 50524 (50524) (should be 5062?)

Session Initiation Protocol

Status-Line: SIP/2.0 401 Unauthorized

Message Header

Via: SIP/2.0/UDP 10.0.2.3:5062;branch=z9hG4bK5e5b5796

To: <sip:7960@10.0.2.2>

From: <sip:7960@10.0.2.2>;tag=000d288f8db6000a3ae61be4-16e7b19f

Call-ID: 000d288f-8db60003-034cb4f7-5952fe59@10.0.2.3

CSeq: 109 REGISTER

User-Agent: Axon 1.09

WWW-Authenticate: Digest realm="axon@gi18347l",nonce="v36214qaq29267w",opaque="",stale=FALSE,algorithm=MD5

Content-Length: 0

 

---------------------------------------------------------------------------------------------------

 

No. Time Source Destination Protocol Info

3 0.001814 10.0.2.3 10.0.2.2 ICMP Destination unreachable (Port unreachable)

 

Frame 3 (70 bytes on wire, 70 bytes captured)

Ethernet II, Src: Cisco_8f:8d:b6 (00:0d:28:8f:8d:b6), Dst: CompaqCo_ba:1d:6c (00:08:02:ba:1d:6c)

Internet Protocol, Src: 10.0.2.3 (10.0.2.3), Dst: 10.0.2.2 (10.0.2.2)

Internet Control Message Protocol

Type: 3 (Destination unreachable)

Code: 3 (Port unreachable)

Checksum: 0x12a0 [correct]

Internet Protocol, Src: 10.0.2.2 (10.0.2.2), Dst: 10.0.2.3 (10.0.2.3)

User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 50524 (50524)

 

---------------------------------------------------------------------------------------------------

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

while the sip protocol asks for contact ports, the reality is that the majority of voip providers / other vendors don't honour that and just send to the source port instead. the rationale is that whatever software / hardware has sent the packet is going to keep that source port open and will keep a mapping of that port active in its routing table so it knows how to handle any responses. based on our testing this principle works very well. if we relied on sending to the contact port instead, the reality is that many services would simply fail due to NAT routing / firewall issues.

 

having said that, we did do quite a lot of testing using a cisco 7940 phone and we had no problems like the ones you described, so i'm thinking that you may need to tweak some configuration in the phone to do a manual override of the sending port. its been a while so i unfortunately cant remember all the details. the phone did work fine for us with axon though ! (in case you dont know, the 7940 is just a 4 line version of the 7960)

Link to comment
Share on other sites

I'm not surprised that the 7940 worked. The 7912 (with the latest firmware) also works fine with Axon. Unfortunately the newer 7960 and 7970 uses XML configurations that can only be loaded by TFTP and also close off the requesting port immediately as shown in the packet trace. Very annoying! I don't think there's anything I can do about it unless Cisco offers a patch.

 

So, I wouldn't be surprised if other people begin to have the same problems with these annoying Cisco phones :angry: when used with Axon.

Link to comment
Share on other sites

  • 3 months later...

I think I have some problems related to this matter.

 

I have a simple test setup with 1 Cisco IP Phone 7940 and 1 ExpressTalk.

 

I have installed Axon using the default settings and have 10 Extension.

 

101 is used by the ExpressTalk and 102 is used by the Cisco Phone.

 

Now when I call 101 from 102 every thing works OK. The ExpressTalk phone is ringing, I pick it up and there is sound both ways.

 

When I call 102 from 101, the Cisco Phone is not even ringing, but I get a "Leave message...." message on the ExpresTalk.

 

I have looked at the log fil and below the log is showing 5 calls.

 

21:27:40 Call 101 -> sip:102@192.168.1.5

21:27:40 Error returned: 404 Not Found

21:27:44 Call 101 -> sip:102@192.168.1.5 answered

21:27:47 Call 101 -> sip:102@192.168.1.5 disconnected

21:27:54 Call 101 -> sip:102@192.168.1.5

21:27:54 Error returned: 404 Not Found

21:27:58 Call 101 -> sip:102@192.168.1.5 answered

21:28:02 Call 101 -> sip:102@192.168.1.5 disconnected

21:28:05 Call 101 -> sip:102@192.168.1.5

21:28:05 Error returned: 404 Not Found

21:28:09 Call 101 -> sip:102@192.168.1.5 answered

21:28:13 Call 101 -> sip:102@192.168.1.5 disconnected

21:28:16 Call 101 -> sip:102@192.168.1.5

21:28:16 Error returned: 404 Not Found

21:28:20 Call 101 -> sip:102@192.168.1.5 answered

21:28:23 Call 101 -> sip:102@192.168.1.5 disconnected

21:28:26 Call 101 -> sip:102@192.168.1.5

21:28:26 Error returned: 404 Not Found

21:28:30 Call 101 -> sip:102@192.168.1.5 answered

21:28:34 Call 101 -> sip:102@192.168.1.5 disconnected

 

I have also logged the SIP/RTP communication, but I have only cut out a small part showing some of the log entries when the 404 error is occuring.

 

21:27:40 UDP Packet Received from 192.168.1.103:5071 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

INVITE sip:102@192.168.1.5 SIP/2.0

Via: SIP/2.0/UDP 192.168.1.103:5071;rport;branch=z9hG4bK606100

To: <sip:102@192.168.1.5>

From: "Object" <sip:101@192.168.1.5>;tag=2097

Call-ID: 1184091537-6100-KEFVISTA@192.168.1.103

CSeq: 879 INVITE

Max-Forwards: 20

User-Agent: NCH Swift Sound Express Talk 2.06

Contact: <sip:101@192.168.1.103:5071>

Proxy-Authorization: Digest username="101",realm="axon@objweb",nonce="v19091qaq82927w",uri="sip:102@192.168.1.5",response="1830cf7d4bda6039b9af8f88d18ca05f",opaque="",algorithm=MD5

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, INFO, REFER, NOTIFY

Supported: replaces

Content-Type: application/sdp

Content-Length: 356

 

v=0

o=NCHSoftware-Talk 1184091525 1184091563 IN IP4 192.168.1.103

s=Express Talk Call

c=IN IP4 192.168.1.103

t=0 0

m=audio 8000 RTP/AVP 0 8 96 3 13 101

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:96 G726-32/8000

a=rtpmap:3 GSM/8000

a=rtpmap:13 CN/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=sendrecv

a=direction:active

 

 

----------------------------------------------------------------

 

21:27:40 UDP Packet Sent to 192.168.1.103:5071 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

SIP/2.0 100 Trying

Via: SIP/2.0/UDP 192.168.1.103:5071;rport;branch=z9hG4bK606100

To: <sip:102@192.168.1.5>;tag=332

From: "Object" <sip:101@192.168.1.5>;tag=2097

Call-ID: 1184091537-6100-KEFVISTA@192.168.1.103

CSeq: 879 INVITE

User-Agent: NCH Swift Sound Axon 1.20

Content-Length: 0

 

 

----------------------------------------------------------------

 

21:27:40 UDP Packet Sent to 192.168.1.12:5060 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

INVITE sip:102@192.168.1.12;transport=udp SIP/2.0

Via: SIP/2.0/UDP 192.168.1.5:5060;rport;branch=z9hG4bK1004440

To: <sip:102@objweb>

From: "Object" <sip:101@192.168.1.5>;tag=330

Call-ID: 1184091014-4440-OBJWEB@80.165.67.170

CSeq: 751 INVITE

Max-Forwards: 19

User-Agent: NCH Swift Sound Axon 1.20

Contact: <sip:102@192.168.1.5:5060>

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, INFO, REFER, NOTIFY

Supported: replaces

Content-Type: application/sdp

Content-Length: 358

 

v=0

o=NCHSoftware-Talk 1184091525 1184091563 IN IP4 192.168.1.103

s=Express Talk Call

c=IN IP4 192.168.1.103

t=0 0

m=audio 8000 RTP/AVP 0 8 96 3 13 101

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:96 G726-32/8000

a=rtpmap:3 GSM/8000

a=rtpmap:13 CN/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=sendrecv

a=direction:active

 

 

 

----------------------------------------------------------------

 

21:27:40 UDP Packet Received from 192.168.1.12:5060 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

SIP/2.0 404 Not Found

Via: SIP/2.0/UDP 192.168.1.5:5060;rport;branch=z9hG4bK1004440

From: "Object" <sip:101@192.168.1.5>;tag=330

To: <sip:102@objweb>

Call-ID: 1184091014-4440-OBJWEB@80.165.67.170

CSeq: 751 INVITE

Content-Length: 0

 

 

----------------------------------------------------------------

 

21:27:40 UDP Packet Sent to 192.168.1.12:5060 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

ACK sip:102@192.168.1.12;transport=udp SIP/2.0

Via: SIP/2.0/UDP 192.168.1.5:5060;rport;branch=z9hG4bK1004440

To: <sip:102@objweb>

From: "Object" <sip:101@192.168.1.5>;tag=330

Call-ID: 1184091014-4440-OBJWEB@80.165.67.170

CSeq: 751 ACK

Max-Forwards: 20

User-Agent: NCH Swift Sound Axon 1.20

Content-Length: 0

 

 

----------------------------------------------------------------

 

21:27:40 UDP Packet Sent to 127.0.0.1:5070 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

INVITE sip:199@127.0.0.1:5070;target=102%40objweb;cause=486 SIP/2.0

Via: SIP/2.0/UDP 192.168.1.5:5060;rport;branch=z9hG4bK1014440

To: <sip:102@objweb>

From: "Object" <sip:101@192.168.1.5>;tag=331

Call-ID: 1184091015-4440-OBJWEB@80.165.67.170

CSeq: 751 INVITE

Max-Forwards: 19

User-Agent: NCH Swift Sound Axon 1.20

Contact: <sip:199@192.168.1.5:5060>

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, INFO, REFER, NOTIFY

Supported: replaces

Content-Type: application/sdp

Content-Length: 358

 

v=0

o=NCHSoftware-Talk 1184091525 1184091563 IN IP4 192.168.1.103

s=Express Talk Call

c=IN IP4 192.168.1.103

t=0 0

m=audio 8000 RTP/AVP 0 8 96 3 13 101

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:96 G726-32/8000

a=rtpmap:3 GSM/8000

a=rtpmap:13 CN/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=sendrecv

a=direction:active

 

 

 

----------------------------------------------------------------

 

21:27:40 UDP Packet Sent to 192.168.1.103:5071 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

SIP/2.0 180 Ringing

Via: SIP/2.0/UDP 192.168.1.103:5071;rport;branch=z9hG4bK606100

To: <sip:102@192.168.1.5>;tag=332

From: "Object" <sip:101@192.168.1.5>;tag=2097

Call-ID: 1184091537-6100-KEFVISTA@192.168.1.103

CSeq: 879 INVITE

User-Agent: NCH Swift Sound Axon 1.20

Content-Length: 0

 

 

----------------------------------------------------------------

 

21:27:40 UDP Packet Received from 127.0.0.1:5070 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

SIP/2.0 180 Ringing

Via: SIP/2.0/UDP 192.168.1.5:5060;rport;branch=z9hG4bK1014440

To: <sip:102@objweb>;tag=1800

From: "Object" <sip:101@192.168.1.5>;tag=331

Call-ID: 1184091015-4440-OBJWEB@80.165.67.170

CSeq: 751 INVITE

User-Agent: NCH Swift Sound IVM Answering Attendant 4.02

Content-Length: 0

 

 

----------------------------------------------------------------

 

21:27:40 UDP Packet Received from 127.0.0.1:5070 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

SIP/2.0 180 Ringing

Via: SIP/2.0/UDP 192.168.1.5:5060;rport;branch=z9hG4bK1014440

To: <sip:102@objweb>;tag=1800

From: "Object" <sip:101@192.168.1.5>;tag=331

Call-ID: 1184091015-4440-OBJWEB@80.165.67.170

CSeq: 751 INVITE

User-Agent: NCH Swift Sound IVM Answering Attendant 4.02

Content-Length: 0

 

 

----------------------------------------------------------------

 

21:27:42 UDP Packet Sent to 192.168.1.103:5071 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

SIP/2.0 180 Ringing

Via: SIP/2.0/UDP 192.168.1.103:5071;rport;branch=z9hG4bK606100

To: <sip:102@192.168.1.5>;tag=332

From: "Object" <sip:101@192.168.1.5>;tag=2097

Call-ID: 1184091537-6100-KEFVISTA@192.168.1.103

CSeq: 879 INVITE

User-Agent: NCH Swift Sound Axon 1.20

Content-Length: 0

 

 

----------------------------------------------------------------

 

21:27:42 UDP Packet Received from 127.0.0.1:5070 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

SIP/2.0 180 Ringing

Via: SIP/2.0/UDP 192.168.1.5:5060;rport;branch=z9hG4bK1014440

To: <sip:102@objweb>;tag=1800

From: "Object" <sip:101@192.168.1.5>;tag=331

Call-ID: 1184091015-4440-OBJWEB@80.165.67.170

CSeq: 751 INVITE

User-Agent: NCH Swift Sound IVM Answering Attendant 4.02

Content-Length: 0

 

 

----------------------------------------------------------------

 

21:27:44 UDP Packet Sent to 192.168.1.103:5071 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

SIP/2.0 180 Ringing

Via: SIP/2.0/UDP 192.168.1.103:5071;rport;branch=z9hG4bK606100

To: <sip:102@192.168.1.5>;tag=332

From: "Object" <sip:101@192.168.1.5>;tag=2097

Call-ID: 1184091537-6100-KEFVISTA@192.168.1.103

CSeq: 879 INVITE

User-Agent: NCH Swift Sound Axon 1.20

Content-Length: 0

 

 

----------------------------------------------------------------

 

21:27:44 UDP Packet Received from 127.0.0.1:5070 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

SIP/2.0 180 Ringing

Via: SIP/2.0/UDP 192.168.1.5:5060;rport;branch=z9hG4bK1014440

To: <sip:102@objweb>;tag=1800

From: "Object" <sip:101@192.168.1.5>;tag=331

Call-ID: 1184091015-4440-OBJWEB@80.165.67.170

CSeq: 751 INVITE

User-Agent: NCH Swift Sound IVM Answering Attendant 4.02

Content-Length: 0

 

 

----------------------------------------------------------------

 

21:27:44 UDP Packet Received from 127.0.0.1:5070 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

SIP/2.0 200 OK

Via: SIP/2.0/UDP 192.168.1.5:5060;rport;branch=z9hG4bK1014440

To: <sip:102@objweb>;tag=1800

From: "Object" <sip:101@192.168.1.5>;tag=331

Call-ID: 1184091015-4440-OBJWEB@80.165.67.170

CSeq: 751 INVITE

User-Agent: NCH Swift Sound IVM Answering Attendant 4.02

Contact: <sip:199@192.168.1.5:5070>

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY

Accept: application/sdp

Supported: replaces

Content-Type: application/sdp

Content-Length: 388

 

v=0

o=NCHSoftware-IVM 1184091945 1184091965 IN IP4 80.165.67.170

s=IVM Answering Attendant Call

c=IN IP4 192.168.1.5

t=0 0

m=audio 4 RTP/AVP 0 8 96 3 13 101

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:96 G726-32/8000

a=rtpmap:3 GSM/8000

a=rtpmap:13 CN/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=sendrecv

a=local:192.168.1.5 4

a=domain:80.165.67.170

 

I'm not sure where I should start looking but I noticed that the status on each extension that Axon is showing is different

 

sip:101@192.168.1.103:5071

expires at 22:30:51

 

sip:102@192.168.1.12;transport=udp

expires at 22:47:47

 

Why is the ";transport=udp" showning for extension 102 and not for Extension 101?

 

Objecta

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...