Merge branch 'release/0.4'
commit
7493c64c9b
|
@ -1,3 +1,7 @@
|
||||||
|
2011-05-31 Randall Degges <rdegges@gmail.com
|
||||||
|
* BUGFIX: Fixing issue that prevented manager.status command from returning
|
||||||
|
proper output.
|
||||||
|
|
||||||
2007-01-26 Matthew Nicholson <mnicholson@digium.com>
|
2007-01-26 Matthew Nicholson <mnicholson@digium.com>
|
||||||
|
|
||||||
* asterisk/manager.py: Make get_header() functions work like
|
* asterisk/manager.py: Make get_header() functions work like
|
10
MANIFEST.in
10
MANIFEST.in
|
@ -1,11 +1,3 @@
|
||||||
include debian/watch
|
include CHANGELOG
|
||||||
include debian/rules
|
|
||||||
include debian/changelog
|
|
||||||
include debian/control
|
|
||||||
include debian/compat
|
|
||||||
include debian/copyright
|
|
||||||
include rpm/python-pyst.spec
|
|
||||||
include ChangeLog
|
|
||||||
include README
|
include README
|
||||||
include README.html
|
|
||||||
include MANIFEST.in
|
include MANIFEST.in
|
||||||
|
|
17
README
17
README
|
@ -1,9 +1,3 @@
|
||||||
.. image:: http://sflogo.sourceforge.net/sflogo.php?group_id=134329&type=7
|
|
||||||
:height: 62
|
|
||||||
:width: 210
|
|
||||||
:alt: SourceForge.net Logo
|
|
||||||
:target: http://sourceforge.net/projects/pyst/
|
|
||||||
|
|
||||||
pyst: A Python Interface to Asterisk
|
pyst: A Python Interface to Asterisk
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
|
@ -41,6 +35,17 @@ directly on the host where Asterisk is running. Since Asterisk doesn't
|
||||||
run on windows platforms (and probably never will) the agi part of the
|
run on windows platforms (and probably never will) the agi part of the
|
||||||
package can only be run on Asterisk platforms.
|
package can only be run on Asterisk platforms.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
This project has been forked because it was impossible for me to contact
|
||||||
|
the project maintainer (after several attempts), and I'd like to bring the
|
||||||
|
project up-to-date, fix bugs, and make it more usable overall.
|
||||||
|
|
||||||
|
My plans immediate plans include adding full documentation, re-writing some
|
||||||
|
of the core routines, adding a test suite, and accepting pull requests.
|
||||||
|
|
||||||
|
If you are one of the current maintainers, and would like to take over the
|
||||||
|
fork, please contact me: rdegges@gmail.com, so we can get that setup!
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
|
@ -11,4 +11,4 @@ manager - a module for interacting with the asterisk manager interface
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__all__ = ['agi', 'agitb', 'config', 'manager']
|
__all__ = ['agi', 'agitb', 'config', 'manager']
|
||||||
|
__version__ = '0.4'
|
||||||
|
|
|
@ -274,6 +274,7 @@ class Manager(object):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
multiline = False
|
multiline = False
|
||||||
|
status = False
|
||||||
wait_for_marker = False
|
wait_for_marker = False
|
||||||
eolcount = 0
|
eolcount = 0
|
||||||
# loop while we are sill running and connected
|
# loop while we are sill running and connected
|
||||||
|
@ -303,6 +304,11 @@ class Manager(object):
|
||||||
break
|
break
|
||||||
# ignore empty lines at start
|
# ignore empty lines at start
|
||||||
continue
|
continue
|
||||||
|
# If the user executed the status command, it's a special
|
||||||
|
# case, so we need to look for a marker.
|
||||||
|
if 'status will follow' in line:
|
||||||
|
status = True
|
||||||
|
wait_for_marker = True
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
# line not ending in \r\n or without ':' isn't a
|
# line not ending in \r\n or without ':' isn't a
|
||||||
# valid header and starts multiline response
|
# valid header and starts multiline response
|
||||||
|
@ -310,13 +316,17 @@ class Manager(object):
|
||||||
multiline = True
|
multiline = True
|
||||||
# Response: Follows indicates we should wait for end
|
# Response: Follows indicates we should wait for end
|
||||||
# marker --END COMMAND--
|
# marker --END COMMAND--
|
||||||
if not multiline and line.startswith('Response') and \
|
if not (multiline or status) and line.startswith('Response') and \
|
||||||
line.split(':', 1)[1].strip() == 'Follows':
|
line.split(':', 1)[1].strip() == 'Follows':
|
||||||
wait_for_marker = True
|
wait_for_marker = True
|
||||||
# same when seeing end of multiline response
|
# same when seeing end of multiline response
|
||||||
if multiline and line.startswith('--END COMMAND--'):
|
if multiline and line.startswith('--END COMMAND--'):
|
||||||
wait_for_marker = False
|
wait_for_marker = False
|
||||||
multiline = False
|
multiline = False
|
||||||
|
# same when seeing end of status response
|
||||||
|
if status and 'StatusComplete' in line:
|
||||||
|
wait_for_marker = False
|
||||||
|
status = False
|
||||||
if not self._connected.isSet():
|
if not self._connected.isSet():
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
pyst (0.2-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New release.
|
|
||||||
* Package updated to reflect new python policy.
|
|
||||||
|
|
||||||
-- Matthew Nicholson <mnicholson@digium.com> Tue, 19 Sep 2006 19:22:51 -0500
|
|
||||||
|
|
||||||
pyst (0.1.0-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New release.
|
|
||||||
|
|
||||||
-- Matthew Nicholson <mnicholson@digium.com> Mon, 5 Jun 2006 15:11:24 -0500
|
|
||||||
|
|
||||||
pyst (0.0.4rc13-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New release.
|
|
||||||
|
|
||||||
-- Matthew Nicholson <mnicholson@digium.com> Tue, 21 Mar 2006 12:25:03 -0600
|
|
||||||
|
|
||||||
pyst (0.0.4rc12-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New release.
|
|
||||||
|
|
||||||
-- Matthew Nicholson <mnicholson@digium.com> Thu, 14 Apr 2005 17:15:46 -0500
|
|
||||||
|
|
||||||
pyst (0.0.4rc11-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New release.
|
|
||||||
|
|
||||||
-- Matthew Nicholson <mnicholson@digium.com> Thu, 3 Feb 2005 18:46:32 -0600
|
|
||||||
|
|
||||||
pyst (0.0.4rc10-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* Bug fixes in config.py and more docs.
|
|
||||||
* Version number correction.
|
|
||||||
* Added line number tracking to config.py
|
|
||||||
|
|
||||||
-- Matthew Nicholson <mnicholson@digium.com> Tue, 11 Jan 2005 11:30:59 -0600
|
|
||||||
|
|
||||||
pyst (0.0.4rc9-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* Removed DEBUG flag
|
|
||||||
|
|
||||||
-- Matthew Nicholson <mnicholson@digium.com> Mon, 10 Jan 2005 18:40:04 -0600
|
|
||||||
|
|
||||||
pyst (0.0.4rc8-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* More manager.py updates
|
|
||||||
|
|
||||||
-- Matthew Nicholson <mnicholson@digium.com> Thu, 6 Jan 2005 12:19:42 -0600
|
|
||||||
|
|
||||||
pyst (0.0.4rc7-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* A bunch of fixes to make the manager interface useable
|
|
||||||
|
|
||||||
-- Matthew Nicholson <mnicholson@digium.com> Wed, 5 Jan 2005 19:02:38 -0600
|
|
||||||
|
|
||||||
pyst (0.0.4rc6-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* Initial Release.
|
|
||||||
|
|
||||||
-- Matthew Nicholson <mnicholson@digium.com> Mon, 29 Nov 2004 14:06:42 -0600
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
4
|
|
|
@ -1,21 +0,0 @@
|
||||||
Source: pyst
|
|
||||||
Section: python
|
|
||||||
Priority: optional
|
|
||||||
Maintainer: Matthew Nicholson <mnicholson@digium.com>
|
|
||||||
Build-Depends-Indep: debhelper (>= 5.0.37.2), cdbs (>= 0.4.43), python-all-dev (>= 2.3.5-11), python-support (>= 0.3)
|
|
||||||
Standards-Version: 3.6.1
|
|
||||||
|
|
||||||
Package: python-pyst
|
|
||||||
Architecture: all
|
|
||||||
Depends: ${python:Depends}
|
|
||||||
Provides: ${python:Provides}
|
|
||||||
Replaces: python2.3-pyst (<< 0.2)
|
|
||||||
Conflicts: python2.3-pyst (<< 0.2)
|
|
||||||
XB-Python-Version: ${python:Versions}
|
|
||||||
Suggests: asterisk
|
|
||||||
Description: Python module for interacting with the Asterisk PBX (dummy)
|
|
||||||
Pyst is a python module for interacting with the asterisk pbx through
|
|
||||||
the manager interface and agi interface. This package also includes
|
|
||||||
debugging tools such as the agitb module, and tools to parse asterisk
|
|
||||||
config files.
|
|
||||||
|
|
|
@ -1,79 +0,0 @@
|
||||||
This package was debianized by Matthew Nicholson <mnicholson@digium.com> on
|
|
||||||
Mon, 29 Nov 2004 14:06:42 -0600.
|
|
||||||
|
|
||||||
It was downloaded from http://ftp1.sourceforge.net/pyst/pyst-0.0.4.tar.gz
|
|
||||||
|
|
||||||
Copyright (C) 2004 Karl Putland
|
|
||||||
|
|
||||||
Upstream Author: Karl Putland <kputland@users.sourceforge.net>
|
|
||||||
|
|
||||||
License:
|
|
||||||
|
|
||||||
Most of pyst is licensed under the terms of the GNU LGPL.
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
The agitb.py modules is licensed under the terms of the Python Software
|
|
||||||
Foundation License:
|
|
||||||
|
|
||||||
PSF LICENSE AGREEMENT FOR PYTHON 2.3
|
|
||||||
------------------------------------
|
|
||||||
|
|
||||||
1. This LICENSE AGREEMENT is between the Python Software Foundation
|
|
||||||
("PSF"), and the Individual or Organization ("Licensee") accessing and
|
|
||||||
otherwise using Python 2.3 software in source or binary form and its
|
|
||||||
associated documentation.
|
|
||||||
|
|
||||||
2. Subject to the terms and conditions of this License Agreement, PSF
|
|
||||||
hereby grants Licensee a nonexclusive, royalty-free, world-wide
|
|
||||||
license to reproduce, analyze, test, perform and/or display publicly,
|
|
||||||
prepare derivative works, distribute, and otherwise use Python 2.3
|
|
||||||
alone or in any derivative version, provided, however, that PSF's
|
|
||||||
License Agreement and PSF's notice of copyright, i.e., "Copyright (c)
|
|
||||||
2001, 2002 Python Software Foundation; All Rights Reserved" are
|
|
||||||
retained in Python 2.3 alone or in any derivative version prepared by
|
|
||||||
Licensee.
|
|
||||||
|
|
||||||
3. In the event Licensee prepares a derivative work that is based on
|
|
||||||
or incorporates Python 2.3 or any part thereof, and wants to make
|
|
||||||
the derivative work available to others as provided herein, then
|
|
||||||
Licensee hereby agrees to include in any such work a brief summary of
|
|
||||||
the changes made to Python 2.3.
|
|
||||||
|
|
||||||
4. PSF is making Python 2.3 available to Licensee on an "AS IS"
|
|
||||||
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
||||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
|
|
||||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
|
||||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.3 WILL NOT
|
|
||||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
|
||||||
|
|
||||||
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
|
||||||
2.3 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
|
||||||
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.3,
|
|
||||||
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
|
||||||
|
|
||||||
6. This License Agreement will automatically terminate upon a material
|
|
||||||
breach of its terms and conditions.
|
|
||||||
|
|
||||||
7. Nothing in this License Agreement shall be deemed to create any
|
|
||||||
relationship of agency, partnership, or joint venture between PSF and
|
|
||||||
Licensee. This License Agreement does not grant permission to use PSF
|
|
||||||
trademarks or trade name in a trademark sense to endorse or promote
|
|
||||||
products or services of Licensee, or any third party.
|
|
||||||
|
|
||||||
8. By copying, installing or otherwise using Python 2.3, Licensee
|
|
||||||
agrees to be bound by the terms and conditions of this License
|
|
||||||
Agreement.
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
#!/usr/bin/make -f
|
|
||||||
|
|
||||||
# Uncomment this to turn on verbose mode.
|
|
||||||
#export DH_VERBOSE=1
|
|
||||||
|
|
||||||
DEB_PYTHON_SYSTEM=pysupport
|
|
||||||
|
|
||||||
include /usr/share/cdbs/1/rules/debhelper.mk
|
|
||||||
include /usr/share/cdbs/1/class/python-distutils.mk
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
# Site Directory Pattern Version Script
|
|
||||||
version=2
|
|
||||||
http://ftp1.sourceforge.net/pyst/pyst-(.*)\.tar\.gz debian uupdate
|
|
|
@ -1,48 +0,0 @@
|
||||||
Summary: An interface to AGI
|
|
||||||
Name: python-pyst
|
|
||||||
Version: 0.0.5
|
|
||||||
Release: 2.centos4.0
|
|
||||||
Source0: http://prdownloads.sourceforge.net/pyst/pyst-%{version}.tar.gz
|
|
||||||
License: LGPL
|
|
||||||
Group: Development/Libraries
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-buildroot
|
|
||||||
URL: http://sourceforge.net/projects/pyst
|
|
||||||
Requires: python
|
|
||||||
BuildRequires: python-devel
|
|
||||||
BuildRequires: python Distutils
|
|
||||||
|
|
||||||
%description
|
|
||||||
Pyst consists of a set of interfaces and libraries to allow
|
|
||||||
programming of Asterisk from python. The library currently
|
|
||||||
supports AGI, AMI, and the parsing of Asterisk configuration
|
|
||||||
files. The library also includes debugging facilities for AGI.
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q -n pyst-%{version}
|
|
||||||
|
|
||||||
%build
|
|
||||||
CFLAGS="$RPM_OPT_FLAGS" python setup.py build
|
|
||||||
|
|
||||||
%install
|
|
||||||
python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/python-pyst
|
|
||||||
cp debian/copyright $RPM_BUILD_ROOT/usr/share/doc/python-pyst
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
%files -f INSTALLED_FILES
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc /usr/share/doc/python-pyst/*
|
|
||||||
%{_libdir}/python*/site-packages/asterisk/
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Tue Mar 21 2006 Matthew Nicholson <mnicholson@digium.com> el4.3
|
|
||||||
- Bumped version number.
|
|
||||||
|
|
||||||
* Thu Feb 23 2006 Antoine Brenner <http://www.gymglish.com> el4.2
|
|
||||||
- Fixed source0 line
|
|
||||||
|
|
||||||
* Tue Feb 9 2006 Antoine Brenner <http://www.gymglish.com> el4.1
|
|
||||||
- Initial Package
|
|
||||||
|
|
14
setup.py
14
setup.py
|
@ -2,10 +2,8 @@
|
||||||
|
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
|
||||||
try :
|
from asterisk import __version__ as version
|
||||||
from asterisk.Version import VERSION
|
|
||||||
except :
|
|
||||||
VERSION = None
|
|
||||||
|
|
||||||
description = []
|
description = []
|
||||||
f = open ('README')
|
f = open ('README')
|
||||||
|
@ -22,14 +20,14 @@ licenses = ( 'Python Software Foundation License'
|
||||||
|
|
||||||
|
|
||||||
setup \
|
setup \
|
||||||
( name = 'pyst'
|
( name = 'pyst2'
|
||||||
, version = VERSION
|
, version = version
|
||||||
, description = 'A Python Interface to Asterisk'
|
, description = 'A Python Interface to Asterisk'
|
||||||
, long_description = ''.join (description)
|
, long_description = ''.join (description)
|
||||||
, author = 'Karl Putland'
|
, author = 'Karl Putland'
|
||||||
, author_email = 'kputland@users.sourceforge.net'
|
, author_email = 'kputland@users.sourceforge.net'
|
||||||
, maintainer = 'Ralf Schlatterbeck'
|
, maintainer = 'Randall Degges'
|
||||||
, maintainer_email = 'rsc@runtux.com'
|
, maintainer_email = 'rdegges@gmail.com'
|
||||||
, url = 'http://www.sourceforge.net/projects/pyst/'
|
, url = 'http://www.sourceforge.net/projects/pyst/'
|
||||||
, packages = ['asterisk']
|
, packages = ['asterisk']
|
||||||
, license = ', '.join (licenses)
|
, license = ', '.join (licenses)
|
||||||
|
|
Loading…
Reference in New Issue