Subject: | Error creating SIP packet from string |
using Net::SIP v 0.40, perl 5.8.8, Ubuntu 7.10, the following snippet:
#!/usr/bin/perl -w
use strict;
use Net::SIP::Packet;
my $string="SIP/2.0 401 Unauthorized\r\nVia: SIP/2.0/UDP
75.81.49.192:5060;branch=z9hG4bK3a2b495c;rport=5060\r\nFrom:
<sip:user\@server>;tag=as4c6f5865\r\nTo:
<sip:user\@server>;tag=f851abebff21dfe055504b396d2efab8.21e8\r\nCall-ID:
70bd2490050337f02185235a17aeb47d\@127.0.0.1\r\nCSeq: 127736 REGISTER\r\nWWW-
Authenticate: Digest realm=\"provider.com\",
nonce=\"47587817e64620d949e769c97eb7d8fbe0048955\"\r\nContent-Length:
0\r\n\r\n";
my $sip_pkt = Net::SIP::Packet->new($string);
results in:
Pseudo-hashes are deprecated at /usr/local/share/perl/5.8.8/Net/SIP/Packet.pm line 141.
No such pseudo-hash field "body" at /usr/local/share/perl/5.8.8/Net/SIP/Packet.pm line
141.