Skip Menu |

This queue is for tickets about the Net-SIP CPAN distribution.

Report information
The Basics
Id: 33592
Status: resolved
Priority: 0/
Queue: Net-SIP

People
Owner: Nobody in particular
Requestors: frouleau [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.43
Fixed in: (no value)



Subject: Error decoding 180 Ringing response
When I am trying to make a call to my SIP proxy, I have this error when I receive the Ringing message: "multiple values for content-length at Net/SIP/Leg.pm line 399" I have made a little debuging found that it is the dump of the packet which cause the error. I think that the origin of the pb is the creation of the Packet object. I join a code sample reproducing the problem during Net::SIP::Packet->new. Investigating further would require a better understanding of the code than I have :-(
Subject: test_packet.pl
#!/usr/bin/perl -w use Net::SIP; use Net::SIP::Debug; Net::SIP::Debug->level(200); my $buf = 'SIP/2.0 180 Ringing allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PING,REFER,REGISTER,SUBSCRIBE call-id: 2368909d39576afcaa947cbff24892ab contact: <sip:any@10.5.0.1:5060> content-length: 0 cseq: 1 INVITE from: 0919376649 <sip:0919376649@sfr.fr>;tag=f8ff602e4f2143cab4ae3246a7d0df68 to: 0972807269 <sip:0972807269@sfr.fr>;tag=397496836 via: SIP/2.0/UDP 10.5.0.63;branch=z9hG4bK5a40f5a153a46ad6f2e6c8e08ec71b1c9775ead74afd00e19f6348a548ce96f5 Content-Length: 0 '; my $packet = eval { Net::SIP::Packet->new( $buf ) }; print "Packet=/n".$packet->dump(100);
Subject: Re: [rt.cpan.org #33592] Error decoding 180 Ringing response
Date: Tue, 26 Feb 2008 16:10:59 +0100
To: Frédérik Rouleau via RT <bug-Net-SIP [...] rt.cpan.org>
From: Steffen Ullrich <Steffen_Ullrich [...] genua.de>
Show quoted text
> > When I am trying to make a call to my SIP proxy, I have this error when > I receive the Ringing message: "multiple values for content-length at > Net/SIP/Leg.pm line 399"
This is because the response has multiple content-length Headers, which is wrong: | content-length: 0 | cseq: 1 INVITE | .. | Content-Length: 0 I should probably ignore this problem as long they all specify the same content-length. Which client generated this kind of response?
Subject: Re: [rt.cpan.org #33592] Error decoding 180 Ringing response
Date: Tue, 26 Feb 2008 16:25:59 +0100
To: bug-Net-SIP [...] rt.cpan.org
From: "Frédérik Rouleau" <frouleau [...] gmail.com>
Uh, right. I did not notice that. I am using a Radvision gateway with a proprietary proxy between the gateway and the client. I have check and this is the proxy who adds the double header. I will contact the manufacturer to report the bug. Thanks for your help. On Tue, Feb 26, 2008 at 4:16 PM, Steffen Ullrich via RT < bug-Net-SIP@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=33592 > >
> > > > When I am trying to make a call to my SIP proxy, I have this error when > > I receive the Ringing message: "multiple values for content-length at > > Net/SIP/Leg.pm line 399"
> > This is because the response has multiple content-length Headers, which is > wrong: > > | content-length: 0 > | cseq: 1 INVITE > | .. > | Content-Length: 0 > > I should probably ignore this problem as long they all specify the same > content-length. > Which client generated this kind of response? > >
Subject: Re: [rt.cpan.org #33592] Error decoding 180 Ringing response
Date: Tue, 26 Feb 2008 21:07:11 +0100
To: Frédérik Rouleau via RT <bug-Net-SIP [...] rt.cpan.org>
From: Steffen Ullrich <Steffen_Ullrich [...] genua.de>
Hi, try the attached test version 0.43_1 which works around the gateways bug by ignoring multiple content-length as long as they are the same Regards, Steffen On Tue, Feb 26, 2008 at 10:26:52AM -0500, Frédérik Rouleau via RT <bug-Net-SIP@rt.cpan.org> wrote: Show quoted text
> > Queue: Net-SIP > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=33592 > > > Uh, right. I did not notice that. > > I am using a Radvision gateway with a proprietary proxy between the gateway > and the client. I have check and this is the proxy who adds the double > header. I will contact the manufacturer to report the bug. > > Thanks for your help. > > On Tue, Feb 26, 2008 at 4:16 PM, Steffen Ullrich via RT < > bug-Net-SIP@rt.cpan.org> wrote: >
> > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=33592 > > >
> > > > > > When I am trying to make a call to my SIP proxy, I have this error when > > > I receive the Ringing message: "multiple values for content-length at > > > Net/SIP/Leg.pm line 399"
> > > > This is because the response has multiple content-length Headers, which is > > wrong: > > > > | content-length: 0 > > | cseq: 1 INVITE > > | .. > > | Content-Length: 0 > > > > I should probably ignore this problem as long they all specify the same > > content-length. > > Which client generated this kind of response? > > > >
>
Show quoted text
> > Uh, right. I did not notice that. > I am using a Radvision gateway with a proprietary proxy between the > gateway and the client. I have check and this is the proxy who adds > the double header. I will contact the manufacturer to report the bug. > Thanks for your help. > > On Tue, Feb 26, 2008 at 4:16 PM, Steffen Ullrich via RT > <[1]bug-Net-SIP@rt.cpan.org> wrote: > > <URL: [2]http://rt.cpan.org/Ticket/Display.html?id=33592 >
> > > > When I am trying to make a call to my SIP proxy, I have this
> error when
> > I receive the Ringing message: "multiple values for
> content-length at
> > Net/SIP/Leg.pm line 399"
> This is because the response has multiple content-length Headers, > which is > wrong: > | content-length: 0 > | cseq: 1 INVITE > | .. > | Content-Length: 0 > I should probably ignore this problem as long they all specify the > same > content-length. > Which client generated this kind of response? > > References > > 1. mailto:bug-Net-SIP@rt.cpan.org > 2. http://rt.cpan.org/Ticket/Display.html?id=33592
Download Net-SIP-0.43_1.tar.gz
application/octet-stream 128.9k

Message body not shown because it is not plain text.

From: frouleau [...] gmail.com
Hi, It works now. Thanks again for your help. I definitly need to get this proxy fixed. Regards, Fred Le Mar. Fév. 26 15:11:56 2008, SULLR a écrit : Show quoted text
> Hi, > try the attached test version 0.43_1 which works around the gateways > bug by ignoring multiple content-length as long as they are the same > > Regards, > Steffen > > On Tue, Feb 26, 2008 at 10:26:52AM -0500, Frédérik Rouleau via RT > <bug-Net-SIP@rt.cpan.org> wrote:
> > > > Queue: Net-SIP > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=33592 > > > > > Uh, right. I did not notice that. > > > > I am using a Radvision gateway with a proprietary proxy between the
> gateway
> > and the client. I have check and this is the proxy who adds the
> double
> > header. I will contact the manufacturer to report the bug. > > > > Thanks for your help. > > > > On Tue, Feb 26, 2008 at 4:16 PM, Steffen Ullrich via RT < > > bug-Net-SIP@rt.cpan.org> wrote: > >
> > > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=33592 > > > >
> > > > > > > > When I am trying to make a call to my SIP proxy, I have this
> error when
> > > > I receive the Ringing message: "multiple values for content-
> length at
> > > > Net/SIP/Leg.pm line 399"
> > > > > > This is because the response has multiple content-length Headers,
> which is
> > > wrong: > > > > > > | content-length: 0 > > > | cseq: 1 INVITE > > > | .. > > > | Content-Length: 0 > > > > > > I should probably ignore this problem as long they all specify the
> same
> > > content-length. > > > Which client generated this kind of response? > > > > > >
> >
>
> > > > Uh, right. I did not notice that. > > I am using a Radvision gateway with a proprietary proxy between
> the
> > gateway and the client. I have check and this is the proxy who
> adds
> > the double header. I will contact the manufacturer to report the
> bug.
> > Thanks for your help. > > > > On Tue, Feb 26, 2008 at 4:16 PM, Steffen Ullrich via RT > > <[1]bug-Net-SIP@rt.cpan.org> wrote: > > > > <URL: [2]http://rt.cpan.org/Ticket/Display.html?id=33592 >
> > > > > > When I am trying to make a call to my SIP proxy, I have this
> > error when
> > > I receive the Ringing message: "multiple values for
> > content-length at
> > > Net/SIP/Leg.pm line 399"
> > This is because the response has multiple content-length
> Headers,
> > which is > > wrong: > > | content-length: 0 > > | cseq: 1 INVITE > > | .. > > | Content-Length: 0 > > I should probably ignore this problem as long they all specify
> the
> > same > > content-length. > > Which client generated this kind of response? > > > > References > > > > 1. mailto:bug-Net-SIP@rt.cpan.org > > 2. http://rt.cpan.org/Ticket/Display.html?id=33592
>
Released version 0.44 which works around bug in the proxy.
Subject: Re: [rt.cpan.org #33592] Error decoding 180 Ringing response
Date: Wed, 27 Feb 2008 11:16:43 +0100
To: bug-Net-SIP [...] rt.cpan.org
From: "Frédérik Rouleau" <frouleau [...] gmail.com>
I am sorry to bother you again. The proxy manufacturer has fixed the pb on the testing plateform. Now I have only 1 Content-Length header. That's the good news. But the SDP received in the 200 OK message does not be understood by the perl SIP module. The log are below. I am not an expert in SDP (I have to reread the RFC) but that seems good for me. I have tried with other SIP client and they are working. Any idea ? Fred 1204105887.1202 DEBUG:<2> Net::SIP::Leg::receive[399]: received on 10.6.32.10:5060 from 10.6.0.1:5060 packet 1204105887.1202 DEBUG:<2> SIP/2.0 200 OK 1204105887.1202 DEBUG:<2> allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PING,REFER,REGISTER,SUBSCRIBE 1204105887.1202 DEBUG:<2> call-id: 0fc307d1f32a4d213709cc16c2bda18f 1204105887.1202 DEBUG:<2> call-info: <Media:Voice>;purpose=info 1204105887.1202 DEBUG:<2> contact: <sip:any@10.6.0.1:5060> 1204105887.1202 DEBUG:<2> content-type: application/SDP 1204105887.1202 DEBUG:<2> cseq: 1 INVITE 1204105887.1202 DEBUG:<2> from: 0619376649 <sip:0619376649@sfr.fr Show quoted text
>;tag=772e2b6e0c07e89b8fbd133ff5fe9df1
1204105887.1202 DEBUG:<2> privacy: none 1204105887.1202 DEBUG:<2> to: 0472807269 <sip:0472807269@sfr.fr Show quoted text
>;tag=114723506
1204105887.1202 DEBUG:<2> user-agent: RADVision ViaIP GW vers. 2.5 1204105887.1202 DEBUG:<2> via: SIP/2.0/UDP 10.6.32.10 ;branch=z9hG4bK2c48120b342b3908e776c2ea3812e9a7c8542864db03a2c0074c68f4c98b5a14 1204105887.1202 DEBUG:<2> Content-Length: 121 1204105887.1202 DEBUG:<2> 1204105887.1202 DEBUG:<2> v=0 1204105887.1202 DEBUG:<2> o=- 0 0 IN IP4 10.103.0.60 1204105887.1202 DEBUG:<2> s=SDP 1204105887.1202 DEBUG:<2> b=CT:64 1204105887.1202 DEBUG:<2> t=0 0 1204105887.1202 DEBUG:<2> m=audio 7004 RTP/AVP 0 1204105887.1202 DEBUG:<2> c=IN IP4 10.6.0.1 1204105887.1202 DEBUG:<2> a=rtpmap:0 PCMU/8000 1204105887.1202 DEBUG:<2> 1204105887.1215 DEBUG:<10> Net::SIP::Endpoint::receive_response[259]: received reply for tid=0fc307d1f32a4d213709cc16c2bda18f 1 1204105887.1221 DEBUG:<100> Net::SIP::Dispatcher::cancel_delivery[349]: cancel packet id 0fc307d1f32a4d213709cc16c2bda18f 1 1204105887.1228 DEBUG:<10> Net::SIP::Endpoint::Context::handle_response[262]: got response for transaction REQ INVITE sip:0472807269@sfr.fr with body 1204105887.1242 DEBUG:<100> Net::SIP::Simple::Call::rtp_cleanup[116]: done 1204105887.1454 DEBUG:<100> Net::SIP::Simple::error[212]: 1204105887.1248DEBUG: Net::SIP::Debug::stacktrace[194]: set error to No SDP body in packet at /cygdrive/e/dev/monitoring/mon-liveathome/../net-sip/lib/Net/SIP/Simple.pm line 212 1204105887.1454 DEBUG:<100> Net::SIP::Simple::error('Net::SIP::Simple::Call=ARRAY(0x106efeb8)', 'No SDP body in packet') called at /cygdrive/e/dev/monitoring/mon-liveathome/../net-sip/lib/Net/SIP/Simple/Call.pm line 370
Problem was that client send application/SDP but Net::SIP expected application/sdp. This will be closed in 0.44_1 which I upload shortly. The diff is simple: --- lib/Net/SIP/Packet.pm (revision 115) +++ lib/Net/SIP/Packet.pm (working copy) @@ -640,7 +640,7 @@ sub sdp_body { my Net::SIP::Packet $self = shift; my $ct = $self->get_header( 'content-type' ); - return if $ct && $ct ne 'application/sdp'; + return if $ct && lc($ct) ne 'application/sdp'; my $body = ($self->as_parts)[3] || return; return Net::SIP::SDP->new( $body ); } But please reuse an existing trouble ticket to report further bugs. Please leave a closed bug closed and create a new bugreport for a different Bug. Thanks, Steffen