[Home]

Summary:ASTERISK-00152: Mediatrix 1204 confused by its From: being used as the To: on BYE
Reporter:Ryan Tucker (rtucker)Labels:
Date Opened:2003-08-22 16:16:38Date Closed:2004-09-25 02:40:13
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:The Mediatrix 1204 sends the IP address of the proxy (e.g. the Asterisk) server on the From: line on the INVITE.  However, for the BYE at the end, it's expecting its own IP address (NOT the same as the From:) on the To:, and if it's not valid, it replies with a 404 and ignores it.



****** ADDITIONAL INFORMATION ******

BASIC STUFF:
Executive summary:  The Mediatrix sends an INVITE when a call comes in,
but
it sets the From: on the INVITE incorrectly, using the proxy IP address
instead of its own:

> > INVITE sip:5852185220@208.34.86.35:5060 SIP/2.0
> > Content-Length: 311

                         here -----v
> > From: "Port 1" <sip:2185220@208.34.86.35:5060>;tag=f12fc590-f85d275a
> > To: 5852185220 <sip:5852185220@208.34.86.35:5060>
> > Call-ID: ef0976f9-913ba475-103c7d04@208.34.105.98
> > Via: SIP/2.0/UDP 208.34.105.98:5060
> > CSeq: 1023929528 INVITE
> > Content-Type: application/sdp
> > Contact: "Port 1" <sip:2185220@208.34.105.98:5060>
> > Allow: INVITE, ACK, BYE, CANCEL, REFER
> > Supported: timer
> > v=0
> > o=MxSIP 0 0 IN IP4 208.34.105.98
> > s=SIP Call
> > c=IN IP4 208.34.105.98
> > t=0 0
> > m=audio 5004 RTP/AVP 0 8 4 18 96
> > a=rtpmap:0 PCMU/8000
> > a=rtpmap:8 PCMA/8000
> > a=rtpmap:4 G723/8000
> > a=rtpmap:18 G729/8000
> > a=rtpmap:96 telephone-event/8000
> > a=fmtp:96 0-15
> > m=image 6001 udptl t38
> > a=T38FaxUdpEC:t38UDPRedundancy

And then balks when that is used as the To: for a subsequent BYE:

> > BYE sip:2185220@208.34.86.35:5060 SIP/2.0
> > Via: SIP/2.0/UDP 208.34.86.35:5060;branch=z9hG4bK46ab69b7
> > From: 5852185220 <sip:5852185220@208.34.86.35:5060>;tag=as181d22f2
> > To: "Port 1" <sip:2185220@208.34.86.35:5060>;tag=f12fc590-f85d275a
> > Contact: <sip:5852185220@208.34.86.35>
> > Call-ID: ef0976f9-913ba475-103c7d04@208.34.105.98
> > CSeq: 102 BYE
> > User-Agent: Asterisk PBX
> > Content-Length: 0

> > (no NAT) to 208.34.105.98:5060
> > SIP/2.0 404 Not Found
> > Call-ID: ef0976f9-913ba475-103c7d04@208.34.105.98
> > CSeq: 102 BYE
> > From: 5852185220 <sip:5852185220@208.34.86.35:5060>;tag=as181d22f2
> > To: "Port 1" <sip:2185220@208.34.86.35:5060>;tag=f12fc590-f85d275a
> > Via: SIP/2.0/UDP 208.34.86.35:5060;branch=z9hG4bK46ab69b7
> > Content-Length: 0

This causes the call to not drop.

I can dig up traces and the like if required.  :-)  -rt

SIP DEBUG OUTPUT:
>>> > On Mon, 21 Jul 2003 14:30:19 -0500, Martin Pycko via RT
>>> > <support@digium.com> wrote:
>>> > But could you paste the whole 'sip debug' starting from the
>>> origination
>>> > of the call ..... since the stuff that is in this email is right
> after
>>> > asterisk droped the call.
>>> > Certainly :-)
>>> > INVITE sip:5852185220@208.34.86.35:5060 SIP/2.0
>>> > Content-Length: 311
>>> > From: "Port 1"
> <sip:2185220@208.34.86.35:5060>;tag=f12fc590-f85d275a
>>> > To: 5852185220 <sip:5852185220@208.34.86.35:5060>
>>> > Call-ID: ef0976f9-913ba475-103c7d04@208.34.105.98
>>> > Via: SIP/2.0/UDP 208.34.105.98:5060
>>> > CSeq: 1023929528 INVITE
>>> > Content-Type: application/sdp
>>> > Contact: "Port 1" <sip:2185220@208.34.105.98:5060>
>>> > Allow: INVITE, ACK, BYE, CANCEL, REFER
>>> > Supported: timer
>>> > v=0
>>> > o=MxSIP 0 0 IN IP4 208.34.105.98
>>> > s=SIP Call
>>> > c=IN IP4 208.34.105.98
>>> > t=0 0
>>> > m=audio 5004 RTP/AVP 0 8 4 18 96
>>> > a=rtpmap:0 PCMU/8000
>>> > a=rtpmap:8 PCMA/8000
>>> > a=rtpmap:4 G723/8000
>>> > a=rtpmap:18 G729/8000
>>> > a=rtpmap:96 telephone-event/8000
>>> > a=fmtp:96 0-15
>>> > m=image 6001 udptl t38
>>> > a=T38FaxUdpEC:t38UDPRedundancy
>>> >
>>> >
>>> >
>>> > SIP/2.0 100 Trying
>>> > Via: SIP/2.0/UDP 208.34.105.98:5060
>>> > From: "Port 1"
> <sip:2185220@208.34.86.35:5060>;tag=f12fc590-f85d275a
>>> > To: 5852185220 <sip:5852185220@208.34.86.35:5060>;tag=as181d22f2
>>> > Call-ID: ef0976f9-913ba475-103c7d04@208.34.105.98
>>> > CSeq: 1023929528 INVITE
>>> > User-Agent: Asterisk PBX
>>> > Contact: <sip:5852185220@208.34.86.35>
>>> > Content-Length: 0
>>> > to 208.34.105.98:5060
>>> >
>>> >
>>> >
>>> > SIP/2.0 200 OK
>>> > Via: SIP/2.0/UDP 208.34.105.98:5060
>>> > From: "Port 1"
> <sip:2185220@208.34.86.35:5060>;tag=f12fc590-f85d275a
>>> > To: 5852185220 <sip:5852185220@208.34.86.35:5060>;tag=as181d22f2
>>> > Call-ID: ef0976f9-913ba475-103c7d04@208.34.105.98
>>> > CSeq: 1023929528 INVITE
>>> > User-Agent: Asterisk PBX
>>> > Contact: <sip:5852185220@208.34.86.35>
>>> > Content-Type: application/sdp
>>> > Content-Length: 213
>>> > v=0
>>> > o=root 15742 15742 IN IP4 208.34.86.35
>>> > s=session
>>> > c=IN IP4 208.34.86.35
>>> > t=0 0
>>> > m=audio 19152 RTP/AVP 0 8 101
>>> > a=rtpmap:0 PCMU/8000
>>> > a=rtpmap:8 PCMA/8000
>>> > a=rtpmap:101 telephone-event/8000
>>> > a=fmtp:101 0-16
>>> > to 208.34.105.98:5060
>>> > ACK sip:5852185220@208.34.86.35 SIP/2.0
>>> > Content-Length: 0
>>> > From: "Port 1"
> <sip:2185220@208.34.86.35:5060>;tag=f12fc590-f85d275a
>>> > To: 5852185220 <sip:5852185220@208.34.86.35:5060>;tag=as181d22f2
>>> > Call-ID: ef0976f9-913ba475-103c7d04@208.34.105.98
>>> > Via: SIP/2.0/UDP 208.34.105.98:5060
>>> > CSeq: 1023929528 ACK
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > INVITE sip:netacc-9895@208.34.105.168 SIP/2.0
>>> > Via: SIP/2.0/UDP 208.34.86.35:5060;branch=z9hG4bK656ab45f
>>> > From: "Port 1" <sip:2185220@208.34.86.35>;tag=as3b8ecd93
>>> > To: <sip:netacc-9895@208.34.105.168>
>>> > Contact: <sip:2185220@208.34.86.35>
>>> > Call-ID: 218e87897b06e7054978158d174c0d75@208.34.86.35
>>> > CSeq: 102 INVITE
>>> > User-Agent: Asterisk PBX
>>> > Content-Type: application/sdp
>>> > Content-Length: 236
>>> > v=0
>>> > o=root 15742 15742 IN IP4 208.34.86.35
>>> > s=session
>>> > c=IN IP4 208.34.86.35
>>> > t=0 0
>>> > m=audio 15368 RTP/AVP 3 0 8 101
>>> > a=rtpmap:3 GSM/8000
>>> > a=rtpmap:0 PCMU/8000
>>> > a=rtpmap:8 PCMA/8000
>>> > a=rtpmap:101 telephone-event/8000
>>> > a=fmtp:101 0-16
>>> > (no NAT) to 208.34.105.168:5060
>>> > SIP/2.0 100 Trying
>>> > Via: SIP/2.0/UDP 208.34.86.35:5060;branch=z9hG4bK656ab45f
>>> > From: "Port 1" <sip:2185220@208.34.86.35>;tag=as3b8ecd93
>>> > To: <sip:netacc-9895@208.34.105.168>
>>> > Call-ID: 218e87897b06e7054978158d174c0d75@208.34.86.35
>>> > Date: Mon, 21 Jul 2003 15:39:28 GMT
>>> > CSeq: 102 INVITE
>>> > Server: CSCO/4
>>> > Contact: sip:netacc-9895@208.34.105.168:5060
>>> > Content-Length: 0
>>> >
>>> >
>>> > SIP/2.0 180 Ringing
>>> > Via: SIP/2.0/UDP 208.34.86.35:5060;branch=z9hG4bK656ab45f
>>> > From: "Port 1" <sip:2185220@208.34.86.35>;tag=as3b8ecd93
>>> > To: <sip:netacc-9895@208.34.105.168>;tag=000c30de60200016723dea0a-
>>> > 2e814f6f
>>> > Call-ID: 218e87897b06e7054978158d174c0d75@208.34.86.35
>>> > Date: Mon, 21 Jul 2003 15:39:28 GMT
>>> > CSeq: 102 INVITE
>>> > Server: CSCO/4
>>> > Contact: sip:netacc-9895@208.34.105.168:5060
>>> > Content-Length: 0
>>> >
>>> >
>>> >
>>> > SIP/2.0 200 OK
>>> > Via: SIP/2.0/UDP 208.34.86.35:5060;branch=z9hG4bK656ab45f
>>> > From: "Port 1" <sip:2185220@208.34.86.35>;tag=as3b8ecd93
>>> > To: <sip:netacc-9895@208.34.105.168>;tag=000c30de60200016723dea0a-
>>> > 2e814f6f
>>> > Call-ID: 218e87897b06e7054978158d174c0d75@208.34.86.35
>>> > Date: Mon, 21 Jul 2003 15:39:30 GMT
>>> > CSeq: 102 INVITE
>>> > Server: CSCO/4
>>> > Contact: sip:netacc-9895@208.34.105.168:5060
>>> > Content-Type: application/sdp
>>> > Content-Length: 144
>>> > v=0
>>> > o=Cisco-SIPUA 21189 7644 IN IP4 208.34.105.168
>>> > s=SIP Call
>>> > c=IN IP4 208.34.105.168
>>> > t=0 0
>>> > m=audio 17136 RTP/AVP 0
>>> > a=rtpmap:0 PCMU/8000
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > ACK sip:netacc-9895@208.34.105.168 SIP/2.0
>>> > Via: SIP/2.0/UDP 208.34.86.35:5060;branch=z9hG4bK656ab45f
>>> > From: "Port 1" <sip:2185220@208.34.86.35>;tag=as3b8ecd93
>>> > To: <sip:netacc-9895@208.34.105.168>;tag=000c30de60200016723dea0a-
>>> > 2e814f6f
>>> > Contact: <sip:2185220@208.34.86.35>
>>> > Call-ID: 218e87897b06e7054978158d174c0d75@208.34.86.35
>>> > CSeq: 102 ACK
>>> > User-Agent: Asterisk PBX
>>> > Content-Length: 0
>>> > (no NAT) to 208.34.105.168:5060
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > BYE sip:2185220@208.34.86.35:5060 SIP/2.0
>>> > Via: SIP/2.0/UDP 208.34.105.168:5060
>>> > From:
> <sip:netacc-9895@208.34.105.168>;tag=000c30de60200016723dea0a-
>>> > 2e814f6f
>>> > To: "Port 1" <sip:2185220@208.34.86.35>;tag=as3b8ecd93
>>> > Call-ID: 218e87897b06e7054978158d174c0d75@208.34.86.35
>>> > Date: Mon, 21 Jul 2003 15:39:44 GMT
>>> > CSeq: 101 BYE
>>> > User-Agent: CSCO/4
>>> > Content-Length: 0
>>> >
>>> >
>>> >
>>> > SIP/2.0 200 OK
>>> > Via: SIP/2.0/UDP 208.34.105.168:5060
>>> > From:
> <sip:netacc-9895@208.34.105.168>;tag=000c30de60200016723dea0a-
>>> > 2e814f6f
>>> > To: "Port 1" <sip:2185220@208.34.86.35>;tag=as3b8ecd93
>>> > Call-ID: 218e87897b06e7054978158d174c0d75@208.34.86.35
>>> > CSeq: 101 BYE
>>> > User-Agent: Asterisk PBX
>>> > Contact: <sip:2185220@208.34.86.35>
>>> > Content-Length: 0
>>> > to 208.34.105.168:5060
>>> >
>>> >
>>> >
>>> > BYE sip:2185220@208.34.86.35:5060 SIP/2.0
>>> > Via: SIP/2.0/UDP 208.34.86.35:5060;branch=z9hG4bK46ab69b7
>>> > From: 5852185220 <sip:5852185220@208.34.86.35:5060>;tag=as181d22f2
>>> > To: "Port 1" <sip:2185220@208.34.86.35:5060>;tag=f12fc590-f85d275a
>>> > Contact: <sip:5852185220@208.34.86.35>
>>> > Call-ID: ef0976f9-913ba475-103c7d04@208.34.105.98
>>> > CSeq: 102 BYE
>>> > User-Agent: Asterisk PBX
>>> > Content-Length: 0
>>> > (no NAT) to 208.34.105.98:5060
>>> > SIP/2.0 404 Not Found
>>> > Call-ID: ef0976f9-913ba475-103c7d04@208.34.105.98
>>> > CSeq: 102 BYE
>>> > From: 5852185220 <sip:5852185220@208.34.86.35:5060>;tag=as181d22f2
>>> > To: "Port 1" <sip:2185220@208.34.86.35:5060>;tag=f12fc590-f85d275a
>>> > Via: SIP/2.0/UDP 208.34.86.35:5060;branch=z9hG4bK46ab69b7
>>> > Content-Length: 0
>>> >
>>> >
>>> > BYE sip:5852185220@208.34.86.35 SIP/2.0
>>> > Content-Length: 0
>>> > From: "Port 1"
> <sip:2185220@208.34.86.35:5060>;tag=f12fc590-f85d275a
>>> > To: 5852185220 <sip:5852185220@208.34.86.35:5060>;tag=as181d22f2
>>> > Call-ID: ef0976f9-913ba475-103c7d04@208.34.105.98
>>> > Via: SIP/2.0/UDP 208.34.105.98:5060
>>> > CSeq: 1023929529 BYE
>>> > Supported: timer
>>> >
>>> >
>>> >
>>> > SIP/2.0 200 OK
>>> > Via: SIP/2.0/UDP 208.34.105.98:5060
>>> > From: "Port 1"
> <sip:2185220@208.34.86.35:5060>;tag=f12fc590-f85d275a
>>> > To: 5852185220 <sip:5852185220@208.34.86.35:5060>;tag=as181d22f2
>>> > Call-ID: ef0976f9-913ba475-103c7d04@208.34.105.98
>>> > CSeq: 1023929529 BYE
>>> > User-Agent: Asterisk PBX
>>> > Contact: Content-Length: 0
>>> > to 208.34.105.98:5060
>>> >
>>> >

MEDIATRIX VENDOR SUPPORT RESPONSE:
According to the RFC, it is on the Contact information that it should
base itself on the CONTACT information to return the BYE not on the FROM
information.

RFC definition of the FROM:

 The From header field indicates the logical identity of the initiator
 of the request, possibly the user's address-of-record.  Like the To
 header field, it contains a URI and optionally a display name.  It is
  used by SIP elements to determine which processing rules to apply to
  a request (for example, automatic call rejection).  As such, it is
  very important that the From URI not contain IP addresses or the FQDN
  of the host on which the UA is running, since these are not logical
  names.

Of the CONTACT:

  The Contact header field provides a SIP or SIPS URI that can be used
  to contact that specific instance of the UA for subsequent requests.

Let me know if you need additional information.

Comments:By: Mark Spencer (markster) 2003-08-23 02:19:22

Okay, totally untested fix in CVS.  Can you see if it helps or even changes this any?

By: Ryan Tucker (rtucker) 2003-08-24 11:28:46

Woo.  This seems to have done the trick.  The unit is now properly hanging up.

Thanks!  -rt

By: Mark Spencer (markster) 2003-08-24 14:51:17

Fixed in CVS

By: zsprackett (zsprackett) 2003-09-03 21:41:06

Reminder sent to rtucker

Hi, can you help me getting * working with a mediatrix 1204?

I'm having the same problems you were except CVS hasnt fixed them.  It seems my 1204 is looking for the username in the contact field as well as the correct IP address.

Thanks for any help you can give me.

My email address is zac@sprackett.com