[asterisk-dev] [Code Review] 3505: app_chanspy: Fix a bug where barge mode only works on the first connection when multiple sessions are spied on for a channel

Jonathan Rose reviewboard at asterisk.org
Thu May 8 14:31:39 CDT 2014


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

(Updated May 8, 2014, 2:31 p.m.)


Review request for Asterisk Developers.


Changes
-------

Nah, you weren't crazy. I thought I had determined the change to be unnecessary for some reason, but then I realized the cause of the bug was slightly different than how I thought it was when I first reproduced it.

Instead I'm getting rid of the first call to attach the audiohook and keeping the one inside the loop. If the channel isn't bridged with anything when the attach_barge function is called, then it will keep trying until it can attach one.


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


Repository: Asterisk


Description
-------

This is a cleanup of the patches posted by Robert Moss for ASTERISK-23381 - A stalled review of the patch exists here: https://reviewboard.asterisk.org/r/3331/diff/1/#index_header

This version is made to apply to Asterisk 11 since the bug was first reported there.


Diffs (updated)
-----

  /branches/11/apps/app_chanspy.c 413071 

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


Testing
-------

1. SIP/A calls a spy application which spies on SIP/B with the DTMF option (4 for spy mode, 5 for whisper mode, 6 for barge)
2. SIP/B calls SIP/C
3. Check to see if audio is flowing from A to B and from A to C... should start as neither. (A always hears both of the others though)
 * press DTMF 5
  - now audio should flow from A to B, but from not A to C
 * press DTMF 6
  - now audio should flow from A to B and A to C
4. Hang up SIP/B
5. Have SIP/B call SIP/C again
6. The spy should reconnect automatically and be in barge mode
  - audio should flow from A to B and A to C
 * press DTMF 5
  - audio should flow from A to B, but not from A to C
 * press DTMF 4
  - audio should not flow from A to either phone


Prior to patch: Audio from A to C could not be heard in the first check
After the patch: Audio from A to C can be heard in the first check

All other checks work as expected in both situations.


Thanks,

Jonathan Rose

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140508/ba35f458/attachment.html>


More information about the asterisk-dev mailing list