[asterisk-commits] file: branch 1.6.0 r226533 - in /branches/1.6.0: ./ channels/ doc/tex/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 29 13:14:40 CDT 2009


Author: file
Date: Thu Oct 29 13:14:36 2009
New Revision: 226533

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=226533
Log:
Merged revisions 226532 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r226532 | file | 2009-10-29 15:13:42 -0300 (Thu, 29 Oct 2009) | 13 lines
  
  Merged revisions 226531 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r226531 | file | 2009-10-29 15:11:26 -0300 (Thu, 29 Oct 2009) | 6 lines
    
    Add an option to enabling passing music on hold start and stop requests through instead of
    acting on them in chan_local.
    
    (closes issue #14709)
    Reported by: dimas
  ........
................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/channels/chan_local.c
    branches/1.6.0/doc/tex/localchannel.tex

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/channels/chan_local.c?view=diff&rev=226533&r1=226532&r2=226533
==============================================================================
--- branches/1.6.0/channels/chan_local.c (original)
+++ branches/1.6.0/channels/chan_local.c Thu Oct 29 13:14:36 2009
@@ -116,6 +116,7 @@
 #define LOCAL_ALREADY_MASQED  (1 << 2) /*!< Already masqueraded */
 #define LOCAL_LAUNCHED_PBX    (1 << 3) /*!< PBX was launched */
 #define LOCAL_NO_OPTIMIZATION (1 << 4) /*!< Do not optimize using masquerading */
+#define LOCAL_MOH_PASSTHRU    (1 << 6) /*!< Pass through music on hold start/stop frames */
 
 static AST_LIST_HEAD_STATIC(locals, local_pvt);
 
@@ -378,9 +379,9 @@
 		return -1;
 
 	/* If this is an MOH hold or unhold, do it on the Local channel versus real channel */
-	if (condition == AST_CONTROL_HOLD) {
+	if (!ast_test_flag(p, LOCAL_MOH_PASSTHRU) && condition == AST_CONTROL_HOLD) {
 		ast_moh_start(ast, data, NULL);
-	} else if (condition == AST_CONTROL_UNHOLD) {
+	} else if (!ast_test_flag(p, LOCAL_MOH_PASSTHRU) && condition == AST_CONTROL_UNHOLD) {
 		ast_moh_stop(ast);
 	} else {
 		/* Queue up a frame representing the indication as a control frame */
@@ -640,6 +641,9 @@
 					"to use the 'j' option to enable the jitterbuffer\n");
 			}
 		}
+		if (strchr(opts, 'm')) {
+			ast_set_flag(tmp, LOCAL_MOH_PASSTHRU);
+		}
 	}
 
 	/* Look for a context */

Modified: branches/1.6.0/doc/tex/localchannel.tex
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/doc/tex/localchannel.tex?view=diff&rev=226533&r1=226532&r2=226533
==============================================================================
--- branches/1.6.0/doc/tex/localchannel.tex (original)
+++ branches/1.6.0/doc/tex/localchannel.tex Thu Oct 29 13:14:36 2009
@@ -26,6 +26,10 @@
 audio that it receives from the channel that called the local channel.  This is
 especially in the case of putting chan\_local in between an incoming SIP call
 and Asterisk applications, so that the incoming audio will be de-jittered.
+
+Using the "m" option will cause chan_local to forward music on hold start and stop
+requests. Normally chan_local acts on them and it is started or stopped on the
+Local channel itself.
 
 \subsection{Purpose}
 




More information about the asterisk-commits mailing list