Summary: | ASTERISK-15378: Chanspy cannot spy on a non-bridged channel | ||
Reporter: | Mark Murawski (kobaz) | Labels: | |
Date Opened: | 2009-12-29 13:37:58.000-0600 | Date Closed: | 2010-01-18 10:46:43.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_chanspy |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | extend context services { 1 => { ChanSpy(SIP/3007,Wq); } 2 => { Answer(); Wait(6000); } } SIP/3007 dials 2@services -- Executing [2@_cos_internal+local+ld+intl:1] Answer("SIP/3007-0000001d", "") in new stack -- Executing [2@_cos_internal+local+ld+intl:2] Wait("SIP/3007-0000001d", "6000") in new stack SIP/3030 dials 1@services -- Executing [1@_cos_internal+local+ld+intl:1] ChanSpy("SIP/3030-0000001f", "SIP/3007,Wq") in new stack == Spying on channel SIP/3007-0000001d [Dec 29 14:36:08] NOTICE[1902]: app_chanspy.c:245 start_spying: Attaching SIP/3030-0000001f to SIP/3007-0000001d [Dec 29 14:36:08] NOTICE[1902]: app_chanspy.c:245 start_spying: Attaching SIP/3030-0000001f to SIP/3007-0000001d 3030 cannot whisper to 3007. If you replace Wait(), with MeetMe(), Voicemail... or anything else that bridges audio... 3030 can then whisper to 3007. | ||
Comments: | By: Russell Bryant (russell) 2010-01-05 13:35:08.000-0600 I think the fix here is just that Wait() needs to generate silence. We should also review the list of applications to see if others behave like this, as well. By: Digium Subversion (svnbot) 2010-01-13 10:31:16.000-0600 Repository: asterisk Revision: 239712 U trunk/Makefile U trunk/apps/app_waitforring.c U trunk/apps/app_waitforsilence.c U trunk/main/channel.c ------------------------------------------------------------------------ r239712 | dvossel | 2010-01-13 10:31:15 -0600 (Wed, 13 Jan 2010) | 24 lines add silence gen to wait apps asterisk.conf's 'transmit_silence' option existed before this patch, but was limited to only generating silence while recording and sending DTMF. Now enabling the transmit_silence option generates silence during wait times as well. To achieve this, ast_safe_sleep has been modified to generate silence anytime no other generators are present and transmit_silence is enabled. Wait apps not using ast_safe_sleep now generate silence when transmit_silence is enabled as well. (closes issue ASTERISK-15378) Reported by: kobaz (closes issue ASTERISK-15377) Reported by: kobaz Tested by: dvossel Review: https://reviewboard.asterisk.org/r/456/ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=239712 By: Digium Subversion (svnbot) 2010-01-13 10:37:07.000-0600 Repository: asterisk Revision: 239713 _U branches/1.6.2/ U branches/1.6.2/Makefile U branches/1.6.2/apps/app_waitforring.c U branches/1.6.2/apps/app_waitforsilence.c U branches/1.6.2/main/channel.c ------------------------------------------------------------------------ r239713 | dvossel | 2010-01-13 10:37:07 -0600 (Wed, 13 Jan 2010) | 30 lines Merged revisions 239712 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r239712 | dvossel | 2010-01-13 10:31:14 -0600 (Wed, 13 Jan 2010) | 24 lines add silence gen to wait apps asterisk.conf's 'transmit_silence' option existed before this patch, but was limited to only generating silence while recording and sending DTMF. Now enabling the transmit_silence option generates silence during wait times as well. To achieve this, ast_safe_sleep has been modified to generate silence anytime no other generators are present and transmit_silence is enabled. Wait apps not using ast_safe_sleep now generate silence when transmit_silence is enabled as well. (closes issue ASTERISK-15378) Reported by: kobaz (closes issue ASTERISK-15377) Reported by: kobaz Tested by: dvossel Review: https://reviewboard.asterisk.org/r/456/ ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=239713 By: Digium Subversion (svnbot) 2010-01-13 10:38:32.000-0600 Repository: asterisk Revision: 239714 _U branches/1.6.1/ U branches/1.6.1/Makefile U branches/1.6.1/apps/app_waitforring.c U branches/1.6.1/apps/app_waitforsilence.c U branches/1.6.1/main/channel.c ------------------------------------------------------------------------ r239714 | dvossel | 2010-01-13 10:38:32 -0600 (Wed, 13 Jan 2010) | 30 lines Merged revisions 239712 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r239712 | dvossel | 2010-01-13 10:31:14 -0600 (Wed, 13 Jan 2010) | 24 lines add silence gen to wait apps asterisk.conf's 'transmit_silence' option existed before this patch, but was limited to only generating silence while recording and sending DTMF. Now enabling the transmit_silence option generates silence during wait times as well. To achieve this, ast_safe_sleep has been modified to generate silence anytime no other generators are present and transmit_silence is enabled. Wait apps not using ast_safe_sleep now generate silence when transmit_silence is enabled as well. (closes issue ASTERISK-15378) Reported by: kobaz (closes issue ASTERISK-15377) Reported by: kobaz Tested by: dvossel Review: https://reviewboard.asterisk.org/r/456/ ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=239714 By: Digium Subversion (svnbot) 2010-01-13 10:55:36.000-0600 Repository: asterisk Revision: 239716 _U branches/1.6.0/ U branches/1.6.0/Makefile U branches/1.6.0/apps/app_waitforring.c U branches/1.6.0/apps/app_waitforsilence.c U branches/1.6.0/main/channel.c ------------------------------------------------------------------------ r239716 | dvossel | 2010-01-13 10:55:35 -0600 (Wed, 13 Jan 2010) | 30 lines Merged revisions 239712 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r239712 | dvossel | 2010-01-13 10:31:14 -0600 (Wed, 13 Jan 2010) | 24 lines add silence gen to wait apps asterisk.conf's 'transmit_silence' option existed before this patch, but was limited to only generating silence while recording and sending DTMF. Now enabling the transmit_silence option generates silence during wait times as well. To achieve this, ast_safe_sleep has been modified to generate silence anytime no other generators are present and transmit_silence is enabled. Wait apps not using ast_safe_sleep now generate silence when transmit_silence is enabled as well. (closes issue ASTERISK-15378) Reported by: kobaz (closes issue ASTERISK-15377) Reported by: kobaz Tested by: dvossel Review: https://reviewboard.asterisk.org/r/456/ ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=239716 By: Mark Murawski (kobaz) 2010-01-17 11:31:39.000-0600 I think the ultimate fix is a non-blocking read. I was having trouble doing a chanspy whisper on a channel whose far end is not generating audio. Situation: Make a call from line 1 of a polycom phone to another endpoint Switch to line 2, and then back to line1 quickly enough that it triggers a bug in the firmware that doesn't send a sip 'hold' message. So now, there is no audio going to the far end, and I cannot chanspy whisper on the far end, since it's blocking on the audio read. By: Mark Murawski (kobaz) 2010-01-17 11:34:10.000-0600 Er... since the hold was never started on asterisk, moh is not playing, and since the phone thinks it's on another line... it's stopped generating audio. An easy way to replicate this would be to use Wait() from a non-silence-generating version of asterisk. By: David Vossel (dvossel) 2010-01-17 12:33:14.000-0600 The patch I committed for this issue resolves the problem with not being able to whisper to endpoints in Wait(), or any other state where the channel is sleeping for a period of time. To enable this turn on the transmit_silence option in asterisk.conf after applying the patch I committed. |