Re: [asterisk-dev] running pjsip testsuite

2015-04-02 Thread Yaron Nachum
Hi everyone,
I ran the test manually. Just setup a single endpoint  and using AMI I
originanted a call to an extension which dials to another extension and
send DTMF sequence using SendDTMF application.

When I setup the endpoint with rfc4733 the dtmf is identified, but when I
setup the endpoint with inband it is not identified. Using rtp debug I see
that the rtp is sent and received.

I did the same scenario with regular sip channel and the same happened.

If anyone has a clue please get back to me.

I will try to make the test with sipp.

Yaron




On Wed, Apr 1, 2015 at 6:34 PM, Yaron Nachum  wrote:

> Hi Everyone,
> Sorry for all the questions.
>
> Well I managed to understand the 488 issue - I had to add some codec
> capabilities. Now the test works but only if I setup the dtmfmode to
> rfc4733. If I set it to inband it fails - the Read on the receiver side
> doesn't receive DTMF.
>
> The following is the scenario:
>
> testinfo:
> summary: 'Tests the PJSIP auto dtmf option'
> description: |
> 'Tests that dtmf settings is detected and setup according to the
> capabilities of the peer when auto dtmf is set'
>
> test-modules:
> test-object:
> config-section: test-object-config
> typename: 'test_case.SimpleTestCase'
> modules:
> -
> config-section: ami-config
> typename: 'ami.AMIEventModule'
>
>
> test-object-config:
> spawn-after-hangup: True
> test-iterations:
> -
> channel: 'PJSIP/dtmf_inband@dtmf_inband'
> context: 'default'
> exten: 'senddtmf'
> priority: '1'
>
> ami-config:
> -
> type: 'headermatch'
> conditions:
> match:
> Event: 'DTMFEnd'
> Channel: 'PJSIP/receiver-.*'
> Exten: 'receiver'
> requirements:
> match:
> Digit: '1'
> count: '1'
>
> properties:
> minversion: '13.4.0'
> dependencies:
> - python: 'twisted'
> - python: 'starpy'
> - asterisk: 'app_dial'
> - asterisk: 'app_echo'
> - asterisk: 'func_callerid'
> - asterisk: 'chan_pjsip'
> - asterisk: 'res_pjsip'
> - asterisk: 'res_pjsip_caller_id'
> - asterisk: 'res_pjsip_endpoint_identifier_user'
> - asterisk: 'res_pjsip_sdp_rtp'
> - asterisk: 'res_pjsip_session'
> tags:
> - pjsip
>
> 
>
> The following is the extensions.conf:
>
> [default]
> exten => senddtmf,1,NoOp(YARON Is HERE SENDDTMF
> dtmfmode=${PJSIP_ENDPOINT(dtmf_inband,dtmf_mode)})
> same => n,Dumpchan()
> ;same => n,SendDTMF(1)
> same => n,Wait(5)
> same => n,Hangup()
>
> exten => dtmf_inband,1,NoOp(YARON Is HERE DIAL)
> same => n,Dial(PJSIP/receiver@dtmf_inband)
> same => n,Hangup()
>
>
> exten => receiver,1,NoOp(YARON Is HERE RECEIVER dtmfmode =
> ${PJSIP_ENDPOINT(receiver,dtmf_mode)})
> same => n,Dumpchan()
> same => n,Answer()
> same => n,Read(var,,1,,1,4)
> same => n,NoOp(YARON Is HERE var=${var})
> same => n,Hangup()
>
>
-- 
_
-- 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]: Memory Debugging Improvements

2015-04-02 Thread Corey Farrell (Code Review)
Hello Ashley Sanders,

I'd like you to reexamine a change.  Please visit

https://gerrit.asterisk.org/15

to look at the new patch set (#4).

Change subject: Memory Debugging Improvements
..

Memory Debugging Improvements

* Enable XML output from valgrind.
* Display and save a summary of valgrind errors and leaks.
* Enable use of contrib/valgrind/suppressions.txt if it exists
  to suppress expected leaks or system library errors.  Added
  entry to .gitignore for this file.
* Supply a sample suppressions file that ignores some reachable
  memory.
* Create stdout_print for printing messages to the terminal and
  including in the failure message.
* Switch some failure notifications to use stdout_print() so the
  messages are included in asterisk-test-suite-report.xml.
* Create function for archiving a list of files from source folder
  to destination folder.  Switch all archive functions to use this.

Valgrind Summaries require the lxml module.  If this module is not
found summaries will not be produced, but valgrind XML output will
still be available in the Asterisk logs directory.

Change-Id: I21634673508a01eea1f489c751d3cf75ea55cf06
---
M .gitignore
M README.txt
A contrib/valgrind/summary-lines.xsl
A contrib/valgrind/suppressions-sample.txt
M lib/python/asterisk/asterisk.py
M runtests.py
6 files changed, 192 insertions(+), 47 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I21634673508a01eea1f489c751d3cf75ea55cf06
Gerrit-PatchSet: 4
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell 
Gerrit-Reviewer: Ashley Sanders 
Gerrit-Reviewer: Corey Farrell 
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


Re: [asterisk-dev] [Code Review] 4557: Tell menuselect that MALLOC_DEBUG conflicts with DEBUG_CHAOS.

2015-04-02 Thread Corey Farrell

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4557/
---

(Updated April 2, 2015, 5:32 a.m.)


Status
--

This change has been marked as submitted.


Review request for Asterisk Developers and Scott Griepentrog.


Changes
---

Committed in revision 433923


Repository: Asterisk


Description
---

DEBUG_CHAOS is marked as conflicting with MALLOC_DEBUG, but for this to work 
correctly MALLOC_DEBUG must also be marked as conflicting with DEBUG_CHAOS.


Diffs
-

  /branches/13/build_tools/cflags.xml 433716 

Diff: https://reviewboard.asterisk.org/r/4557/diff/


Testing
---

make menuselect, verified that enabling either option disabled the other.


Thanks,

Corey Farrell

-- 
_
-- 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]: Memory Debugging Improvements

2015-04-02 Thread Matt Jordan (Code Review)
Matt Jordan has posted comments on this change.

Change subject: Memory Debugging Improvements
..


Patch Set 4: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I21634673508a01eea1f489c751d3cf75ea55cf06
Gerrit-PatchSet: 4
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell 
Gerrit-Reviewer: Ashley Sanders 
Gerrit-Reviewer: Corey Farrell 
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]: Rewrite sip_attended_transfer test to stop failing.

2015-04-02 Thread Matt Jordan (Code Review)
Matt Jordan has submitted this change and it was merged.

Change subject: Rewrite sip_attended_transfer test to stop failing.
..


Rewrite sip_attended_transfer test to stop failing.

The sip_attended_transfer test has been bouncing for a while. There
are two major fixes introduced here to prevent the bouncing.

First, by converting to using the testsuite's PJSUA module, we no
longer are using the native Python threading library. Instead, we
are using a method that works better with the Twisted framework.

Second, the test is more strict about when the transfer may be
performed. The previous test would attempt the transfer when Asterisk
reported that the call was bridged. The problem is that Asterisk may
report the call as bridged before PJSUA has properly processed the
200 OK that Asterisk has sent to it. By waiting, we can be sure that
all parties are prepared when the transfer is attempted.

The test has also been rewritten to only work with Asterisk 12+. A
new separate test will be written to work on Asterisk 11. This helps
the code to be a little less cluttered.

Change-Id: I1676801d90bcafc28ba25e8b6889f40ab08cc90e

Address review feedback from Ashley

* Two CallCallback classes have been combined into one
* Bridge state has been factored into a minimal class
* Unnecessary checks of test state have been removed.

Change-Id: I1676801d90bcafc28ba25e8b6889f40ab08cc90e
---
A tests/channels/SIP/sip_attended_transfer/attended_transfer.py
M tests/channels/SIP/sip_attended_transfer/configs/ast1/extensions.conf
M tests/channels/SIP/sip_attended_transfer/configs/ast1/sip.conf
D tests/channels/SIP/sip_attended_transfer/run-test
M tests/channels/SIP/sip_attended_transfer/test-config.yaml
5 files changed, 234 insertions(+), 216 deletions(-)

Approvals:
  Matt Jordan: Looks good to me, approved; Verified
  Ashley Sanders: Looks good to me, but someone else must approve



diff --git a/tests/channels/SIP/sip_attended_transfer/attended_transfer.py 
b/tests/channels/SIP/sip_attended_transfer/attended_transfer.py
new file mode 100644
index 000..cb133f3
--- /dev/null
+++ b/tests/channels/SIP/sip_attended_transfer/attended_transfer.py
@@ -0,0 +1,183 @@
+"""
+Copyright (C) 2015, Digium, Inc.
+Mark Michelson 
+
+This program is free software, distributed under the terms of
+the GNU General Public License Version 2.
+"""
+
+import logging
+import pjsua as pj
+
+from twisted.internet import reactor
+
+LOGGER = logging.getLogger(__name__)
+
+INIT = 0
+BOB_CALLED = 1
+CAROL_CALLED = 2
+TRANSFERRED = 3
+
+
+class TransferAccountCallback(pj.AccountCallback):
+'''Generic Account callback for Bob and Carol.
+
+The sole purpose of this callback is to auto-answer
+incoming calls
+'''
+
+def __init__(self, account):
+pj.AccountCallback.__init__(self, account)
+
+def on_incoming_call(self, call):
+call.answer(200)
+
+
+class CallCallback(pj.CallCallback):
+'''Call Callback used for Calls made by Alice.
+
+Each call has some specific action it is expected
+to take once the call has been confirmed to be
+answered. The on_state method is overridden to
+signal to the test that Alice is prepared for the
+next step
+'''
+
+def __init__(self, call, on_answered):
+pj.CallCallback.__init__(self, call)
+self.on_answered = on_answered
+
+def on_state(self):
+if self.call.info().state == pj.CallState.CONFIRMED:
+reactor.callFromThread(self.on_answered)
+
+
+class BridgeState(object):
+'''Object for tracking state of a bridge
+
+The main data the test cares about is the bridge's unique id and whether 
two
+channels have been bridged together by the bridge.
+'''
+def __init__(self):
+self.unique_id = None
+self.bridged = False
+
+
+class Transfer(object):
+'''Controller for attended transfer test
+
+This contains all the methods for advancing the test, such as placing calls
+and performing transfers. It also has several state variables that help to
+determine the proper timing for performing actions.
+'''
+
+def __init__(self, test_object, accounts):
+super(Transfer, self).__init__()
+self.ami = test_object.ami[0]
+self.ami.registerEvent('BridgeCreate', self.bridge_create)
+self.ami.registerEvent('BridgeEnter', self.bridge_enter)
+
+# bridge1 bridges Alice and Bob
+self.bridge1 = BridgeState()
+# bridge2 bridges Alice and Carol
+self.bridge2 = BridgeState()
+
+self.bob_call_answered = False
+self.carol_call_answered = False
+
+bob = accounts.get('bob').account
+bob.set_callback(TransferAccountCallback(bob))
+
+carol = accounts.get('carol').account
+carol.set_callback(TransferAccountCallback(carol))
+
+self.alice = accounts.get('alice').account
+self.call_to_bob = None
+self.c

[asterisk-dev] Change in testsuite[master]: Rewrite sip_attended_transfer test to stop failing.

2015-04-02 Thread Matt Jordan (Code Review)
Matt Jordan has posted comments on this change.

Change subject: Rewrite sip_attended_transfer test to stop failing.
..


Patch Set 3: Code-Review+2 Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1676801d90bcafc28ba25e8b6889f40ab08cc90e
Gerrit-PatchSet: 3
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson 
Gerrit-Reviewer: Ashley Sanders 
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


Re: [asterisk-dev] running pjsip testsuite

2015-04-02 Thread Matthew Jordan
On Thu, Apr 2, 2015 at 3:25 AM, Yaron Nachum  wrote:
> Hi everyone,
> I ran the test manually. Just setup a single endpoint  and using AMI I
> originanted a call to an extension which dials to another extension and send
> DTMF sequence using SendDTMF application.
>
> When I setup the endpoint with rfc4733 the dtmf is identified, but when I
> setup the endpoint with inband it is not identified. Using rtp debug I see
> that the rtp is sent and received.
>
> I did the same scenario with regular sip channel and the same happened.
>
> If anyone has a clue please get back to me.
>
> I will try to make the test with sipp.
>

Hey Yaron -

Can you attach a DEBUG log snippet from the Asterisk instance/channel
sending DTMF inband? In particular, the part where it does the
negotiation, along with sending the DTMF digit.

Thanks!

-- 
Matthew Jordan
Digium, Inc. | Director of Technology
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org

-- 
_
-- 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] [Code Review] 4576: testsuite: Add PJSIP test for new auto_dtmf option.

2015-04-02 Thread yaron nahum

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4576/
---

Review request for Asterisk Developers.


Bugs: ASTERISK-24706
https://issues.asterisk.org/jira/browse/ASTERISK-24706


Repository: testsuite


Description
---

This is the testsuite test to test the auto_dtmf option added by review:
https://reviewboard.asterisk.org/r/4438/

The test passes.


Diffs
-

  /asterisk/trunk/tests/channels/pjsip/tests.yaml 6564 
  /asterisk/trunk/tests/channels/pjsip/auto_dtmf/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/auto_dtmf/sipp/dtmf_rfc2833.xml 
PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/auto_dtmf/sipp/dtmf_inband.xml 
PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/auto_dtmf/configs/ast1/pjsip.conf 
PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/auto_dtmf/configs/ast1/extensions.conf 
PRE-CREATION 

Diff: https://reviewboard.asterisk.org/r/4576/diff/


Testing
---


Thanks,

yaron nahum

-- 
_
-- 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

Re: [asterisk-dev] [Code Review] 4574: pjsip: resolve compatibility problem with ast_sip_session struct

2015-04-02 Thread Scott Griepentrog

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4574/
---

(Updated April 2, 2015, 9:56 a.m.)


Status
--

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
---

Committed in revision 433944


Repository: Asterisk


Description
---

A compatibility problem was introduced in r430179 
(https://reviewboard.asterisk.org/r/4308) when a new variable was inserted into 
the struct ast_sip_session.  This change puts that new variable at the end of 
the structure to avoid misalignment of the values.

This also affects releases 13.2 and 13.3.


Diffs
-

  /branches/13/include/asterisk/res_pjsip_session.h 433918 

Diff: https://reviewboard.asterisk.org/r/4574/diff/


Testing
---

With this change, a DPMA crash has been eliminated when transmitting messages 
via PJSIP.


Thanks,

Scott Griepentrog

-- 
_
-- 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

Re: [asterisk-dev] [Code Review] 4542: DNS: Add NAPTR support and tests

2015-04-02 Thread Kevin Harwell

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4542/#review15031
---

Ship it!


Ship It!

- Kevin Harwell


On April 1, 2015, 9:51 a.m., Mark Michelson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4542/
> ---
> 
> (Updated April 1, 2015, 9:51 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> ---
> 
> This adds NAPTR support for DNS in Asterisk.
> 
> The main parts of this are the functions for allocating a DNS NAPTR record 
> when a resolver wishes to add a NAPTR record, the sorting algorithm for 
> sorting DNS NAPTR records, and the tests that use a mock DNS resolver.
> 
> NOTE: There is likely to be some overlap here in this review and Josh's SRV 
> review (/r/4528). Our stance on this is that we will factor out the 
> duplicated code once both SRV and NAPTR have been merged into the main DNS 
> branch. The factoring out of common functions will be placed in its own 
> review.
> 
> 
> Diffs
> -
> 
>   /team/group/dns/tests/test_dns_naptr.c PRE-CREATION 
>   /team/group/dns/res/res_resolver_unbound.c 433885 
>   /team/group/dns/main/dns_naptr.c 433885 
>   /team/group/dns/main/dns_core.c 433885 
>   /team/group/dns/include/asterisk/dns_internal.h 433885 
> 
> Diff: https://reviewboard.asterisk.org/r/4542/diff/
> 
> 
> Testing
> ---
> 
> All previous DNS tests continue to pass, and all new tests added in this 
> review pass as well.
> 
> 
> Thanks,
> 
> Mark Michelson
> 
>

-- 
_
-- 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]: stasis: set a channel variable on websocket disconnect error

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

Change subject: stasis: set a channel variable on websocket disconnect error
..


Patch Set 1:

(3 comments)

https://gerrit.asterisk.org/#/c/18/1/tests/rest_api/applications/stasisstatus/ari_client.py
File tests/rest_api/applications/stasisstatus/ari_client.py:

Line 148: def on_channelcreated(self, message):
> Ah, I missed the getattr() call in on_ws_event(). I'm going to blame gerrit
That's a fair point. I, too, was hijacked by Gerrit on another comment O.o.


https://gerrit.asterisk.org/#/c/18/1/tests/rest_api/applications/stasisstatus/observable_object.py
File tests/rest_api/applications/stasisstatus/observable_object.py:

Line 84: del self.__registrar[event][:]
> Ah, thanks for the enlightenment!
:)


Line 143: def __validate(self, **kwargs):
> I wasn't suggesting getting rid of the method, just rewriting its body.
On the topic of YAGNI, XP co-founder Ron Jeffries has written, "Always 
implement things when you actually need them, never when you just foresee that 
you need them."

In the case of the on_channeldialplan handler in ari_client.py, that was a 
clear example of YAGNI. I had no usages of the handler; it was adding bloat; it 
would have added strain on maintaining the system; there is no way to predict 
if it will ever be needed or used.

In this case, however, I am using this logic, in two places. I contend that 
this is not a case of YAGNI, because YAGNI, by its very definition, describes 
code that is added in anticipation of future requirements.

The fact that the method was written in a generic fashion does not in and of 
itself make it a victim of code bloat by over-generalization. Python as a 
language already provides the constructs, args and kwargs, as a means of 
injecting an arbitrary number of arguments into a method. This is handy when 
you need to decouple the implementation details of disparate methods that use a 
common method, such as a method to print a variable amount of data, or as in 
this case, a method that uses one set of business logic to validate a variable 
number of parameters.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0f7dadfd429bd30e9f07a531f47884d8c923fc13
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Ashley Sanders 
Gerrit-Reviewer: Ashley Sanders 
Gerrit-Reviewer: Mark Michelson 
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] Trying to improve "file convert" command

2015-04-02 Thread Pavel Troller
Hi!
  I'm disappointed with functionality of the "file convert" command. Its
results are very poor, at least in ast11. It looks that the conversion
is performed through something like slin8 or even alaw/ulaw. There is
a huge difference between listening to for example MP3Player() using
a G.722 codec and Playback() of the G.722 file prepared by "file convert"
from the same MP3 file.
  I was looking at res_convert.c. It's unbelievably simple :-). The trick
must be somewhere in the underlying functions. I tried to analyze them as
well but I never noticed anything like specification of the format used for
the conversion. It just reads frames from one file and writes them to the
other one. But which frames ? Who specifies the format ? I'm confused.
  I would like to implement a simple logic to choose proper "intermediate
format" according to the combination of input/output file types. A small
hint to push me forward would be greatly appreciated :-).
  With regards,
Pavel

-- 
_
-- 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] Test Asterisk Git Repo

2015-04-02 Thread Matthew Jordan
Hey everyone -

I've made a test Asterisk repo on gerrit.asterisk.org (TEST-Asterisk).
This repo is *not* in sync with SVN, and it will be deleted before we
officially move Asterisk over. It is, however, a place where people
can check the following:
* That the tags look okay
* That the relevant mainline branches were pulled over
* That the necessary team branches were ported over
* That the author history looks good

If there are any issues - such as a desired team branch not getting
ported over - please let me know and I'll make sure it gets corrected.

Additionally, we can use this repo to continue to refine the
Zuul/Jenkins integration - which I'm currently still getting set up.
You may expect to see some 'fake' reviews from me in the TEST-Asterisk
repo over the next few days for this purpose.

Please do take a look at it, and let me know if anything seems off.

Thanks!

Matt

-- 
Matthew Jordan
Digium, Inc. | Director of Technology
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org

-- 
_
-- 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


Re: [asterisk-dev] Trying to improve "file convert" command

2015-04-02 Thread Steve Edwards

On Thu, 2 Apr 2015, Pavel Troller wrote:


 I'm disappointed with functionality of the "file convert" command. Its
results are very poor, at least in ast11. It looks that the conversion
is performed through something like slin8 or even alaw/ulaw. There is
a huge difference between listening to for example MP3Player() using
a G.722 codec and Playback() of the G.722 file prepared by "file convert"
from the same MP3 file.
 I was looking at res_convert.c. It's unbelievably simple :-). The trick
must be somewhere in the underlying functions. I tried to analyze them as
well but I never noticed anything like specification of the format used for
the conversion. It just reads frames from one file and writes them to the
other one. But which frames ? Who specifies the format ? I'm confused.
 I would like to implement a simple logic to choose proper "intermediate
format" according to the combination of input/output file types. A small
hint to push me forward would be greatly appreciated :-).


Just my 'personal biases...'

I always thought having Asterisk convert files was dumb. I will never use 
it.


I'd much prefer a 'stand-alone' command line utility like sox.

Why would you want to use a hammer instead of a scalpel?

Do you really want to drag all the functionality and bloat of a general 
purpose audio conversion tool into your PBX?


Do you really want to explain to your boss why you crashed the PBX during 
an important shareholder conference because you wanted to convert the new 
music on hold and you hit a bug in all the new bloat?


'Do one thing, do it well, and move on.'

Are sox plugins for telephony codecs viable?

I'll stop ranting now. You caught me on a frustrating day.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

--
_
-- 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] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-02 Thread Jonathan Rose

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/
---

Review request for Asterisk Developers and Joshua Colp.


Bugs: ASTERISK-24933
https://issues.asterisk.org/jira/browse/ASTERISK-24933


Repository: Asterisk


Description
---

Description:
Two Asterisk boxes each have the other as endpoints with authentication set.
First Asterisk box originates a call to the second using the PJSIP endpoint.
The first Asterisk box uses an extension with sendfax, the second uses
an extension with receivefax.

The session starts fairly normally, but resolution never appears in fax show
session output. After a while (~25 seconds) the call drops and the fax fails.
Error messages shown are as follows:
Sender: The call dropped prematurely
Receiver: Disconnected after permitted retries

Note that when not using authentication, the FAX will complete as expected.
When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
also complete as expected with authentication, but if chan_pjsip is the sender
it will fail regardless of whether the recipient is chan_sip or chan_pjsip.

The problem is caused by duplication of a framehook in res_pjsip_t38 which
occurs on the second invite sent out when responding to the auth challenge.

Fix:
In order to fix this, I added a simple flag to the pjsip session struct that 
would
be raised when the framehook is first attached to prevent duplication. I 
wouldn't
be surprised if there were a better way to do this.


Diffs
-

  /certified/branches/13.1/res/res_pjsip_t38.c 433316 
  /certified/branches/13.1/include/asterisk/res_pjsip_session.h 433316 

Diff: https://reviewboard.asterisk.org/r/4577/diff/


Testing
---

I've duplicated and modified the t38 PJSIP fax test in the testsuite to include 
authentication. It fails without the patch and passes with the patch. I also 
tested this locally with my two Asterisk machines in the above scenario. I'll 
be linking the test after putting it on Gerrit.


Thanks,

Jonathan Rose

-- 
_
-- 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] [Code Review] 4575: bridge.c: Hangup attended transfer target after it has been swapped out

2015-04-02 Thread Kevin Harwell

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4575/
---

Review request for Asterisk Developers.


Bugs: ASTERISK-24782
https://issues.asterisk.org/jira/browse/ASTERISK-24782


Repository: Asterisk


Description
---

After completing an attended transfer the transfer target channel (the one that 
gets swapped out) was not being hung up after leaving the bridge. This resulted 
in a channel possibly being left around. Added an explicit softhangup for the 
channel in question after the transfer is successfully completed in order to 
make sure the channel is hung up.


Diffs
-

  branches/13/main/bridge.c 433917 

Diff: https://reviewboard.asterisk.org/r/4575/diff/


Testing
---

There was a testsuite test that initially caught the problem. Ran the modified 
test (had been set to always pass) after applying the patch and it worked as 
expected. Also did some manual testing with different attended transfer 
scenarios.


Thanks,

Kevin Harwell

-- 
_
-- 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

Re: [asterisk-dev] [Code Review] 4490: astdb: Allow clustering of the Asterisk Database between multiple Asterisk servers

2015-04-02 Thread Mark Michelson

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4490/#review15032
---



/trunk/funcs/func_db.c


There are two ways you can go here:

1) Omit the highlighted section. Since you've already ensured that an 
argument has been given to DB_SHARED_EXISTS, you can take whatever has been 
input as the name of the family, with no further parsing.

2) If you want to ensure that no more than a single argument is passed in, 
then keep this code here but change the warning message to indicate that too 
many arguments were passed to the function.

The reason I'm not going to advocate one approach over the other is that 
AFAIK, there is nothing currently that prevents a DB family from having a comma 
in its name, since DB sections are divided by forward slashes.



/trunk/funcs/func_db.c


I think this is impossible since you've already ensured that parse is not 
zero-length. What string could result in args.argc being less than 1?



/trunk/funcs/func_db.c


I suggest moving this to before parsing the function arguments since it's 
an easy thing to check and bail out on.



/trunk/main/db.c


The clone local variable doesn't really serve a purpose.



/trunk/main/db.c


There is potential for deadlock due to lock inversion.

When ast_db_put_shared() is called, it locks the shared_families container 
and then calls into db_put_common(), which locks the dblock.

When ast_db_put() is called, it first calls into db_put_common(), which 
locks the dblock. Since ast_db_put() sets the "shared" parameter to 1 when 
calling db_put_common(), db_put_common() will call into db_entry_put_shared(), 
which will then try to lock the shared_families lock.

Probably the easiest way to go here would be to unlock shared_families 
before calling db_put_common(), establishing a locking order of dblock and then 
shared_families.



/trunk/main/db.c


The same lock inversion with db_put_common exists here for db_del_common



/trunk/main/db.c


The dialplan function allows an omitted type to automatically be 
interpreted as "global" but the CLI command requires that the type is present.

I'm not a fan of the inconsistency. My preference would be that the 
dialplan function is changed to require an explicit type.



/trunk/main/db.c


family can't be NULL here since whatever strchr returns has 1 added to it.



/trunk/tests/test_db.c


Any reason you went with a manually-resized array instead of an AST_VECTOR?



/trunk/tests/test_db.c


Nitpick:

s/othet/other/



/trunk/tests/test_db.c


Grammar nitpick:

Either:

"...that the AstDB handlers for that topic have written..."

or

"...that the AstDB handler for that topic has written..."



/trunk/tests/test_db.c


If any of these calls to ast_test_validate() fails the GLOBAL_SHARED_FAMILY 
and UNIQUE_SHARED_FAMILY will not be cleaned up.

Actually, this pattern is common throughout the test code and should be 
addressed.


- Mark Michelson


On March 30, 2015, 1:46 a.m., Matt Jordan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4490/
> ---
> 
> (Updated March 30, 2015, 1:46 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24909
> https://issues.asterisk.org/jira/browse/ASTERISK-24909
> 
> 
> Repository: Asterisk
> 
> 
> Description
> ---
> 
> As described on the asterisk-dev mailing list [1], I got some inspiration 
> from seeing Kamailio's htable implementation, and thought a similar mechanism 
> would work for the Asterisk Database. This patch is the result.
> 
> This patch provides a mechanism to mark families within the AstDB as 
> "shared." The marking of a family as shared is independent of the existance 
> of the family, and is independent of the updates already made to the family. 
> Shared families are subject to distribution with other Asterisk instances, as 
> well as subject to updates from other Asterisk instanc

[asterisk-dev] Change in testsuite[master]: Add a test for PJSIP t38 with authentication based on normal...

2015-04-02 Thread Jonathan Rose (Code Review)
Jonathan Rose has uploaded a new change for review.

  https://gerrit.asterisk.org/22

Change subject: Add a test for PJSIP t38 with authentication based on normal 
t38 test
..

Add a test for PJSIP t38 with authentication based on normal t38 test

Change-Id: Id8fd9683dc1b61e7b1afd2b6ede857921beebb88
---
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/test-config.yaml
M tests/fax/pjsip/tests.yaml
7 files changed, 175 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/22/22/1

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..55a81b4
--- /dev/null
+++ b/tests/fax/pjsip/t38_with_auth/configs/ast1/extensions.conf
@@ -0,0 +1,7 @@
+[sendfax]
+exten => 1234,1,noop
+exten => 1234,n,SendFax(${ASTDATADIR}/send.tiff)
+
+exten => h,1,noop
+exten => h,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..03f2714
--- /dev/null
+++ b/tests/fax/pjsip/t38_with_auth/configs/ast2/extensions.conf
@@ -0,0 +1,6 @@
+[receivefax]
+exten => 1234,1,noop
+exten => 1234,n,ReceiveFax(${ASTDATADIR}/receive.tiff)
+
+exten => h,1,noop
+exten => h,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 100644
index 000..8af0d4d
--- /dev/null
+++ b/tests/fax/pjsip/t38_with_auth/run-test
@@ -0,0 +1,83 @@
+#!/usr/bin/env python
+# vim: sw=3 et:
+'''
+Copyright (C) 2011, Digium, Inc.
+Matthew Nicholson 
+
+This program is free software, distributed under the terms of
+the GNU General Public License Version 2.
+'''
+
+import sys
+import logging
+import os
+import re
+import shutil
+
+from twisted.internet import reactor
+
+sys.path.append("lib/python")
+from asterisk.asterisk import Asterisk
+from asterisk.test_case import TestCase
+
+logger = logging.getLogger(__name__)
+
+class T38Test(TestCase):
+   event_count = 0
+   success_count = 0
+
+   def __init__(self):
+  TestCase.__init__(self)
+  self.reactor_timeout = 120
+  self.create_asterisk(2)
+
+  # copy the tiff file we are going to send to a good known location
+  shutil.copy("%s/send.tiff" % 
(os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, 
self.ast[0].directories['astdatadir']))
+
+   def ami_connect(self, ami):
+  if ami.id == 0:
+
+ ami.registerEvent('UserEvent', self.fax_result)
+ df = ami.originate("PJSIP/ast2-t38/sip:1234@127.0.0.2", "sendfax", 
"1234", 1)
+
+ def handle_failure(reason):
+logging.error("error sending originate:")
+logging.error(reason.getTraceback())
+self.stop_reactor()
+
+return reason
+
+ df.addErrback(handle_failure)
+
+   def fax_result(self, ami, event):
+  if event['userevent'] != 'FaxStatus':
+ return
+
+  if even

[asterisk-dev] Change in testsuite[master]: Add a test for PJSIP t38 with authentication based on normal...

2015-04-02 Thread Matt Jordan (Code Review)
Matt Jordan has posted comments on this change.

Change subject: Add a test for PJSIP t38 with authentication based on normal 
t38 test
..


Patch Set 1:

(15 comments)

https://gerrit.asterisk.org/#/c/22/1//COMMIT_MSG
Commit Message:

Line 7: Add a test for PJSIP t38 with authentication based on normal t38 test
I'd capitalize "T38"


Line 8: 
You need to add:

1. A full description of what the test does
2. The standard commit message tags, e.g., the ASTERISK issue related to the 
change


https://gerrit.asterisk.org/#/c/22/1/tests/fax/pjsip/t38_with_auth/configs/ast1/extensions.conf
File tests/fax/pjsip/t38_with_auth/configs/ast1/extensions.conf:

Line 3: exten => 1234,n,SendFax(${ASTDATADIR}/send.tiff)
Use same =>


Line 6: exten => h,n,UserEvent(FaxStatus,operation: send,status: 
${FAXOPT(status)},statusstr: ${FAXOPT(statusstr)},error: ${FAXOPT(error)})
Use same =>


https://gerrit.asterisk.org/#/c/22/1/tests/fax/pjsip/t38_with_auth/configs/ast2/extensions.conf
File tests/fax/pjsip/t38_with_auth/configs/ast2/extensions.conf:

Line 3: exten => 1234,n,ReceiveFax(${ASTDATADIR}/receive.tiff)
Use same =>


Line 6: exten => h,n,UserEvent(FaxStatus,operation: receive,status: 
${FAXOPT(status)},statusstr: ${FAXOPT(statusstr)},error: ${FAXOPT(error)})
Use same =>


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

Line 23: logger = logging.getLogger(__name__)
Our typical "practice" capitalizes LOGGER


Line 25: class T38Test(TestCase):
Add a pydoc comment for that this class is


Line 30:   TestCase.__init__(self)
Use the new style mechanism for invoking the base class init method:

super(T38Test, self).__init__()


Line 34:   # copy the tiff file we are going to send to a good known 
location
   :   shutil.copy("%s/send.tiff" % 
(os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, 
self.ast[0].directories['astdatadir']))
I'm fairly sure this will break the recommended line length :-)


Line 37:def ami_connect(self, ami):
Add a pydoc comment


Line 43:  def handle_failure(reason):
   : logging.error("error sending originate:")
   : logging.error(reason.getTraceback())
   : self.stop_reactor()
   : 
   : return reason
   : 
   :  df.addErrback(handle_failure)
There's a standard handler for failed Originate calls in TestCase. Use that 
instead of providing your own.


Line 52:def fax_result(self, ami, event):
pydoc comment please


https://gerrit.asterisk.org/#/c/22/1/tests/fax/pjsip/t38_with_auth/test-config.yaml
File tests/fax/pjsip/t38_with_auth/test-config.yaml:

Line 3: description: |
  : "This test starts two Asterisk instances and sends a fax 
between them
  :  using the PJSIP channel driver - The endpoints use userpass
  :  authentication."
I think it is worth mentioning why we needed this test. Referencing the 
ASTERISK issue (which there is a standard YAML tag for) would also be nice:

issue: ASTERISK-x


Line 9: minversion: '13.3.1'
minversion should be '13.4.0'.

The patch that fixes this is not going into a point release.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id8fd9683dc1b61e7b1afd2b6ede857921beebb88
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: 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


Re: [asterisk-dev] Asterisk to Git Migration Update

2015-04-02 Thread Corey Farrell
On Tue, Mar 31, 2015 at 7:54 PM, Matthew Jordan  wrote:
> On Tue, Mar 31, 2015 at 1:48 PM, Russell Bryant
>  wrote:



> Yeah, I think I'd rather just bite the bullet and get the repo set up
> "right" with as few weird things lingering around as possible. The
> only potential issue is requiring libxml2 (as we didn't pull in the
> bundled mxml) - but we may as well deal with the fallout now.

Maybe for 11 we can just import menuselect and mxml SVN repos into the
GIT branch 11 with no modifications.  This way there would be no
changes in dependencies.

>>> (4) Asterisk records the SVN revision in each file using the special
>>> keyword "$Revision:". This is then registered in a linked list for
>>> retrieval by the CLI/AMI. Unfortunately, Git doesn't support this
>>> concept, as adding data into a file after commit would change the
>>> checksum . It does allow doing this on checkout via the $Id$ keyword,
>>> which may be an acceptable workaround.
>>
>>
>>  That whole thing seems questionably useful, anyway.  Just removing it is
>> another option.
>
> True. I'm not sure how much value people get from knowing the SVN
> revision of a file... much less a checksum.

Checksums would only be useful if they were generated at build-time
from the complete source file, and a file or URL with a list of
official checksums was available.  This would allow a CLI command to
list unofficial/modified sources, could make it easier to identify
when bugs are caused by those changes.

-- 
_
-- 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


Re: [asterisk-dev] Test Asterisk Git Repo

2015-04-02 Thread Matthew Jordan
On Thu, Apr 2, 2015 at 1:44 PM, Matthew Jordan  wrote:
> Hey everyone -
>
> I've made a test Asterisk repo on gerrit.asterisk.org (TEST-Asterisk).
> This repo is *not* in sync with SVN, and it will be deleted before we
> officially move Asterisk over. It is, however, a place where people
> can check the following:
> * That the tags look okay
> * That the relevant mainline branches were pulled over
> * That the necessary team branches were ported over
> * That the author history looks good
>
> If there are any issues - such as a desired team branch not getting
> ported over - please let me know and I'll make sure it gets corrected.
>
> Additionally, we can use this repo to continue to refine the
> Zuul/Jenkins integration - which I'm currently still getting set up.
> You may expect to see some 'fake' reviews from me in the TEST-Asterisk
> repo over the next few days for this purpose.
>
> Please do take a look at it, and let me know if anything seems off.
>

FYI: trunk is kind of "off". I'm looking into what happened there.

The rest of the branches - so far - look correct.

-- 
Matthew Jordan
Digium, Inc. | Director of Technology
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org

-- 
_
-- 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]: non_stasis_bridge_to_stasis_bridge: Update regex for ami events

2015-04-02 Thread Kevin Harwell (Code Review)
Kevin Harwell has uploaded a new change for review.

  https://gerrit.asterisk.org/25

Change subject: non_stasis_bridge_to_stasis_bridge: Update regex for ami events
..

non_stasis_bridge_to_stasis_bridge: Update regex for ami events

Due to a bug in Asterisk, in some cases, the channel would not be hung up after
leaving the bridge upon completing an attended transfer. With that fixed this
test can now be expected to pass. However there were a few spots where the ami
event matching class had trouble matching events with a '-' included. Removed
the '-' to no longer be part of the search criteria. The test now works as
expected.

Change-Id: I0a3bcb1a0df7e7bdca02be827288f5f08b5140ce
---
M 
tests/rest_api/external_interaction/attended_transfer/non_stasis_bridge_to_stasis_bridge/test-config.yaml
1 file changed, 11 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/25/25/1

diff --git 
a/tests/rest_api/external_interaction/attended_transfer/non_stasis_bridge_to_stasis_bridge/test-config.yaml
 
b/tests/rest_api/external_interaction/attended_transfer/non_stasis_bridge_to_stasis_bridge/test-config.yaml
index 97009bb..009ea99 100644
--- 
a/tests/rest_api/external_interaction/attended_transfer/non_stasis_bridge_to_stasis_bridge/test-config.yaml
+++ 
b/tests/rest_api/external_interaction/attended_transfer/non_stasis_bridge_to_stasis_bridge/test-config.yaml
@@ -44,6 +44,7 @@
 typename: 'pluggable_modules.EventActionModule'
 
 test-object-config:
+#reactor-timeout: 60
 apps: testsuite
 test-iterations:
 -
@@ -273,6 +274,11 @@
 channel:
 name: 'Local/_attended@transfer-.*;2'
 count: 1
+ami-actions:
+action:
+   action: 'Hangup'
+   channel: '/^PJSIP/bob-.*$/'
+
 # Ensure alice's second channel exits the Stasis app. Then hang up bob.
 -
 ari-events:
@@ -282,10 +288,6 @@
 channel:
 name: 'PJSIP/alice-.*'
 count: 1
-ami-actions:
-action:
-   action: 'Hangup'
-   channel: '/^PJSIP/bob-.*$/'
 # Upon hanging up bob, ensure bob leaves the non-Stasis bridge and is hung
 # up.
 -
@@ -311,7 +313,7 @@
 conditions:
 match:
 Event: 'BridgeLeave'
-Channel: 'Local/_attended-.*;1'
+Channel: 'Local/_attended.*;1'
 nomatch:
 BridgeUniqueid: 'test_bridge'
 count: 1
@@ -320,7 +322,7 @@
 conditions:
 match:
 Event: 'Hangup'
-Channel: 'Local/_attended-.*;1'
+Channel: 'Local/_attended.*;1'
 count: 1
 # Ensure the local channel half in Stasis bridge with carol leaves the
 # bridge.
@@ -332,7 +334,7 @@
 bridge:
 id: 'test_bridge'
 channel:
-name: 'Local/_attended-.*;2'
+name: 'Local/_attended.*;2'
 count: 1
 # Ensure the local channel half in Stasis bridge with carol exits the
 # Stasis app. Then hang up carol.
@@ -342,7 +344,7 @@
 type: StasisEnd
 application: 'testsuite'
 channel:
-name: 'Local/_attended-.*;2'
+name: 'Local/_attended.*;2'
 count: 1
 ari-requests:
 method: 'delete'
@@ -394,5 +396,5 @@
 - ARI
 - pjsip
 # Expect test to fail until ASTERISK-24782 is resolved.
-expected-result: False
+#expected-result: False
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a3bcb1a0df7e7bdca02be827288f5f08b5140ce
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell 

-- 
_
-- 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]: non_stasis_bridge_to_stasis_bridge: Update regex for ami events

2015-04-02 Thread Kevin Harwell (Code Review)
Kevin Harwell has uploaded a new patch set (#2).

Change subject: non_stasis_bridge_to_stasis_bridge: Update regex for ami events
..

non_stasis_bridge_to_stasis_bridge: Update regex for ami events

Due to a bug in Asterisk, in some cases, the channel would not be hung up after
leaving the bridge upon completing an attended transfer. With that fixed this
test can now be expected to pass. However there were a few spots where the ami
event matching class had trouble matching events with a '-' included. Removed
the '-' to no longer be part of the search criteria. The test now works as
expected.

Change-Id: I0a3bcb1a0df7e7bdca02be827288f5f08b5140ce
---
M 
tests/rest_api/external_interaction/attended_transfer/non_stasis_bridge_to_stasis_bridge/test-config.yaml
1 file changed, 9 insertions(+), 11 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0a3bcb1a0df7e7bdca02be827288f5f08b5140ce
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell 

-- 
_
-- 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


Re: [asterisk-dev] [Code Review] 4536: iax2_poke_noanswer expiration timer too short

2015-04-02 Thread Y Ateya


> On April 1, 2015, 1:07 a.m., Matt Jordan wrote:
> > trunk/channels/chan_iax2.c, line 12370
> > 
> >
> > The usage of max_retries here feels arbitrary. I'm not against this 
> > being controlled more dynamically based on the last known qualify time, but 
> > I'd rather just see that be 4 or 8 here, as appropriate.
> 
> Mark Michelson wrote:
> Just going to chime in with my agreement here. I'm not sure how 
> max_retries fits into this.

The purpose of dependence on max_retries (and qualify) was to allow for POKE to 
be retried max_retries time (based on qualify value); Using a magic number (ex. 
multiply by 8) don't give any insight about why did you do this.

NOTE: As retry time changes after consecutive retries it will do less than 
max_retries retries before iax2_poke_noanswer expiration. For example: If retry 
time is 500ms, first retry will be after 500ms, second retry will be 5 seconds 
(500ms * 10), third retry after 10seconds (5 seconds * 10, cieled to 
MAX_RETRY_TIME -10s-), fourth retry after 10s.


- Y


---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4536/#review15007
---


On March 26, 2015, 11:42 p.m., Y Ateya wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4536/
> ---
> 
> (Updated March 26, 2015, 11:42 p.m.)
> 
> 
> Review request for Asterisk Developers and rnewton.
> 
> 
> Bugs: ASTERISK-24894
> https://issues.asterisk.org/jira/browse/ASTERISK-24894
> 
> 
> Repository: Asterisk
> 
> 
> Description
> ---
> 
> Increase POKE retry window from DEFAULT_MAXMS * 2 (4 seconds) to bigger 
> number (derived from qualify time; which control POKE retry time).
> 
> 
> Diffs
> -
> 
>   trunk/channels/chan_iax2.c 432806 
> 
> Diff: https://reviewboard.asterisk.org/r/4536/diff/
> 
> 
> Testing
> ---
> 
> - Tried test with multiple qualify values (2 and 10 seconds).
> - Tried test with 100% packets loss to ensure that when a POKE packet is 
> dropped it will be retried couple of time before declaring client 
> disconnected.
> 
> 
> Thanks,
> 
> Y Ateya
> 
>

-- 
_
-- 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]: non_stasis_bridge_to_stasis_bridge: Update regex for ami events

2015-04-02 Thread John Bigelow (Code Review)
John Bigelow has posted comments on this change.

Change subject: non_stasis_bridge_to_stasis_bridge: Update regex for ami events
..


Patch Set 2:

(1 comment)

https://gerrit.asterisk.org/#/c/25/2/tests/rest_api/external_interaction/attended_transfer/non_stasis_bridge_to_stasis_bridge/test-config.yaml
File 
tests/rest_api/external_interaction/attended_transfer/non_stasis_bridge_to_stasis_bridge/test-config.yaml:

Line 276: ami-actions:
: action:
:action: 'Hangup'
:channel: '/^PJSIP/bob-.*$/'
I'm curious as to why this was moved.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0a3bcb1a0df7e7bdca02be827288f5f08b5140ce
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell 
Gerrit-Reviewer: John Bigelow 
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


Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-02 Thread Kevin Harwell

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15034
---


It is probably always the case that framehooks should not be attached twice. If 
this is true then it might be better to add a check in 'ast_framehook_attach' 
that first makes sure the hook is not already in the list. If so don't add it 
again.

- Kevin Harwell


On April 2, 2015, 2:08 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4577/
> ---
> 
> (Updated April 2, 2015, 2:08 p.m.)
> 
> 
> Review request for Asterisk Developers and Joshua Colp.
> 
> 
> Bugs: ASTERISK-24933
> https://issues.asterisk.org/jira/browse/ASTERISK-24933
> 
> 
> Repository: Asterisk
> 
> 
> Description
> ---
> 
> Description:
> Two Asterisk boxes each have the other as endpoints with authentication set.
> First Asterisk box originates a call to the second using the PJSIP endpoint.
> The first Asterisk box uses an extension with sendfax, the second uses
> an extension with receivefax.
> 
> The session starts fairly normally, but resolution never appears in fax show
> session output. After a while (~25 seconds) the call drops and the fax fails.
> Error messages shown are as follows:
> Sender: The call dropped prematurely
> Receiver: Disconnected after permitted retries
> 
> Note that when not using authentication, the FAX will complete as expected.
> When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
> also complete as expected with authentication, but if chan_pjsip is the sender
> it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
> 
> The problem is caused by duplication of a framehook in res_pjsip_t38 which
> occurs on the second invite sent out when responding to the auth challenge.
> 
> Fix:
> In order to fix this, I added a simple flag to the pjsip session struct that 
> would
> be raised when the framehook is first attached to prevent duplication. I 
> wouldn't
> be surprised if there were a better way to do this.
> 
> 
> Diffs
> -
> 
>   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
>   /certified/branches/13.1/include/asterisk/res_pjsip_session.h 433316 
> 
> Diff: https://reviewboard.asterisk.org/r/4577/diff/
> 
> 
> Testing
> ---
> 
> I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
> include authentication. It fails without the patch and passes with the patch. 
> I also tested this locally with my two Asterisk machines in the above 
> scenario. I'll be linking the test after putting it on Gerrit.
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-- 
_
-- 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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-02 Thread rmudgett


> On April 2, 2015, 6:13 p.m., Kevin Harwell wrote:
> > It is probably always the case that framehooks should not be attached 
> > twice. If this is true then it might be better to add a check in 
> > 'ast_framehook_attach' that first makes sure the hook is not already in the 
> > list. If so don't add it again.

It is specific framehooks that cannot be attached twice.  It is not a general 
requirement/property of the framehook concept.


- rmudgett


---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15034
---


On April 2, 2015, 2:08 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4577/
> ---
> 
> (Updated April 2, 2015, 2:08 p.m.)
> 
> 
> Review request for Asterisk Developers and Joshua Colp.
> 
> 
> Bugs: ASTERISK-24933
> https://issues.asterisk.org/jira/browse/ASTERISK-24933
> 
> 
> Repository: Asterisk
> 
> 
> Description
> ---
> 
> Description:
> Two Asterisk boxes each have the other as endpoints with authentication set.
> First Asterisk box originates a call to the second using the PJSIP endpoint.
> The first Asterisk box uses an extension with sendfax, the second uses
> an extension with receivefax.
> 
> The session starts fairly normally, but resolution never appears in fax show
> session output. After a while (~25 seconds) the call drops and the fax fails.
> Error messages shown are as follows:
> Sender: The call dropped prematurely
> Receiver: Disconnected after permitted retries
> 
> Note that when not using authentication, the FAX will complete as expected.
> When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
> also complete as expected with authentication, but if chan_pjsip is the sender
> it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
> 
> The problem is caused by duplication of a framehook in res_pjsip_t38 which
> occurs on the second invite sent out when responding to the auth challenge.
> 
> Fix:
> In order to fix this, I added a simple flag to the pjsip session struct that 
> would
> be raised when the framehook is first attached to prevent duplication. I 
> wouldn't
> be surprised if there were a better way to do this.
> 
> 
> Diffs
> -
> 
>   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
>   /certified/branches/13.1/include/asterisk/res_pjsip_session.h 433316 
> 
> Diff: https://reviewboard.asterisk.org/r/4577/diff/
> 
> 
> Testing
> ---
> 
> I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
> include authentication. It fails without the patch and passes with the patch. 
> I also tested this locally with my two Asterisk machines in the above 
> scenario. I'll be linking the test after putting it on Gerrit.
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-- 
_
-- 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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-02 Thread rmudgett

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15036
---



/certified/branches/13.1/include/asterisk/res_pjsip_session.h


Beware ABI compatibility when adding to this struct.  There have already 
been other items added to this struct on the v13 branch.  You could add the 
flag as a bit field and put it right after defer_terminate without altering the 
struct byte layout.


A datastore could be used to record if the framehook is attached.


- rmudgett


On April 2, 2015, 2:08 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4577/
> ---
> 
> (Updated April 2, 2015, 2:08 p.m.)
> 
> 
> Review request for Asterisk Developers and Joshua Colp.
> 
> 
> Bugs: ASTERISK-24933
> https://issues.asterisk.org/jira/browse/ASTERISK-24933
> 
> 
> Repository: Asterisk
> 
> 
> Description
> ---
> 
> Description:
> Two Asterisk boxes each have the other as endpoints with authentication set.
> First Asterisk box originates a call to the second using the PJSIP endpoint.
> The first Asterisk box uses an extension with sendfax, the second uses
> an extension with receivefax.
> 
> The session starts fairly normally, but resolution never appears in fax show
> session output. After a while (~25 seconds) the call drops and the fax fails.
> Error messages shown are as follows:
> Sender: The call dropped prematurely
> Receiver: Disconnected after permitted retries
> 
> Note that when not using authentication, the FAX will complete as expected.
> When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
> also complete as expected with authentication, but if chan_pjsip is the sender
> it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
> 
> The problem is caused by duplication of a framehook in res_pjsip_t38 which
> occurs on the second invite sent out when responding to the auth challenge.
> 
> Fix:
> In order to fix this, I added a simple flag to the pjsip session struct that 
> would
> be raised when the framehook is first attached to prevent duplication. I 
> wouldn't
> be surprised if there were a better way to do this.
> 
> 
> Diffs
> -
> 
>   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
>   /certified/branches/13.1/include/asterisk/res_pjsip_session.h 433316 
> 
> Diff: https://reviewboard.asterisk.org/r/4577/diff/
> 
> 
> Testing
> ---
> 
> I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
> include authentication. It fails without the patch and passes with the patch. 
> I also tested this locally with my two Asterisk machines in the above 
> scenario. I'll be linking the test after putting it on Gerrit.
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-- 
_
-- 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]: Memory Debugging Improvements

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

Change subject: Memory Debugging Improvements
..


Patch Set 4: Code-Review+1

>From what I can tell, everything looks good to me.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I21634673508a01eea1f489c751d3cf75ea55cf06
Gerrit-PatchSet: 4
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell 
Gerrit-Reviewer: Ashley Sanders 
Gerrit-Reviewer: Corey Farrell 
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]: Memory Debugging Improvements

2015-04-02 Thread Matt Jordan (Code Review)
Matt Jordan has posted comments on this change.

Change subject: Memory Debugging Improvements
..


Patch Set 4: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I21634673508a01eea1f489c751d3cf75ea55cf06
Gerrit-PatchSet: 4
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell 
Gerrit-Reviewer: Ashley Sanders 
Gerrit-Reviewer: Corey Farrell 
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]: Memory Debugging Improvements

2015-04-02 Thread Matt Jordan (Code Review)
Matt Jordan has posted comments on this change.

Change subject: Memory Debugging Improvements
..


Patch Set 4: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I21634673508a01eea1f489c751d3cf75ea55cf06
Gerrit-PatchSet: 4
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell 
Gerrit-Reviewer: Ashley Sanders 
Gerrit-Reviewer: Corey Farrell 
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]: Memory Debugging Improvements

2015-04-02 Thread Matt Jordan (Code Review)
Matt Jordan has submitted this change and it was merged.

Change subject: Memory Debugging Improvements
..


Memory Debugging Improvements

* Enable XML output from valgrind.
* Display and save a summary of valgrind errors and leaks.
* Enable use of contrib/valgrind/suppressions.txt if it exists
  to suppress expected leaks or system library errors.  Added
  entry to .gitignore for this file.
* Supply a sample suppressions file that ignores some reachable
  memory.
* Create stdout_print for printing messages to the terminal and
  including in the failure message.
* Switch some failure notifications to use stdout_print() so the
  messages are included in asterisk-test-suite-report.xml.
* Create function for archiving a list of files from source folder
  to destination folder.  Switch all archive functions to use this.

Valgrind Summaries require the lxml module.  If this module is not
found summaries will not be produced, but valgrind XML output will
still be available in the Asterisk logs directory.

Change-Id: I21634673508a01eea1f489c751d3cf75ea55cf06
---
M .gitignore
M README.txt
A contrib/valgrind/summary-lines.xsl
A contrib/valgrind/suppressions-sample.txt
M lib/python/asterisk/asterisk.py
M runtests.py
6 files changed, 192 insertions(+), 47 deletions(-)

Approvals:
  Matt Jordan: Looks good to me, approved; Verified
  Ashley Sanders: Looks good to me, but someone else must approve



diff --git a/.gitignore b/.gitignore
index cf96d9e..b7f92b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
 *.pyc
 asterisk-test-suite-report.xml
 /astroot
+/contrib/valgrind/suppressions.txt
 /logs
diff --git a/README.txt b/README.txt
index 30027f2..f6c5b80 100644
--- a/README.txt
+++ b/README.txt
@@ -127,6 +127,7 @@
   $ make update
   $ make install
 - python-twisted
+- python-lxml
 - pjsua
 - Download and build pjproject 1.x from source
 - http://www.pjsip.org/download.htm
diff --git a/contrib/valgrind/summary-lines.xsl 
b/contrib/valgrind/summary-lines.xsl
new file mode 100644
index 000..c06faaf
--- /dev/null
+++ b/contrib/valgrind/summary-lines.xsl
@@ -0,0 +1,63 @@
+
+http://www.w3.org/1999/XSL/Transform";>
+
+
+
+   
+   
+   Valgrind  
results - 
+   
+   
+   
+   = Errors ==
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   == Leaked Memory ==
+   
+   
+   
+bytes
+   
+   
+   
+   
+   
+   
+bytes
+   
+   
+   
+   
+   
+   
+bytes
+   
+   
+   
+   
+   
+   
+   == Suppressions ===
+   
+   
+   
+   
+   
+   
+   
+   
+   
+
+
+
diff --git a/contrib/valgrind/suppressions-sample.txt 
b/contrib/valgrind/suppressions-sample.txt
new file mode 100644
index 000..1ee57a7
--- /dev/null
+++ b/contrib/valgrind/suppressions-sample.txt
@@ -0,0 +1,38 @@
+#
+# This is a sample valgrind suppressions file for Asterisk.
+#
+# To use this suppression file with the testsuite, copy it to:
+#   contrib/valgrind/suppressions.txt
+#
+# This is meant for use when valgrind parameters include:
+#   --show-leak-kinds=all
+#
+# Extra valgrind options are read from:
+#   ~/.valgrindrc, $VALGRIND_OPTS, ./.valgrindrc
+#
+{
+   
+   # The threadstorage for the main thread is not cleaned by exit().
+   Memcheck:Leak
+   match-leak-kinds: reachable
+   fun:calloc
+   ...
+   fun:ast_threadstorage_get
+}
+{
+   
+   # libasteriskssl doesn't cleanup the init items.
+   Memcheck:Leak
+   match-leak-kinds: reachable
+   ...
+   fun:ast_ssl_init
+}
+{
+   
+   # dlclose is not run on modules at shutdown.
+   # This does not suppress allocations from module_load.
+   

[asterisk-dev] Change in testsuite[master]: Add a test for PJSIP t38 with authentication based on normal...

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

Change subject: Add a test for PJSIP t38 with authentication based on normal 
t38 test
..


Patch Set 1: Code-Review-1

(5 comments)

Very close. I think just fix the pylint errors and the little tweaks that Matt 
suggested and it will be good.

https://gerrit.asterisk.org/#/c/22/1/tests/fax/pjsip/t38_with_auth/configs/ast1/extensions.conf
File tests/fax/pjsip/t38_with_auth/configs/ast1/extensions.conf:

Line 3: exten => 1234,n,SendFax(${ASTDATADIR}/send.tiff)
> Use same =>
@Matt Jordan, is SendFax similar to Stasis in that once the channel is handed 
off to the application, it only comes back on a hangup?


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

I think you need to run pylint on this file. Right now, it is scoring a 
-6.86/10. 

On the plus side, it seems like it is mostly indentation errors and missing 
docstrings, though :)


Line 6: 
Should you add your name to the authors list?


Line 26:event_count = 0
If you aren't using this class as a singleton, you don't need to have these 
variables at the class level. They would be safe to be instance variables.


Line 30:   TestCase.__init__(self)
> Use the new style mechanism for invoking the base class init method:
Interesting. When I run pylint on my files using super(FooTestCase, 
self).__init__(), pylint returns, "Use of super on an old-style class." 

But, after thinking about it now, TestCase is not an old-style class. I am 
going to have to go back and revisit my test and fix those references, too (and 
ignore pylint's barks).


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id8fd9683dc1b61e7b1afd2b6ede857921beebb88
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Jonathan Rose 
Gerrit-Reviewer: Ashley Sanders 
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]: non_stasis_bridge_to_stasis_bridge: Update regex for ami events

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

Change subject: non_stasis_bridge_to_stasis_bridge: Update regex for ami events
..


Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0a3bcb1a0df7e7bdca02be827288f5f08b5140ce
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell 
Gerrit-Reviewer: Ashley Sanders 
Gerrit-Reviewer: John Bigelow 
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]: non_stasis_bridge_to_stasis_bridge: Update regex for ami events

2015-04-02 Thread Corey Farrell (Code Review)
Corey Farrell has posted comments on this change.

Change subject: non_stasis_bridge_to_stasis_bridge: Update regex for ami events
..


Patch Set 2: Code-Review-1

(2 comments)

Couple nit-picks about a comment / commit message.  Once the review is updated 
I will +1.

https://gerrit.asterisk.org/#/c/25/2/tests/rest_api/external_interaction/attended_transfer/non_stasis_bridge_to_stasis_bridge/test-config.yaml
File 
tests/rest_api/external_interaction/attended_transfer/non_stasis_bridge_to_stasis_bridge/test-config.yaml:

Line 276: ami-actions:
: action:
:action: 'Hangup'
:channel: '/^PJSIP/bob-.*$/'
> I'm curious as to why this was moved.
I'm also curious, this change should probably be mentioned in the commit 
message.


Line 281: # Ensure alice's second channel exits the Stasis app. Then hang 
up bob.
Please update this comment.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0a3bcb1a0df7e7bdca02be827288f5f08b5140ce
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell 
Gerrit-Reviewer: Ashley Sanders 
Gerrit-Reviewer: Corey Farrell 
Gerrit-Reviewer: John Bigelow 
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]: Add a test for PJSIP t38 with authentication based on normal...

2015-04-02 Thread Matt Jordan (Code Review)
Matt Jordan has posted comments on this change.

Change subject: Add a test for PJSIP t38 with authentication based on normal 
t38 test
..


Patch Set 1:

(1 comment)

https://gerrit.asterisk.org/#/c/22/1/tests/fax/pjsip/t38_with_auth/configs/ast1/extensions.conf
File tests/fax/pjsip/t38_with_auth/configs/ast1/extensions.conf:

Line 3: exten => 1234,n,SendFax(${ASTDATADIR}/send.tiff)
> @Matt Jordan, is SendFax similar to Stasis in that once the channel is hand
No, but if the channel is still active when it leaves the SendFax dialplan 
application, it will be immediately hung up because there's no more dialplan to 
execute, and (assuming fall-through is enabled, which it shouldn't be), there 
are no more matching extensions within this context.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id8fd9683dc1b61e7b1afd2b6ede857921beebb88
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Jonathan Rose 
Gerrit-Reviewer: Ashley Sanders 
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


Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-02 Thread Matt Jordan

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15038
---



/certified/branches/13.1/include/asterisk/res_pjsip_session.h


I hadn't really thought about that when discussing this with Jonathan 
earlier - and that may actually be a better way of handling this (and avoids 
ABI issues as well). That's actually how most framehooks check for their 
existence, and allow for API calls to remove the framehook.


- Matt Jordan


On April 2, 2015, 2:08 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4577/
> ---
> 
> (Updated April 2, 2015, 2:08 p.m.)
> 
> 
> Review request for Asterisk Developers and Joshua Colp.
> 
> 
> Bugs: ASTERISK-24933
> https://issues.asterisk.org/jira/browse/ASTERISK-24933
> 
> 
> Repository: Asterisk
> 
> 
> Description
> ---
> 
> Description:
> Two Asterisk boxes each have the other as endpoints with authentication set.
> First Asterisk box originates a call to the second using the PJSIP endpoint.
> The first Asterisk box uses an extension with sendfax, the second uses
> an extension with receivefax.
> 
> The session starts fairly normally, but resolution never appears in fax show
> session output. After a while (~25 seconds) the call drops and the fax fails.
> Error messages shown are as follows:
> Sender: The call dropped prematurely
> Receiver: Disconnected after permitted retries
> 
> Note that when not using authentication, the FAX will complete as expected.
> When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
> also complete as expected with authentication, but if chan_pjsip is the sender
> it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
> 
> The problem is caused by duplication of a framehook in res_pjsip_t38 which
> occurs on the second invite sent out when responding to the auth challenge.
> 
> Fix:
> In order to fix this, I added a simple flag to the pjsip session struct that 
> would
> be raised when the framehook is first attached to prevent duplication. I 
> wouldn't
> be surprised if there were a better way to do this.
> 
> 
> Diffs
> -
> 
>   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
>   /certified/branches/13.1/include/asterisk/res_pjsip_session.h 433316 
> 
> Diff: https://reviewboard.asterisk.org/r/4577/diff/
> 
> 
> Testing
> ---
> 
> I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
> include authentication. It fails without the patch and passes with the patch. 
> I also tested this locally with my two Asterisk machines in the above 
> scenario. I'll be linking the test after putting it on Gerrit.
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-- 
_
-- 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