Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
slapos
Commits
1ca6cd94
Commit
1ca6cd94
authored
May 26, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
siptester instantiation recipe.
parent
7a2f0ca1
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
204 additions
and
0 deletions
+204
-0
slapos/slapos.recipe.siptester/CHANGES.txt
slapos/slapos.recipe.siptester/CHANGES.txt
+18
-0
slapos/slapos.recipe.siptester/MANIFEST.in
slapos/slapos.recipe.siptester/MANIFEST.in
+4
-0
slapos/slapos.recipe.siptester/README.txt
slapos/slapos.recipe.siptester/README.txt
+2
-0
slapos/slapos.recipe.siptester/setup.cfg
slapos/slapos.recipe.siptester/setup.cfg
+3
-0
slapos/slapos.recipe.siptester/setup.py
slapos/slapos.recipe.siptester/setup.py
+38
-0
slapos/slapos.recipe.siptester/src/slapos/__init__.py
slapos/slapos.recipe.siptester/src/slapos/__init__.py
+6
-0
slapos/slapos.recipe.siptester/src/slapos/recipe/__init__.py
slapos/slapos.recipe.siptester/src/slapos/recipe/__init__.py
+6
-0
slapos/slapos.recipe.siptester/src/slapos/recipe/siptester/__init__.py
....recipe.siptester/src/slapos/recipe/siptester/__init__.py
+51
-0
slapos/slapos.recipe.siptester/src/slapos/recipe/siptester/template/init_caller.in
...ester/src/slapos/recipe/siptester/template/init_caller.in
+4
-0
slapos/slapos.recipe.siptester/src/slapos/recipe/siptester/template/init_receiver.in
...ter/src/slapos/recipe/siptester/template/init_receiver.in
+4
-0
slapos/slapos.recipe.siptester/src/slapos/recipe/siptester/template/pjsua_caller.conf.in
...src/slapos/recipe/siptester/template/pjsua_caller.conf.in
+33
-0
slapos/slapos.recipe.siptester/src/slapos/recipe/siptester/template/pjsua_receiver.conf.in
...c/slapos/recipe/siptester/template/pjsua_receiver.conf.in
+35
-0
No files found.
slapos/slapos.recipe.siptester/CHANGES.txt
0 → 100644
View file @
1ca6cd94
Changelog
=========
0.0.3 (2010-10-13)
----------------
- Use slapos.librecipe to simplify the recipe
0.0.2 (2010-10-13)
----------------
- Change erp5.recipe.siptesterinstance namespace to slapos.recipe.siptester
0.0.1 (2010-09-02)
----------------
- Initial version
[Romain Courteaud]
slapos/slapos.recipe.siptester/MANIFEST.in
0 → 100644
View file @
1ca6cd94
recursive-include src/erp5/recipe/siptesterinstance *.in
include README.txt
include CHANGES.txt
slapos/slapos.recipe.siptester/README.txt
0 → 100644
View file @
1ca6cd94
Introduction
============
slapos/slapos.recipe.siptester/setup.cfg
0 → 100644
View file @
1ca6cd94
[egg_info]
tag_build = .dev
tag_svn_revision = 1
slapos/slapos.recipe.siptester/setup.py
0 → 100644
View file @
1ca6cd94
from
setuptools
import
setup
,
find_packages
import
os
name
=
"slapos.recipe.siptester"
version
=
'0.0.25'
def
read
(
*
rnames
):
return
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
*
rnames
)).
read
()
long_description
=
(
read
(
'README.txt'
)
+
'
\
n
'
+
read
(
'CHANGES.txt'
)
)
setup
(
name
=
name
,
version
=
version
,
author
=
'Romain Courteaud'
,
author_email
=
'romain@nexedi.com'
,
description
=
"zc.buildout recipe that instanciate a siptester"
,
long_description
=
long_description
,
license
=
"GPL2"
,
keywords
=
"siptester buildout"
,
classifiers
=
[
"Framework :: Buildout :: Recipe"
,
],
package_dir
=
{
''
:
'src'
},
packages
=
find_packages
(
'src'
),
namespace_packages
=
[
'slapos'
,
'slapos.recipe'
],
include_package_data
=
True
,
install_requires
=
[
'setuptools'
,
'slapos.lib.recipe'
],
entry_points
=
{
'zc.buildout'
:
[
'default = %s:CallerRecipe'
%
name
,
'caller = %s:CallerRecipe'
%
name
,
'receiver = %s:ReceiverRecipe'
%
name
,
]},
)
slapos/slapos.recipe.siptester/src/slapos/__init__.py
0 → 100644
View file @
1ca6cd94
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try
:
__import__
(
'pkg_resources'
).
declare_namespace
(
__name__
)
except
ImportError
:
from
pkgutil
import
extend_path
__path__
=
extend_path
(
__path__
,
__name__
)
slapos/slapos.recipe.siptester/src/slapos/recipe/__init__.py
0 → 100644
View file @
1ca6cd94
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try
:
__import__
(
'pkg_resources'
).
declare_namespace
(
__name__
)
except
ImportError
:
from
pkgutil
import
extend_path
__path__
=
extend_path
(
__path__
,
__name__
)
slapos/slapos.recipe.siptester/src/slapos/recipe/siptester/__init__.py
0 → 100644
View file @
1ca6cd94
import
os
import
pkg_resources
from
slapos.lib.recipe.BaseSlapRecipe
import
BaseSlapRecipe
class
SipTesterRecipe
(
BaseSlapRecipe
):
def
__init__
(
self
,
buildout
,
name
,
options
):
BaseSlapRecipe
.
__init__
(
self
,
buildout
,
name
,
options
)
self
.
pjsua_configuration_file
=
os
.
path
.
join
(
self
.
etc_directory
,
'pjsua.conf'
)
def
_createPJSUAConfiguration
(
self
,
template_name
):
pjsua_input
=
pkg_resources
.
resource_string
(
__name__
,
os
.
path
.
join
(
'template'
,
template_name
))
if
self
.
_writeFile
(
self
.
pjsua_configuration_file
,
pjsua_input
%
self
.
options
):
# XXX: How to inform slap/slapgrid that something changed and it might
# be not bad idea to restart CP?
pass
return
self
.
pjsua_configuration_file
def
_install
(
self
):
path
=
self
.
_createPJSUAConfiguration
(
self
.
config_template
)
d
=
{}
d
.
update
(
self
.
options
)
d
[
'pjsua_configuration_file'
]
=
self
.
pjsua_configuration_file
# XXX Hardcoded path
d
[
'pjsua_binary'
]
=
os
.
path
.
join
(
self
.
buildout
[
'software_definition'
][
'software_home'
].
strip
(),
'parts'
,
'pjproject-1.7'
,
'bin'
,
'pjsua'
)
d
[
'siptester_binary'
]
=
os
.
path
.
join
(
self
.
buildout
[
'software_definition'
][
'software_home'
].
strip
(),
'bin'
,
'siptester'
)
self
.
running_wrapper_location
=
pkg_resources
.
resource_filename
(
__name__
,
os
.
path
.
join
(
'template'
,
self
.
wrapper_template
))
self
.
_createRunningWrapper
(
d
)
return
[
path
,
wrapper_path
]
update
=
install
class
ReceiverRecipe
(
SipTesterRecipe
):
config_template
=
"pjsua_receiver.conf.in"
wrapper_template
=
"init_receiver.in"
class
CallerRecipe
(
SipTesterRecipe
):
config_template
=
"pjsua_caller.conf.in"
wrapper_template
=
"init_caller.in"
def
_install
(
self
):
# First of all, ask for a sipreceiver
self
.
request
(
self
.
software_release_url
,
'sipreceiver'
)
return
SipTesterRecipe
.
_install
(
self
)
slapos/slapos.recipe.siptester/src/slapos/recipe/siptester/template/init_caller.in
0 → 100644
View file @
1ca6cd94
#!/bin/sh
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
exec
%
(
siptester_binary
)
s %
(
pjsua_binary
)
s %
(
pjsua_configuration_file
)
s %
(
caller_destination
)
s
slapos/slapos.recipe.siptester/src/slapos/recipe/siptester/template/init_receiver.in
0 → 100644
View file @
1ca6cd94
#!/bin/sh
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
exec
%
(
siptester_binary
)
s %
(
pjsua_binary
)
s %
(
pjsua_configuration_file
)
s
slapos/slapos.recipe.siptester/src/slapos/recipe/siptester/template/pjsua_caller.conf.in
0 → 100644
View file @
1ca6cd94
#
# Logging options:
#
--log-level 0
--app-log-level 0
#
# Account 0:
#
--id %(caller_id)s
--registrar %(caller_registrar)s
--realm %(caller_realm)s
--username %(caller_username)s
--password %(caller_password)s
--reg-timeout 300
#
# Network settings:
#
--local-port 5060
#
# Media settings:
#
--null-audio
--playback-lat 100
--rtp-port 4000
#
# User agent:
#
--max-calls 4
--duration 300
slapos/slapos.recipe.siptester/src/slapos/recipe/siptester/template/pjsua_receiver.conf.in
0 → 100644
View file @
1ca6cd94
#
# Logging options:
#
--log-level 0
--app-log-level 0
#
# Account 0:
#
--id %(receiver_id)s
--registrar %(receiver_registrar)s
--realm %(receiver_realm)s
--username %(receiver_username)s
--password %(receiver_password)s
--reg-timeout 300
#
# Network settings:
#
--local-port 5060
#
# Media settings:
#
--null-audio
--auto-play
--play-file %(wav_path)s
--playback-lat 100
--rtp-port 4000
#
# User agent:
#
--auto-answer 200
--max-calls 4
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment