r51907 - in /trunk/libnet-sip-perl: Changes MANIFEST META.yml debian/changelog lib/Net/SIP.pm lib/Net/SIP/Authorize.pm lib/Net/SIP/Redirect.pm lib/Net/SIP/Redirect.pod lib/Net/SIP/Registrar.pod lib/Net/SIP/Simple.pm

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sun Jan 31 01:41:36 UTC 2010


Author: jawnsy-guest
Date: Sun Jan 31 01:41:18 2010
New Revision: 51907

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=51907
Log:
New upstream release

Added:
    trunk/libnet-sip-perl/lib/Net/SIP/Redirect.pm
      - copied unchanged from r51883, branches/upstream/libnet-sip-perl/current/lib/Net/SIP/Redirect.pm
    trunk/libnet-sip-perl/lib/Net/SIP/Redirect.pod
      - copied unchanged from r51883, branches/upstream/libnet-sip-perl/current/lib/Net/SIP/Redirect.pod
Modified:
    trunk/libnet-sip-perl/Changes
    trunk/libnet-sip-perl/MANIFEST
    trunk/libnet-sip-perl/META.yml
    trunk/libnet-sip-perl/debian/changelog
    trunk/libnet-sip-perl/lib/Net/SIP.pm
    trunk/libnet-sip-perl/lib/Net/SIP/Authorize.pm
    trunk/libnet-sip-perl/lib/Net/SIP/Registrar.pod
    trunk/libnet-sip-perl/lib/Net/SIP/Simple.pm

Modified: trunk/libnet-sip-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sip-perl/Changes?rev=51907&op=diff
==============================================================================
--- trunk/libnet-sip-perl/Changes (original)
+++ trunk/libnet-sip-perl/Changes Sun Jan 31 01:41:18 2010
@@ -1,4 +1,13 @@
 Revision history for Net::SIP
+
+0.55 2010-01-27
+- Net::SIP::Redirect provides functionlity to redirect INVITES using
+  information from registrar. Sample program
+  samples/register_and_redirect.pl
+- fixes for Net::SIP::Authorize if no pass is known for user (or user
+  is not known).
+- fixes for Net::SIP::Authorize for ACK an CANCEL (no challenge 
+  possible, credentials should be compared against INVITE method)
 
 0.54 2009-09-04
 - bugfix in Net::SIP::Packet::new_from_parts when the header was already

Modified: trunk/libnet-sip-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sip-perl/MANIFEST?rev=51907&op=diff
==============================================================================
--- trunk/libnet-sip-perl/MANIFEST (original)
+++ trunk/libnet-sip-perl/MANIFEST Sun Jan 31 01:41:18 2010
@@ -32,6 +32,8 @@
 lib/Net/SIP/Endpoint.pod
 lib/Net/SIP/Endpoint/Context.pm
 lib/Net/SIP/Endpoint/Context.pod
+lib/Net/SIP/Redirect.pm
+lib/Net/SIP/Redirect.pod
 lib/Net/SIP/Registrar.pm
 lib/Net/SIP/Registrar.pod
 lib/Net/SIP/StatelessProxy.pm

Modified: trunk/libnet-sip-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sip-perl/META.yml?rev=51907&op=diff
==============================================================================
--- trunk/libnet-sip-perl/META.yml (original)
+++ trunk/libnet-sip-perl/META.yml Sun Jan 31 01:41:18 2010
@@ -1,13 +1,21 @@
 --- #YAML:1.0
-name:                Net-SIP
-version:             0.54
-abstract:            ~
-license:             ~
-author:              ~
-generated_by:        ExtUtils::MakeMaker version 6.42
-distribution_type:   module
-requires:     
-    Net::DNS:                      0.56
+name:               Net-SIP
+version:            0.55
+abstract:           ~
+author:  []
+license:            unknown
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
+requires:
+    Net::DNS:  0.56
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.54
 meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
-    version: 1.3
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: trunk/libnet-sip-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sip-perl/debian/changelog?rev=51907&op=diff
==============================================================================
--- trunk/libnet-sip-perl/debian/changelog (original)
+++ trunk/libnet-sip-perl/debian/changelog Sun Jan 31 01:41:18 2010
@@ -1,3 +1,9 @@
+libnet-sip-perl (0.55-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Jonathan Yu <jawnsy at cpan.org>  Sat, 30 Jan 2010 12:55:31 -0500
+
 libnet-sip-perl (0.54-1) unstable; urgency=low
 
   [ Jonathan Yu ]

Modified: trunk/libnet-sip-perl/lib/Net/SIP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sip-perl/lib/Net/SIP.pm?rev=51907&op=diff
==============================================================================
--- trunk/libnet-sip-perl/lib/Net/SIP.pm (original)
+++ trunk/libnet-sip-perl/lib/Net/SIP.pm Sun Jan 31 01:41:18 2010
@@ -4,7 +4,7 @@
 require 5.008;
 
 package Net::SIP;
-our $VERSION = '0.54';
+our $VERSION = '0.55';
 
 # this includes nearly everything else
 use Net::SIP::Simple ();
@@ -30,6 +30,7 @@
 		Net::SIP::Simple::RTP
 		Net::SIP::Dispatcher
 		Net::SIP::Dispatcher::Eventloop
+		Net::SIP::Redirect
 		Net::SIP::Registrar
 		Net::SIP::StatelessProxy
 		Net::SIP::ReceiveChain

Modified: trunk/libnet-sip-perl/lib/Net/SIP/Authorize.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sip-perl/lib/Net/SIP/Authorize.pm?rev=51907&op=diff
==============================================================================
--- trunk/libnet-sip-perl/lib/Net/SIP/Authorize.pm (original)
+++ trunk/libnet-sip-perl/lib/Net/SIP/Authorize.pm Sun Jan 31 01:41:18 2010
@@ -58,6 +58,7 @@
 		DEBUG( 100,"pass thru response" );
 		return;
 	}
+	my $method = $packet->method;
 
 	# check authorization on request
 	my ($rq_key,$rs_key,$acode) = $self->{i_am_proxy}
@@ -100,9 +101,14 @@
 			next;
 		};
 
+		# ACK|CANCEL just reuse the authorization from INVITE, so they should
+		# be checked against method INVITE
+		my $a2 = join( ':',
+			( $method eq 'ACK' || $method eq 'CANCEL' ) ? 'INVITE' : $method,
+			$uri );
+
 		# we support with and w/o qop	
 		# get a1_hex from either user2a1 or user2pass
-		my $a2 = join( ':',$packet->method,$uri );
 		my $a1_hex;
 		if ( ref($user2a1)) {
 			if ( ref($user2a1) eq 'HASH' ) {
@@ -118,6 +124,8 @@
 			} else {
 				$pass = invoke_callback( $user2pass,$user );
 			}
+			# if wrong credentials ask again for authorization
+			last if ! defined $pass; 
 			$a1_hex = md5_hex(join( ':',$user,$realm,$pass ));
 		} 
 
@@ -155,6 +163,17 @@
 		return;
 	}
 
+	# CANCEL or ACK cannot be prompted for authorization, so
+	# they should provide the right data already
+	return $acode if $method eq 'CANCEL'; # unauthorized CANCEL
+	if ( $method eq 'ACK' ) {
+		# in case the ACK just acks that UAC received response
+		# we accept it w/o authorization
+		# but if it contains a (SDP) body we better need authorization
+		return $acode if ($packet->as_parts)[3];
+		return; # no body
+	}
+
 	# not authorized yet, ask to authenticate
 	# keep it simple RFC2069 style
 	my $digest = qq[Digest algorithm=MD5, realm="$realm",].

Modified: trunk/libnet-sip-perl/lib/Net/SIP/Registrar.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sip-perl/lib/Net/SIP/Registrar.pod?rev=51907&op=diff
==============================================================================
--- trunk/libnet-sip-perl/lib/Net/SIP/Registrar.pod (original)
+++ trunk/libnet-sip-perl/lib/Net/SIP/Registrar.pod Sun Jan 31 01:41:18 2010
@@ -5,7 +5,7 @@
 
 =head1 SYNOPSIS
 
-  my $reg = Net::SIP::Registry->new(
+  my $reg = Net::SIP::Registrar->new(
 	dispatcher => $dispatcher,
 	min_expires => 10,
 	max_expires => 60,

Modified: trunk/libnet-sip-perl/lib/Net/SIP/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sip-perl/lib/Net/SIP/Simple.pm?rev=51907&op=diff
==============================================================================
--- trunk/libnet-sip-perl/lib/Net/SIP/Simple.pm (original)
+++ trunk/libnet-sip-perl/lib/Net/SIP/Simple.pm Sun Jan 31 01:41:18 2010
@@ -32,6 +32,7 @@
 use Net::SIP::Dispatcher;
 use Net::SIP::Dispatcher::Eventloop;
 use Net::SIP::Endpoint;
+use Net::SIP::Redirect;
 use Net::SIP::Registrar;
 use Net::SIP::StatelessProxy;
 use Net::SIP::Authorize;




More information about the Pkg-perl-cvs-commits mailing list