r30220 - in /branches/upstream/libnet-sip-perl/current: Changes META.yml lib/Net/SIP.pm lib/Net/SIP/StatelessProxy.pm lib/Net/SIP/StatelessProxy.pod

rmayorga at users.alioth.debian.org rmayorga at users.alioth.debian.org
Thu Jan 29 03:26:11 UTC 2009


Author: rmayorga
Date: Thu Jan 29 03:26:07 2009
New Revision: 30220

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=30220
Log:
[svn-upgrade] Integrating new upstream version, libnet-sip-perl (0.53)

Modified:
    branches/upstream/libnet-sip-perl/current/Changes
    branches/upstream/libnet-sip-perl/current/META.yml
    branches/upstream/libnet-sip-perl/current/lib/Net/SIP.pm
    branches/upstream/libnet-sip-perl/current/lib/Net/SIP/StatelessProxy.pm
    branches/upstream/libnet-sip-perl/current/lib/Net/SIP/StatelessProxy.pod

Modified: branches/upstream/libnet-sip-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-sip-perl/current/Changes?rev=30220&op=diff
==============================================================================
--- branches/upstream/libnet-sip-perl/current/Changes (original)
+++ branches/upstream/libnet-sip-perl/current/Changes Thu Jan 29 03:26:07 2009
@@ -1,5 +1,8 @@
 Revision history for Net::SIP
 
+0.53 2009-01-26
+- add Option force_rewrite to Net::SIP::StatelessProxy so that it rewrites
+  the contact even if incoming and outgoing legs are the same
 
 0.52 2008-12-17
 - removed changes from 0.47 - if 2xx response to INVITE contains

Modified: branches/upstream/libnet-sip-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-sip-perl/current/META.yml?rev=30220&op=diff
==============================================================================
--- branches/upstream/libnet-sip-perl/current/META.yml (original)
+++ branches/upstream/libnet-sip-perl/current/META.yml Thu Jan 29 03:26:07 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                Net-SIP
-version:             0.52
+version:             0.53
 abstract:            ~
 license:             ~
 author:              ~

Modified: branches/upstream/libnet-sip-perl/current/lib/Net/SIP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-sip-perl/current/lib/Net/SIP.pm?rev=30220&op=diff
==============================================================================
--- branches/upstream/libnet-sip-perl/current/lib/Net/SIP.pm (original)
+++ branches/upstream/libnet-sip-perl/current/lib/Net/SIP.pm Thu Jan 29 03:26:07 2009
@@ -4,7 +4,7 @@
 require 5.008;
 
 package Net::SIP;
-our $VERSION = '0.52';
+our $VERSION = '0.53';
 
 # this includes nearly everything else
 use Net::SIP::Simple ();

Modified: branches/upstream/libnet-sip-perl/current/lib/Net/SIP/StatelessProxy.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-sip-perl/current/lib/Net/SIP/StatelessProxy.pm?rev=30220&op=diff
==============================================================================
--- branches/upstream/libnet-sip-perl/current/lib/Net/SIP/StatelessProxy.pm (original)
+++ branches/upstream/libnet-sip-perl/current/lib/Net/SIP/StatelessProxy.pm Thu Jan 29 03:26:07 2009
@@ -9,7 +9,7 @@
 use warnings;
 
 package Net::SIP::StatelessProxy;
-use fields qw( dispatcher rewrite_contact nathelper );
+use fields qw( dispatcher rewrite_contact nathelper force_rewrite );
 
 use Net::SIP::Util ':all';
 use Digest::MD5 'md5_hex';
@@ -29,6 +29,8 @@
 #        should return undef. If not given a reasonable default will be
 #        used.
 #     nathelper: Net::SIP::NAT::Helper used for rewrite SDP bodies.. (optional)
+#     force_rewrite: if true rewrite contact even if incoming and outgoing
+#         legs are the same
 # Returns: $self
 ###########################################################################
 sub new {
@@ -40,6 +42,7 @@
 	$self->{rewrite_contact} = delete $args{rewrite_contact}
 		|| [ \&_default_rewrite_contact, $self ];
 	$self->{nathelper} = delete $args{nathelper};
+	$self->{force_rewrite} = delete $args{force_rewrite};
 
 	return $self;
 }
@@ -400,7 +403,7 @@
 
 	my $packet = $entry->{packet};
 	# rewrite contact header if outgoing leg is different to incoming leg
-	if ( $outgoing_leg != $incoming_leg and 
+	if ( ( $outgoing_leg != $incoming_leg or $self->{force_rewrite} ) and 
 		(my @contact = $packet->get_header( 'contact' ))) {
 
 		my $rewrite_contact = $self->{rewrite_contact};

Modified: branches/upstream/libnet-sip-perl/current/lib/Net/SIP/StatelessProxy.pod
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-sip-perl/current/lib/Net/SIP/StatelessProxy.pod?rev=30220&op=diff
==============================================================================
--- branches/upstream/libnet-sip-perl/current/lib/Net/SIP/StatelessProxy.pod (original)
+++ branches/upstream/libnet-sip-perl/current/lib/Net/SIP/StatelessProxy.pod Thu Jan 29 03:26:07 2009
@@ -26,7 +26,7 @@
 forwarding requests.
 
 Additionally it will rewrite the B<Contact> header while forwarding
-packets, e.g. if the B<Contact> header points to some client
+packets (see below), e.g. if the B<Contact> header points to some client
 it will rewrite it, so that it points to the proxy and if it
 already points to the proxy it will rewrite it back so that it again
 points to the client.
@@ -61,6 +61,12 @@
 it will rewrite the SDP bodies to use local sockets and the nathelper
 will transfer the RTP data between the local and the original
 sockets.
+
+=item force_rewrite
+
+Usually the contact header will only be rewritten, if the incoming and
+outgoing leg are different. With this option one can force the rewrite,
+even if they are the same.
 
 =back
 




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