[Home]

Summary:ASTERISK-06918: [patch] Sip Require headers
Reporter:mikma (mikma)Labels:
Date Opened:2006-05-08 07:20:43Date Closed:2006-06-01 12:08:58
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_sip.c.patch
( 1) chan_sip.c.patch2
Description:There are some problems with handling of Require headers in SVN trunk and 1.2.x.

1. The Require header is incorrectly called Required in Asterisk, both in SVN trunk and 1.2.x.

2. Require headers are ignored since pvt is NULL in call to parse_sip_options, in SVN trunk.

3. Asterisk should not send responses to ACK, it isn't allowed AFAIK.


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

Output fron ngrep without patch for 3. above.

U 192.168.0.4:5066 -> 192.168.0.2:5068
 INVITE sip:600@192.168.0.2:5068 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.4:5066;
 branch=z9hG4bK-SCb-0-1147089335.57-192.168.0.4;rport..From: <sip:sc@192.168
 .0.4>;tag=SCt-0-1147089335.57-192.168.0.4~case213anat..Call-ID: -1213806100
 -445f31b7@192.168.0.4..Content-Length: 150..Max-Forwards: 70..To: sip:600@1
 92.168.0.2..Contact: sip:sc@192.168.0.4:5066..CSeq: 1 INVITE..Supported: ..
 Content-Type: application/sdp..Require: sdp-anat....v=0..o=sc 1147089335 11
 47089335 IN IP4 192.168.0.4..s=Dummy on hold SDP..c=IN IP4 0.0.0.0..m=audio
  65534 RTP/AVP 0..a=rtpmap:0 PCMU/8000..a=recvonly..
#
U 192.168.0.4:5068 -> 192.168.0.4:5066
 SIP/2.0 420 Bad extension..Via: SIP/2.0/UDP 192.168.0.4:5066;branch=z9hG4bK
 -SCb-0-1147089335.57-192.168.0.4;rport;received=192.168.0.4..From: <sip:sc@
 192.168.0.4>;tag=SCt-0-1147089335.57-192.168.0.4~case213anat..To: sip:600@1
 92.168.0.2;tag=as0ed55ab9..Call-ID: -1213806100-445f31b7@192.168.0.4..CSeq:
  1 INVITE..User-Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS, B
 YE, REFER, SUBSCRIBE, NOTIFY..Supported: replaces..Date: Mon, 08 May 2006 1
 1:55:35 GMT..Unsupported: sdp-anat..
#
U 192.168.0.4:5066 -> 192.168.0.2:5068
 ACK sip:600@192.168.0.2:5068 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.4:5066;bra
 nch=z9hG4bK-SCb-0-1147089335.57-192.168.0.4;rport..From: <sip:sc@192.168.0.
 4>;tag=SCt-0-1147089335.57-192.168.0.4~case213anat..Call-ID: -1213806100-44
 5f31b7@192.168.0.4..Content-Length: 0..Max-Forwards: 70..To: <sip:600@192.1
 68.0.2>;tag=as0ed55ab9..Contact: sip:sc@192.168.0.4:5066..CSeq: 1 ACK....
#
U 192.168.0.4:5068 -> 192.168.0.4:5066
 SIP/2.0 481 Call/Transaction Does Not Exist..Via: SIP/2.0/UDP 192.168.0.4:5
 066;branch=z9hG4bK-SCb-0-1147089335.57-192.168.0.4;rport;received=192.168.0
 .4..From: <sip:sc@192.168.0.4>;tag=SCt-0-1147089335.57-192.168.0.4~case213a
 nat..To: <sip:600@192.168.0.2>;tag=as0ed55ab9..Call-ID: -1213806100-445f31b
 7@192.168.0.4..CSeq: 1 ACK..User-Agent: Asterisk PBX..Allow: INVITE, ACK, C
 ANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY..Supported: replaces..Content
 -Length: 0....
#
Comments:By: Olle Johansson (oej) 2006-05-08 08:18:08

thanks, will look into this!

By: Olle Johansson (oej) 2006-05-08 10:31:29

Committed to svn 1.2 and trunk. (A bit different from your patch, but almost). Thanks!

By: mikma (mikma) 2006-05-09 04:15:56

The Require header is still ignored in SVN trunk r25612. The call to parse_sip_options on line 10992 returns 0 without checking the header since pvt = NULL.

By: Serge Vecher (serge-v) 2006-05-09 14:17:16

mikma: can you please produce a new patch to make oej's life easier?

thanks.

By: mikma (mikma) 2006-05-20 15:05:18

Patch uploaded.

By: Olle Johansson (oej) 2006-06-01 11:42:10

Thanks, Mikma.

By: Olle Johansson (oej) 2006-06-01 12:08:58

Comitted to svn trunk 31414