--- py-asterisk-0.4.orig/debian/docs
+++ py-asterisk-0.4/debian/docs
@@ -0,0 +1,4 @@
+doc/asterisk-events.txt
+doc/event-handling.txt
+doc/readme.txt
+doc/todo.txt
--- py-asterisk-0.4.orig/debian/watch
+++ py-asterisk-0.4/debian/watch
@@ -0,0 +1,6 @@
+version=3
+
+opts=\
+downloadurlmangle=s|.*[?]name=(.*?)&.*|http://py-asterisk.googlecode.com/files/$1|,\
+filenamemangle=s|[^/]+[?]name=(.*?)&.*|$1| \
+http://code.google.com/p/py-asterisk/downloads/detail[?]name=py-asterisk-([0-9.]+).tar.bz2&.* debian svn-upgrade
--- py-asterisk-0.4.orig/debian/compat
+++ py-asterisk-0.4/debian/compat
@@ -0,0 +1 @@
+5
--- py-asterisk-0.4.orig/debian/copyright
+++ py-asterisk-0.4/debian/copyright
@@ -0,0 +1,43 @@
+This package was debianized by Julien BLACHE <jblache@debian.org> on
+Thu, 12 Apr 2007 17:36:57 +0200.
+
+It was downloaded from: http://py-asterisk.berlios.de/py-asterisk.php
+
+Upstream Author: David M. Wilson <dw-py-Asterisk-setup.py@botanicus.net>
+
+Copyright: Copyright (C) 2004 David M. Wilson.
+
+License:
+
+The py-Asterisk License
+-----------------------
+
+This is the MIT license with the trailing paragraph reformatted for
+readability. If this license is not compatible with your usage of the
+software, please do not hesitate to contact me as the situation is easy to
+resolve.
+
+
+    Copyright 2004, David M. Wilson.
+
+    Permission is hereby granted, free of charge, to any person obtaining a
+    copy of this software and associated documentation files (the "Software"),
+    to deal in the Software without restriction, including without limitation
+    the rights to use, copy, modify, merge, publish, distribute, sublicense,
+    and/or sell copies of the Software, and to permit persons to whom the
+    Software is furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included in
+    all copies or substantial portions of the Software.
+
+    The software is provided "as is", without warranty of any kind, express or
+    implied, including but not limited to the warranties of merchantability,
+    fitness for a particular purpose and non-infringement. In no event shall
+    the authors or copyright holders be liable for any claim, damages or other
+    liability, whether in an action of contract, tort or otherwise, arising
+    from, out of or in connection with the software or the use or other
+    dealings in the software.
+
+
+The Debian packaging is (C) 2007, Julien BLACHE <jblache@debian.org> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
--- py-asterisk-0.4.orig/debian/changelog
+++ py-asterisk-0.4/debian/changelog
@@ -0,0 +1,92 @@
+py-asterisk (0.4-1.5.201403111936) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. No patches were applied to the original source package
+
+ -- Univention builddaemon <buildd@univention.de>  Tue, 11 Mar 2014 19:36:03 +0100
+
+py-asterisk (0.4-1) unstable; urgency=low
+
+  * New upstream release
+    - Fixes "readme.txt: asynchronous usage is misleading" (Closes: #656137)
+
+ -- Mark Purcell <msp@debian.org>  Mon, 11 Jun 2012 13:56:41 +1000
+
+py-asterisk (0.3-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Mark Purcell <msp@debian.org>  Mon, 11 Jun 2012 13:39:50 +1000
+
+py-asterisk (0.2-1) unstable; urgency=low
+
+  * lca2012 release
+
+  * New upstream release
+    - Fixes "Please package version 0.2" (Closes: #656440)
+    - Fixes "fails to work with current version of Asterisk" (Closes: #650245)
+    - Fixes "fails to detect the configuration in $HOME" (Closes: #559236)
+
+  [ Julien BLACHE ]
+  * Acknowledge NMU (closes: #559237).
+  * Remove myself from Uploaders.
+
+  [ Tzafrir Cohen ]
+  * New upstream release.
+  * Add myself to Uploaders.
+  * get-orig-source target. 
+
+  [ Mark Purcell ]
+  * Update debian/watch -> code.google.com
+  * Updated Homepage:
+  * Add myself to Uploaders
+
+ -- Mark Purcell <msp@debian.org>  Fri, 20 Jan 2012 12:43:13 +1100
+
+py-asterisk (0.1a3+r160-4.1) unstable; urgency=low
+
+  * Non-maintainer upload, for the upcoming Python 2.6 transition
+  * debian/rules
+    - optionally include python.mk and add ${py_setup_install_args} to setup.py
+      install; thanks to Bernd Zeimetz for the report and to Luca Falavigna
+      for the patch (uploaded in Ubuntu); Closes: #559237
+
+ -- Sandro Tosi <morph@debian.org>  Thu, 10 Dec 2009 23:18:05 +0100
+
+py-asterisk (0.1a3+r160-4) unstable; urgency=low
+
+  * debian/control:
+    + Bump Standards-Version to 3.7.3 (no changes).
+    + Add Section: python field to python-asterisk.
+  * debian/rules:
+    + python-asterisk is arch: all and there are no arch-dep packages; move
+      code from binary-arch to binary-indep.
+
+ -- Julien BLACHE <jblache@debian.org>  Sat, 01 Mar 2008 16:47:52 +0100
+
+py-asterisk (0.1a3+r160-3) unstable; urgency=low
+
+  [ Julien BLACHE ]
+  * debian/rules:
+    + Do not ignore errors during clean.
+  * debian/control:
+    + Add missing python-all-dev build-dependency.
+
+  [ Faidon Liambotis ]
+  * debian/control:
+    + Add XS-Vcs-Svn and XS-Vcs-Browser.
+
+ -- Julien BLACHE <jblache@debian.org>  Sun, 05 Aug 2007 19:20:00 +0200
+
+py-asterisk (0.1a3+r160-2) unstable; urgency=low
+
+  * debian/control:
+    + Make python-asterisk an Arch: all package.
+
+ -- Julien BLACHE <jblache@debian.org>  Mon, 23 Apr 2007 11:49:08 +0200
+
+py-asterisk (0.1a3+r160-1) unstable; urgency=low
+
+  * Initial release (closes: #420564).
+
+ -- Julien BLACHE <jblache@debian.org>  Mon, 23 Apr 2007 11:40:47 +0200
+
--- py-asterisk-0.4.orig/debian/control
+++ py-asterisk-0.4/debian/control
@@ -0,0 +1,35 @@
+Source: py-asterisk
+Section: comm
+Priority: extra
+Maintainer: Debian VoIP Maintainers <pkg-voip-maintainers@lists.alioth.debian.org>
+Uploaders: Mark Purcell <msp@debian.org>, Tzafrir Cohen <tzafrir.cohen@xorcom.com>
+Build-Depends: debhelper (>= 5), dpatch, python-support (>= 0.4), python-all
+Standards-Version: 3.7.3
+Homepage: http://code.google.com/p/py-asterisk/
+Vcs-Svn: svn://svn.debian.org/pkg-voip/py-asterisk/trunk/
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-voip/py-asterisk/?op=log
+
+Package: python-asterisk
+Section: python
+Architecture: all
+Depends: ${python:Depends}, ${misc:Depends}
+Description: Asterisk Manager API interface module for Python
+ The Python Asterisk package (codenamed py-Asterisk) is an attempt to produce
+ high quality, well documented Python bindings for the Asterisk Manager API.
+ .
+ The eventual goal of the package is to allow rich specification of the
+ Asterisk configuration in Python rather than in the quirky, unstructured,
+ undocumented mess that we call the Asterisk configuration files.
+ .
+ Working Functionality
+ .
+  Python package implementing a manager client and event dispatcher.
+  User-oriented command line interface to manager API.
+ .
+ Work In Progress
+ .
+  Introductary documentation for developers.
+  Asterisk module allowing dialplan configuration via the manager AP
+ I (see my pbx_config_mgr page).
+  Objects to represent the standard applications, for specification of
+ dialplan configuration in a friendlier Python syntax.
--- py-asterisk-0.4.orig/debian/rules
+++ py-asterisk-0.4/debian/rules
@@ -0,0 +1,103 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# Include dpatch rules
+include /usr/share/dpatch/dpatch.make
+-include /usr/share/python/python.mk
+
+PACKAGE = py-asterisk
+DEBVERSION:=$(shell head -n 1 debian/changelog \
+		    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+DEB_BASE_VERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//')
+UPVERSION:=$(shell echo $(DEB_BASE_VERSION) | sed -e 's/~dfsg\(~\|$$\)/\1/' -e 's/~\(rc\|beta\)/-\1/')
+UPFILENAME := $(PACKAGE)_$(UPVERSION).orig.tar.bz2
+FILENAME := $(PACKAGE)_$(DEB_BASE_VERSION).orig.tar.gz
+URL := http://download.berlios.de/$(PACKAGE)/$(PACKAGE)-$(UPVERSION).tar.bz2
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Add here commands to configure the package.
+
+	touch configure-stamp
+
+
+build: build-stamp
+build-stamp: patch-stamp configure-stamp 
+	dh_testdir
+
+	python setup.py build
+
+	touch $@
+
+clean: real-clean unpatch
+real-clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	python setup.py clean
+	rm -rf build
+
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+
+	python setup.py install --root=$(CURDIR)/debian/python-asterisk ${py_setup_install_args}
+	mv $(CURDIR)/debian/python-asterisk/etc/asterisk/py-asterisk.conf.sample \
+		$(CURDIR)/debian/python-asterisk/etc/asterisk/py-asterisk.conf
+
+	mkdir -p $(CURDIR)/debian/python-asterisk/usr/share/doc/python-asterisk/examples
+	mv $(CURDIR)/debian/python-asterisk/usr/bin/* \
+		$(CURDIR)/debian/python-asterisk/usr/share/doc/python-asterisk/examples
+	rmdir $(CURDIR)/debian/python-asterisk/usr/bin
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir -i
+	dh_testroot -i
+	dh_installchangelogs -i
+	dh_installdocs -i
+	dh_installexamples -i
+#	dh_install -i
+	dh_installman -i
+	dh_pysupport -i
+	rm -rf $(CURDIR)/debian/python-asterisk/usr/lib
+	dh_link -i
+	dh_strip -i
+	dh_compress -i
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_shlibdeps -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+# Build architecture-dependent files here.
+binary-arch: build install
+# Nothing to do here, move along.
+
+print-version:
+	@@echo "Debian version:          $(DEBVERSION)"
+	@@echo "Upstream version:        $(UPVERSION)"
+
+get-orig-source:
+	@@dh_testdir
+	@@echo Downloading $(UPFILENAME) from $(URL) ...
+	@@wget  -nv -T10 -t3 --verbose -O $(UPFILENAME) $(URL)
+	@@bzcat $(UPFILENAME) | gzip -9 >$(FILENAME)
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch real-clean
--- py-asterisk-0.4.orig/debian/patches/path_join.dpatch
+++ py-asterisk-0.4/debian/patches/path_join.dpatch
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## path_join.dpatch by Bernd Zeimetz <bzed@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Remove a pointless '/', to fix #559236 .
+diff --git a/Asterisk/Config.py b/Asterisk/Config.py
+index aeb7dd0..af45d74 100644
+--- a/Asterisk/Config.py
++++ b/Asterisk/Config.py
+@@ -12,8 +12,8 @@ CONFIG_FILENAME = 'py-asterisk.conf'
+ 
+ CONFIG_PATHNAMES = [
+     os.environ.get('PYASTERISK_CONF', ''),
+-    os.path.join(os.environ.get('HOME', ''), '/.py-asterisk.conf'),
+-    os.path.join(os.environ.get('USERPROFILE', ''), '/py-asterisk.conf'),
++    os.path.join(os.environ.get('HOME', ''), '.py-asterisk.conf'),
++    os.path.join(os.environ.get('USERPROFILE', ''), 'py-asterisk.conf'),
+     'py-asterisk.conf',
+     '/etc/py-asterisk.conf',
+     '/etc/asterisk/py-asterisk.conf',
--- py-asterisk-0.4.orig/debian/patches/00list
+++ py-asterisk-0.4/debian/patches/00list
@@ -0,0 +1,3 @@
+10_remove_shebang
+#11_read_response
+#path_join
--- py-asterisk-0.4.orig/debian/patches/10_remove_shebang.dpatch
+++ py-asterisk-0.4/debian/patches/10_remove_shebang.dpatch
@@ -0,0 +1,16 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_remove_shebang.dpatch by  <jblache@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Remove useless shebang line in CLI.py
+
+@DPATCH@
+diff -urNad py-asterisk-0.1a3+r160~/Asterisk/CLI.py py-asterisk-0.1a3+r160/Asterisk/CLI.py
+--- py-asterisk-0.1a3+r160~/Asterisk/CLI.py	2007-04-23 11:34:23.000000000 +0200
++++ py-asterisk-0.1a3+r160/Asterisk/CLI.py	2007-04-23 11:35:10.746117697 +0200
+@@ -1,5 +1,3 @@
+-#!/usr/bin/env python
+-
+ '''
+ Asterisk/CLI.py: Command-line wrapper around the Asterisk Manager API.
+ '''
--- py-asterisk-0.4.orig/debian/patches/11_read_response.dpatch
+++ py-asterisk-0.4/debian/patches/11_read_response.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 11_read_response.dpatch by  <jblache@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Remove bogus line_nr == 1 check in _read_response_follows()
+
+@DPATCH@
+diff -urNad py-asterisk-0.1a3+r160~/Asterisk/Manager.py py-asterisk-0.1a3+r160/Asterisk/Manager.py
+--- py-asterisk-0.1a3+r160~/Asterisk/Manager.py	2007-04-23 11:34:10.000000000 +0200
++++ py-asterisk-0.1a3+r160/Asterisk/Manager.py	2007-04-23 11:35:41.309979769 +0200
+@@ -292,7 +292,7 @@
+             self.log.io('_read_response_follows: recv %r', line)
+             line_nr += 1
+ 
+-            if line_nr == 1 and line.startswith('ActionID: '):
++            if line.startswith('ActionID: '):
+                 # Asterisk is a pile of shite!!!!!!!!!
+                 packet.ActionID = line[10:]
+ 
