Merge pull request #5 from Eyepea/master

Add AGI script example + README rename
develop
Randall Degges 2013-12-03 09:19:19 -08:00
commit 630fc7b102
3 changed files with 24 additions and 2 deletions

View File

View File

@ -0,0 +1,22 @@
#!/usr/bin/python
"""
Example to get and set variables via AGI.
You can call directly this script with AGI() in Asterisk dialplan.
"""
from asterisk.agi import *
agi = AGI()
agi.verbose("python agi started")
# Get variable environment
extension = agi.env['agi_extension']
# Get variable in dialplan
phone_exten = agi.get_variable('PHONE_EXTEN')
# Set variable, it will be available in dialplan
agi.set_variable('EXT_CALLERID', '1')

4
setup.py 100644 → 100755
View File

@ -6,7 +6,7 @@ from asterisk import __version__ as version
description = []
f = open('README')
f = open('README.rst')
logo_stripped = False
for line in f:
@ -26,7 +26,7 @@ setup(
author_email='kputland@users.sourceforge.net',
maintainer='Randall Degges',
maintainer_email='rdegges@gmail.com',
url='http://www.sourceforge.net/projects/pyst/',
url='https://github.com/rdegges/pyst2',
packages=['asterisk'],
license=', '.join(licenses),
platforms='Any',