[asterisk-dev] Change in testsuite[master]: Testsuite: New test for FAX via PJSIP T38 with authentication

2015-04-07 Thread Joshua Colp (Code Review)
Joshua Colp has submitted this change and it was merged.

Change subject: Testsuite: New test for FAX via PJSIP T38 with authentication
..


Testsuite: New test for FAX via PJSIP T38 with authentication

Add a test for PJSIP t38 with authentication based on normal t38 test
The test will start two instances of Asterisk. The first will originate
a PJSIP call with authentication to the second using an extension that
will run sendFax. The second will receive the call and direct it to an
extension that runs receiveFax. As the fax completes, user events are
issued to verify that the FAX completed successfully.

ASTERISK-24933
Reported by: Jonathan Rose
Change-Id: If37cf20857ae3c0b35e0637a0a2cb7e7d6226df6
---
A tests/fax/pjsip/t38_with_auth/configs/ast1/extensions.conf
A tests/fax/pjsip/t38_with_auth/configs/ast1/pjsip.conf
A tests/fax/pjsip/t38_with_auth/configs/ast2/extensions.conf
A tests/fax/pjsip/t38_with_auth/configs/ast2/pjsip.conf
A tests/fax/pjsip/t38_with_auth/run-test
A tests/fax/pjsip/t38_with_auth/send.tiff
A tests/fax/pjsip/t38_with_auth/test-config.yaml
M tests/fax/pjsip/tests.yaml
8 files changed, 188 insertions(+), 0 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, approved
  Ashley Sanders: Looks good to me, but someone else must approve
  Joshua Colp: Verified



diff --git a/tests/fax/pjsip/t38_with_auth/configs/ast1/extensions.conf 
b/tests/fax/pjsip/t38_with_auth/configs/ast1/extensions.conf
new file mode 100644
index 000..83e0d5b
--- /dev/null
+++ b/tests/fax/pjsip/t38_with_auth/configs/ast1/extensions.conf
@@ -0,0 +1,7 @@
+[sendfax]
+exten => 1234,1,noop
+ same => n,SendFax(${ASTDATADIR}/send.tiff)
+
+exten => h,1,noop
+ same => n,UserEvent(FaxStatus,operation: send,status: 
${FAXOPT(status)},statusstr: ${FAXOPT(statusstr)},error: ${FAXOPT(error)})
+
diff --git a/tests/fax/pjsip/t38_with_auth/configs/ast1/pjsip.conf 
b/tests/fax/pjsip/t38_with_auth/configs/ast1/pjsip.conf
new file mode 100644
index 000..3e34bb2
--- /dev/null
+++ b/tests/fax/pjsip/t38_with_auth/configs/ast1/pjsip.conf
@@ -0,0 +1,30 @@
+[local-transport]
+type=transport
+protocol=udp
+bind=127.0.0.1
+
+[endpoint-template](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+t38_udptl=yes
+context=receivefax
+media_address=127.0.0.1
+
+[ast1-t38]
+type=auth
+auth_type=userpass
+username=ast1-t38
+password=aaa
+
+[ast2-t38]
+type=auth
+auth_type=userpass
+username=ast2-t38
+password=bbb
+
+
+[ast2-t38](endpoint-template)
+from_user=ast1-t38
+auth=ast2-t38
+outbound_auth=ast1-t38
diff --git a/tests/fax/pjsip/t38_with_auth/configs/ast2/extensions.conf 
b/tests/fax/pjsip/t38_with_auth/configs/ast2/extensions.conf
new file mode 100644
index 000..8d5dc7f
--- /dev/null
+++ b/tests/fax/pjsip/t38_with_auth/configs/ast2/extensions.conf
@@ -0,0 +1,6 @@
+[receivefax]
+exten => 1234,1,noop
+ same => n,ReceiveFax(${ASTDATADIR}/receive.tiff)
+
+exten => h,1,noop
+ same => n,UserEvent(FaxStatus,operation: receive,status: 
${FAXOPT(status)},statusstr: ${FAXOPT(statusstr)},error: ${FAXOPT(error)})
diff --git a/tests/fax/pjsip/t38_with_auth/configs/ast2/pjsip.conf 
b/tests/fax/pjsip/t38_with_auth/configs/ast2/pjsip.conf
new file mode 100644
index 000..f8f4a92
--- /dev/null
+++ b/tests/fax/pjsip/t38_with_auth/configs/ast2/pjsip.conf
@@ -0,0 +1,29 @@
+[local-transport]
+type=transport
+protocol=udp
+bind=127.0.0.2
+
+[endpoint-template](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+t38_udptl=yes
+context=receivefax
+media_address=127.0.0.2
+
+[ast1-t38]
+type=auth
+auth_type=userpass
+username=ast1-t38
+password=aaa
+
+[ast2-t38]
+type=auth
+auth_type=userpass
+username=ast2-t38
+password=bbb
+
+[ast1-t38](endpoint-template)
+from_user=ast2-t38
+auth=ast1-t38
+outbound_auth=ast2-t38
diff --git a/tests/fax/pjsip/t38_with_auth/run-test 
b/tests/fax/pjsip/t38_with_auth/run-test
new file mode 100755
index 000..ba2238f
--- /dev/null
+++ b/tests/fax/pjsip/t38_with_auth/run-test
@@ -0,0 +1,92 @@
+#!/usr/bin/env python
+# vim: sw=3 et:
+'''
+Copyright (C) 2015, Digium, Inc.
+Matthew Nicholson 
+Jonathan Rose 
+
+This program is free software, distributed under the terms of
+the GNU General Public License Version 2.
+'''
+
+import sys
+import logging
+import os
+import shutil
+
+sys.path.append("lib/python")
+
+from twisted.internet import reactor
+from asterisk.test_case import TestCase
+
+LOGGER = logging.getLogger(__name__)
+
+
+class T38Test(TestCase):
+"""Test class for performing the test.
+
+Manages files, originates FAX call, and monitors a user event to verify
+that the fax completed successfully on the sender end of the call.
+"""
+
+def __init__(self):
+"""Create Asterisk instances and prepare files."""
+
+super(T38Test, self).__init__()
+self.reactor_timeout = 120
+self.create_asterisk(2)
+
+# copy the tiff file we are going to send to a good known location
+shu

[asterisk-dev] Change in testsuite[master]: Testsuite: New test for FAX via PJSIP T38 with authentication

2015-04-07 Thread Joshua Colp (Code Review)
Joshua Colp has posted comments on this change.

Change subject: Testsuite: New test for FAX via PJSIP T38 with authentication
..


Patch Set 4: Verified+1

-- 
To view, visit https://gerrit.asterisk.org/28
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If37cf20857ae3c0b35e0637a0a2cb7e7d6226df6
Gerrit-PatchSet: 4
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Jonathan Rose 
Gerrit-Reviewer: Ashley Sanders 
Gerrit-Reviewer: Jonathan Rose 
Gerrit-Reviewer: Joshua Colp 
Gerrit-Reviewer: Mark Michelson 
Gerrit-Reviewer: Matt Jordan 
Gerrit-HasComments: No

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev


[asterisk-dev] Change in testsuite[master]: Testsuite: New test for FAX via PJSIP T38 with authentication

2015-04-07 Thread Mark Michelson (Code Review)
Mark Michelson has posted comments on this change.

Change subject: Testsuite: New test for FAX via PJSIP T38 with authentication
..


Patch Set 4: Code-Review+2

-- 
To view, visit https://gerrit.asterisk.org/28
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If37cf20857ae3c0b35e0637a0a2cb7e7d6226df6
Gerrit-PatchSet: 4
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Jonathan Rose 
Gerrit-Reviewer: Ashley Sanders 
Gerrit-Reviewer: Jonathan Rose 
Gerrit-Reviewer: Mark Michelson 
Gerrit-Reviewer: Matt Jordan 
Gerrit-HasComments: No

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev


[asterisk-dev] Change in testsuite[master]: Testsuite: New test for FAX via PJSIP T38 with authentication

2015-04-06 Thread Ashley Sanders (Code Review)
Ashley Sanders has posted comments on this change.

Change subject: Testsuite: New test for FAX via PJSIP T38 with authentication
..


Patch Set 4: Code-Review+1

Looks good.

-- 
To view, visit https://gerrit.asterisk.org/28
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If37cf20857ae3c0b35e0637a0a2cb7e7d6226df6
Gerrit-PatchSet: 4
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Jonathan Rose 
Gerrit-Reviewer: Ashley Sanders 
Gerrit-Reviewer: Jonathan Rose 
Gerrit-Reviewer: Matt Jordan 
Gerrit-HasComments: No

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev


[asterisk-dev] Change in testsuite[master]: Testsuite: New test for FAX via PJSIP T38 with authentication

2015-04-06 Thread Jonathan Rose (Code Review)
Jonathan Rose has uploaded a new patch set (#4).

Change subject: Testsuite: New test for FAX via PJSIP T38 with authentication
..

Testsuite: New test for FAX via PJSIP T38 with authentication

Add a test for PJSIP t38 with authentication based on normal t38 test
The test will start two instances of Asterisk. The first will originate
a PJSIP call with authentication to the second using an extension that
will run sendFax. The second will receive the call and direct it to an
extension that runs receiveFax. As the fax completes, user events are
issued to verify that the FAX completed successfully.

ASTERISK-24933
Reported by: Jonathan Rose
Change-Id: If37cf20857ae3c0b35e0637a0a2cb7e7d6226df6
---
A tests/fax/pjsip/t38_with_auth/configs/ast1/extensions.conf
A tests/fax/pjsip/t38_with_auth/configs/ast1/pjsip.conf
A tests/fax/pjsip/t38_with_auth/configs/ast2/extensions.conf
A tests/fax/pjsip/t38_with_auth/configs/ast2/pjsip.conf
A tests/fax/pjsip/t38_with_auth/run-test
A tests/fax/pjsip/t38_with_auth/send.tiff
A tests/fax/pjsip/t38_with_auth/test-config.yaml
M tests/fax/pjsip/tests.yaml
8 files changed, 188 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/28/28/4
-- 
To view, visit https://gerrit.asterisk.org/28
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If37cf20857ae3c0b35e0637a0a2cb7e7d6226df6
Gerrit-PatchSet: 4
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Jonathan Rose 
Gerrit-Reviewer: Ashley Sanders 
Gerrit-Reviewer: Jonathan Rose 
Gerrit-Reviewer: Matt Jordan 

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev


[asterisk-dev] Change in testsuite[master]: Testsuite: New test for FAX via PJSIP T38 with authentication

2015-04-06 Thread Ashley Sanders (Code Review)
Ashley Sanders has posted comments on this change.

Change subject: Testsuite: New test for FAX via PJSIP T38 with authentication
..


Patch Set 3:

(4 comments)

I just found a few minor issues regarding docstrings, but everything else looks 
good.

https://gerrit.asterisk.org/#/c/28/3/tests/fax/pjsip/t38_with_auth/run-test
File tests/fax/pjsip/t38_with_auth/run-test:

Line 33: """
>From the PEP8 documentation 
>(https://www.python.org/dev/peps/pep-0008/#documentation-strings): 
"For one liner docstrings, please keep the closing """ on the same line."


Line 59: """Verify FAX test results from user events
Same here as on lines 32-33.


Line 76: def run(self):
The method is missing its docstring.


Line 81: def main():
This method is also missing its docstring.


-- 
To view, visit https://gerrit.asterisk.org/28
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If37cf20857ae3c0b35e0637a0a2cb7e7d6226df6
Gerrit-PatchSet: 3
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Jonathan Rose 
Gerrit-Reviewer: Ashley Sanders 
Gerrit-Reviewer: Jonathan Rose 
Gerrit-Reviewer: Matt Jordan 
Gerrit-HasComments: Yes

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev


[asterisk-dev] Change in testsuite[master]: Testsuite: New test for FAX via PJSIP T38 with authentication

2015-04-06 Thread Jonathan Rose (Code Review)
Jonathan Rose has uploaded a new patch set (#3).

Change subject: Testsuite: New test for FAX via PJSIP T38 with authentication
..

Testsuite: New test for FAX via PJSIP T38 with authentication

Add a test for PJSIP t38 with authentication based on normal t38 test
The test will start two instances of Asterisk. The first will originate
a PJSIP call with authentication to the second using an extension that
will run sendFax. The second will receive the call and direct it to an
extension that runs receiveFax. As the fax completes, user events are
issued to verify that the FAX completed successfully.

ASTERISK-24933
Reported by: Jonathan Rose
Change-Id: If37cf20857ae3c0b35e0637a0a2cb7e7d6226df6
---
A tests/fax/pjsip/t38_with_auth/configs/ast1/extensions.conf
A tests/fax/pjsip/t38_with_auth/configs/ast1/pjsip.conf
A tests/fax/pjsip/t38_with_auth/configs/ast2/extensions.conf
A tests/fax/pjsip/t38_with_auth/configs/ast2/pjsip.conf
A tests/fax/pjsip/t38_with_auth/run-test
A tests/fax/pjsip/t38_with_auth/send.tiff
A tests/fax/pjsip/t38_with_auth/test-config.yaml
M tests/fax/pjsip/tests.yaml
8 files changed, 188 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/28/28/3
-- 
To view, visit https://gerrit.asterisk.org/28
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If37cf20857ae3c0b35e0637a0a2cb7e7d6226df6
Gerrit-PatchSet: 3
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Jonathan Rose 
Gerrit-Reviewer: Matt Jordan 

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev