Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: admin [...] rootbsd.info
Cc:
AdminCc:

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



Subject: Net::SIP is buggous on Perl 5.10+
Date: Thu, 06 Mar 2014 17:44:08 -0300
To: <bug-Net-SIP [...] rt.cpan.org>
From: admin [...] rootbsd.info
It look like creation of new Net::SIP::Packet from a SIP string is not working on Perl 5.10 or higher. A got the following error: Attempt to access disallowed key 'body' in a restricted hash at /usr/share/perl5/Net/SIP/Packet.pm line 142. Here is my test enviroment: Kernel: Linux thiago-laptop-dell 3.11.0-15-generic #25-Ubuntu SMP Thu Jan 30 17:22:01 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Perl: This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi Net::SIP version 0.68 Here is the code sample: use Net::SIP::Packet; my $rawpkt = << 'EOS'; OPTIONS sip:test@172.16.2.24:57524;transport=udp SIP/2.0 Via: SIP/2.0/UDP 172.16.0.125:5060;branch=z9hG4bK0e2ba000;rport Max-Forwards: 70 From: "Unknown" <sip:Unknown@testnet.localdomain>;tag=as5300c55b To: <sip:test@172.16.2.24:57524;transport=udp> Contact: <sip:Unknown@172.16.0.125:5060> Call-ID: 68f028872141e0734ef15ae704664f7e@testnet.localdomain CSeq: 102 OPTIONS User-Agent: Test PBX Date: Thu, 06 Mar 2014 18:01:01 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH Supported: replaces, timer Content-Length: 0 EOS my $sippkt = Net::SIP::Packet->new($rawpkt); print "callid=".$invite->get_header( 'call-id' )."\n"; print "route=".join( ",", $invite->get_header( 'route' ))."\n"; print $invite->as_string;
Am Do 06. Mär 2014, 15:41:34, admin@rootbsd.info schrieb: Show quoted text
> It look like creation of new Net::SIP::Packet from a SIP string is not > working on Perl 5.10 or higher. A got the following error: > > Attempt to access disallowed key 'body' in a restricted hash at > /usr/share/perl5/Net/SIP/Packet.pm line 142. >
because the new* functions create Net::SIP::Re::SIP::Response objects these classes have to be loaded, they will not be dynamically loaded. The documentation for the next release is updated accordingly. Regards, Steffen