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
Versions:Frequency of
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.


Output fron ngrep without patch for 3. above.

U ->
 INVITE sip:600@ SIP/2.0..Via: SIP/2.0/UDP;
 branch=z9hG4bK-SCb-0-1147089335.57-;rport..From: <sip:sc@192.168
 .0.4>;tag=SCt-0-1147089335.57- -1213806100
 -445f31b7@ 150..Max-Forwards: 70..To: sip:600@1 sip:sc@ 1 INVITE..Supported: ..
 Content-Type: application/sdp..Require: sdp-anat....v=0..o=sc 1147089335 11
 47089335 IN IP4 on hold SDP..c=IN IP4
  65534 RTP/AVP 0..a=rtpmap:0 PCMU/8000..a=recvonly..
U ->
 SIP/2.0 420 Bad extension..Via: SIP/2.0/UDP;branch=z9hG4bK
 -SCb-0-1147089335.57-;rport;received= <sip:sc@>;tag=SCt-0-1147089335.57- sip:600@1;tag=as0ed55ab9..Call-ID: -1213806100-445f31b7@
  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 ->
 ACK sip:600@ SIP/2.0..Via: SIP/2.0/UDP;bra
 nch=z9hG4bK-SCb-0-1147089335.57-;rport..From: <sip:sc@192.168.0.
 4>;tag=SCt-0-1147089335.57- -1213806100-44
 5f31b7@ 0..Max-Forwards: 70..To: <sip:600@192.1
 68.0.2>;tag=as0ed55ab9..Contact: sip:sc@ 1 ACK....
U ->
 SIP/2.0 481 Call/Transaction Does Not Exist..Via: SIP/2.0/UDP
 .4..From: <sip:sc@>;tag=SCt-0-1147089335.57-
 nat..To: <sip:600@>;tag=as0ed55ab9..Call-ID: -1213806100-445f31b
 7@ 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?


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