- merge unreleased changed from repository of Matthew Nicholson
git-svn-id: https://pyst.svn.sourceforge.net/svnroot/pyst/pyst/trunk@17 01a3061f-1c3a-49da-a2a0-fa5697faa6a0develop
parent
b9bd2092c0
commit
b886c83df4
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
2007-01-26 Matthew Nicholson <mnicholson@digium.com>
|
||||
|
||||
* asterisk/manager.py: Make get_header() functions work like
|
||||
dict.get().
|
||||
* UPGRADE: Updated.
|
||||
|
||||
2007-01-16 Matthew Nicholson <mnicholson@digium.com>
|
||||
|
||||
* asterisk/manager.py: Fix support for Manager.command(). Patch from
|
||||
Karl Putland <karl@klasstek.com>.
|
||||
|
||||
2007-01-02 Matthew Nicholson <mnicholson@digium.com>
|
||||
|
||||
* asterisk/agi.py (AGI.set_autohangup): Fixed syntax error.
|
||||
|
||||
2006-11-28 Matthew Nicholson <mnicholson@digium.com>
|
||||
|
||||
* UPGRADE: Tweaked formatting.
|
||||
|
|
23
README
23
README
|
@ -95,19 +95,28 @@ Upgrading from older versions
|
|||
|
||||
If upgrading from...
|
||||
|
||||
* 0.2: Should work out of the box
|
||||
* 0.2:
|
||||
|
||||
- ``get_header()`` methods in ``manager.py`` now work like
|
||||
``dict.get()`` instead of ``dict[key]``
|
||||
|
||||
|
||||
* 0.1.0:
|
||||
|
||||
- agi.get_variable no longer throws an exception, instead it returns an
|
||||
empty string when a channel variable is not set.
|
||||
- manager.quit() has be renamed to manager.close()
|
||||
- ``agi.get_variable`` no longer throws an exception, instead it
|
||||
returns an empty string when a channel variable is not set.
|
||||
- ``manager.quit()`` has be renamed to ``manager.close()``
|
||||
|
||||
Changes
|
||||
-------
|
||||
|
||||
Version 0.3: Minor feature enhancements
|
||||
|
||||
New maintainer Ralf Schlatterbeck, this is my first release, please
|
||||
report any problems via the Sourceforge Bug-Tracker or email me
|
||||
directly. Thanks to Karl Putland for writing the original package.
|
||||
Thanks to Matthew Nicholson for maintaining the package for some years
|
||||
and for handing over maintenance when he was no longer interested.
|
||||
The parsing of answers from asterisk was completely rewritten. This
|
||||
should fix problems people were having with commands returning embedded
|
||||
'/' or empty lines. Some new manager commands added.
|
||||
|
@ -121,5 +130,11 @@ should fix problems people were having with commands returning embedded
|
|||
lines, e.g. ``mgr.command('dialplan show')``
|
||||
- Bug-fix for list manipulation in ``event_dispatch``, thanks to Jan
|
||||
Müller, see mailinglist comment from 2008-04-18
|
||||
- Merge unreleased changes from repository of Matthew Nicholson
|
||||
in particular a typo in ``agi.py`` for ``set_autohangup``, and change
|
||||
of ``get_header`` methods (see Upgrading instructions). The fixed
|
||||
``manager.command`` support is already in (with a different
|
||||
solution). The unreleased changes are also on the 0.2 branch in the
|
||||
subversion repository in case somebody is interested.
|
||||
|
||||
See the ChangeLog for older changes.
|
||||
|
|
|
@ -463,11 +463,11 @@ class AGI:
|
|||
|
||||
def set_autohangup(self, secs):
|
||||
"""agi.set_autohangup(secs) --> None
|
||||
Cause the channel to automatically hangup at <time> seconds in the
|
||||
Cause the channel to automatically hangup at <secs> seconds in the
|
||||
future. Of course it can be hungup before then as well. Setting to
|
||||
0 will cause the autohangup feature to be disabled on this channel.
|
||||
"""
|
||||
self.execute('SET AUTOHANGUP', time)
|
||||
self.execute('SET AUTOHANGUP', secs)
|
||||
|
||||
def hangup(self, channel=''):
|
||||
"""agi.hangup(channel='')
|
||||
|
|
|
@ -117,9 +117,9 @@ class ManagerMsg(object):
|
|||
"""Check for a header"""
|
||||
return self.headers.has_key(hname)
|
||||
|
||||
def get_header(self, hname):
|
||||
def get_header(self, hname, defval = None):
|
||||
"""Return the specfied header"""
|
||||
return self.headers[hname]
|
||||
return self.headers.get(hname, defval)
|
||||
|
||||
def __getitem__(self, hname):
|
||||
"""Return the specfied header"""
|
||||
|
@ -148,9 +148,9 @@ class Event(object):
|
|||
"""Check for a header"""
|
||||
return self.headers.has_key(hname)
|
||||
|
||||
def get_header(self, hname):
|
||||
def get_header(self, hname, defval = None):
|
||||
"""Return the specfied header"""
|
||||
return self.headers[hname]
|
||||
return self.headers.get(hname, defval)
|
||||
|
||||
def __getitem__(self, hname):
|
||||
"""Return the specfied header"""
|
||||
|
|
Loading…
Reference in New Issue