r54756 - in /trunk/libnet-sip-perl: Changes META.yml debian/changelog lib/Net/SIP.pm lib/Net/SIP/Endpoint.pm lib/Net/SIP/Endpoint/Context.pm

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Wed Mar 24 17:25:51 UTC 2010


Author: gregoa
Date: Wed Mar 24 17:25:37 2010
New Revision: 54756

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

Modified:
    trunk/libnet-sip-perl/Changes
    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/Endpoint.pm
    trunk/libnet-sip-perl/lib/Net/SIP/Endpoint/Context.pm

Modified: trunk/libnet-sip-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sip-perl/Changes?rev=54756&op=diff
==============================================================================
--- trunk/libnet-sip-perl/Changes (original)
+++ trunk/libnet-sip-perl/Changes Wed Mar 24 17:25:37 2010
@@ -1,4 +1,9 @@
 Revision history for Net::SIP
+
+0.57 2010-03-19
+- save remote_contact from successful responses in context and use
+  them as remote-URI in new requests. 
+  Thanks to <vitspec[AT]gmail[DOT]com> for pointing out the problem.
 
 0.56 2010-02-02
 - fix CANCEL handling: instead of closing the context immediatly:

Modified: trunk/libnet-sip-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sip-perl/META.yml?rev=54756&op=diff
==============================================================================
--- trunk/libnet-sip-perl/META.yml (original)
+++ trunk/libnet-sip-perl/META.yml Wed Mar 24 17:25:37 2010
@@ -1,21 +1,13 @@
 --- #YAML:1.0
-name:               Net-SIP
-version:            0.56
-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
+name:                Net-SIP
+version:             0.57
+abstract:            ~
+license:             ~
+author:              ~
+generated_by:        ExtUtils::MakeMaker version 6.42
+distribution_type:   module
+requires:     
+    Net::DNS:                      0.56
 meta-spec:
-    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
-    version:  1.4
+    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
+    version: 1.3

Modified: trunk/libnet-sip-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sip-perl/debian/changelog?rev=54756&op=diff
==============================================================================
--- trunk/libnet-sip-perl/debian/changelog (original)
+++ trunk/libnet-sip-perl/debian/changelog Wed Mar 24 17:25:37 2010
@@ -1,3 +1,9 @@
+libnet-sip-perl (0.57-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org>  Wed, 24 Mar 2010 18:25:08 +0100
+
 libnet-sip-perl (0.56-1) unstable; urgency=low
 
   * New upstream release

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=54756&op=diff
==============================================================================
--- trunk/libnet-sip-perl/lib/Net/SIP.pm (original)
+++ trunk/libnet-sip-perl/lib/Net/SIP.pm Wed Mar 24 17:25:37 2010
@@ -4,7 +4,7 @@
 require 5.008;
 
 package Net::SIP;
-our $VERSION = '0.56';
+our $VERSION = '0.57';
 
 # this includes nearly everything else
 use Net::SIP::Simple ();

Modified: trunk/libnet-sip-perl/lib/Net/SIP/Endpoint.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sip-perl/lib/Net/SIP/Endpoint.pm?rev=54756&op=diff
==============================================================================
--- trunk/libnet-sip-perl/lib/Net/SIP/Endpoint.pm (original)
+++ trunk/libnet-sip-perl/lib/Net/SIP/Endpoint.pm Wed Mar 24 17:25:37 2010
@@ -320,7 +320,7 @@
 			incoming => 1,
 			from => scalar( $request->get_header( 'from' )),
 			to   => scalar( $request->get_header( 'to' )),
-			contact => scalar( $request->get_header( 'contact' )),
+			remote_contact => scalar( $request->get_header( 'contact' )),
 			callid => scalar( $request->get_header( 'call-id' )),
 			via  => [ $request->get_header( 'via' ) ],
 		);

Modified: trunk/libnet-sip-perl/lib/Net/SIP/Endpoint/Context.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sip-perl/lib/Net/SIP/Endpoint/Context.pm?rev=54756&op=diff
==============================================================================
--- trunk/libnet-sip-perl/lib/Net/SIP/Endpoint/Context.pm (original)
+++ trunk/libnet-sip-perl/lib/Net/SIP/Endpoint/Context.pm Wed Mar 24 17:25:37 2010
@@ -17,7 +17,8 @@
 	'auth',    # [ user,pass ] or { realm1 => [ user1,pass1 ], realm2 => [ user2,pass2 ],... }
 			   # or callback(realm,user)->pass
 			   # if given, handle_response might automatically try to authorize requests
-	'contact', # optional contact
+	'contact', # optional local contact
+	'remote_contact', # remote contact from response
 	'callid',  # call-id value
 	'cseq',    # number in cseq header
 	'route',   # for 'route' header, comes usually from 'record-route' info in response
@@ -168,12 +169,10 @@
 
 		$method = uc($method);
 		my $uri = delete $args{uri};
-		my ($to,$from,$contact,$remote_contact) = $self->{incoming}
-			? ( $self->{from}, $self->{to},undef,$self->{contact} )
-			: ( $self->{to}, $self->{from},$self->{contact},undef )
-			;
+		my ($to,$from) = $self->{incoming} ? ($self->{from},$self->{to}) 
+			: ($self->{to},$self->{from});
 		if ( !$uri ) {
-			($uri) = sip_hdrval2parts( to => $remote_contact||$to);
+			($uri) = sip_hdrval2parts( to => $self->{remote_contact}||$to);
 			# XXX handle quotes right, e.g "<bla>" <sip:bla at fasel.com>
 			$uri = $1 if $uri =~m{<(\S+)>$};
 		}
@@ -187,7 +186,7 @@
 			{
 				from => $from,
 				to => $to,
-				$contact ? ( contact => $contact ):(),
+				$self->{contact} ? ( contact => $self->{contact} ):(),
 				route => $self->{route},
 				cseq => "$cseq $method",
 				'call-id' => $self->{callid},
@@ -358,6 +357,7 @@
 			# establishes the dialog
 			if ( my $contact = $response->get_header( 'contact' )) {
 				$contact = $1 if $contact =~m{<(\w+:[^>\s]+)>};
+				$self->{remote_contact} = $contact;
 				$req->set_uri( $contact );
 			}
 
@@ -406,6 +406,7 @@
 		# redo request and insert request again
 		my $contact = $self->{to} = $response->get_header( 'contact' );
 		$contact = $1 if $contact =~m{<(\w+:[^>\s]+)>};
+		$self->{remote_contact} = $contact;
 		( my $r = $tr->{request} )->set_uri( $contact );
 		$r->set_cseq( ++$self->{cseq} );
 		$endpoint->new_request( $r,$self );




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