[svn-commits] mjordan: branch 11 r394303 - in /branches/11: ./ funcs/func_strings.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Jul 13 20:59:21 CDT 2013


Author: mjordan
Date: Sat Jul 13 20:59:19 2013
New Revision: 394303

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394303
Log:
Clarify documentation for function PASSTHRU

It is not apparent to the average user that the PASSTHRU function should not
be passed as ${PASSTHRU(string)} but just as PASSTHRU(string) to functions
which take a variable name and not its contents.

This patch clarifies the behavior in the documentation and provides an example.

(closes issue ASTERISK-21717)
Reported by: Richard Miller
patches:
  func_strings.diff uploaded by Richard Miller (license 5685)
........

Merged revisions 394302 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/11/   (props changed)
    branches/11/funcs/func_strings.c

Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/11/funcs/func_strings.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/funcs/func_strings.c?view=diff&rev=394303&r1=394302&r2=394303
==============================================================================
--- branches/11/funcs/func_strings.c (original)
+++ branches/11/funcs/func_strings.c Sat Jul 13 20:59:19 2013
@@ -165,6 +165,10 @@
 			<para>Literally returns the given <replaceable>string</replaceable>.  The intent is to permit
 			other dialplan functions which take a variable name as an argument to be able to take a literal
 			string, instead.</para>
+			<note><para>The functions which take a variable name need to be passed var and not
+			${var}.  Similarly, use PASSTHRU() and not ${PASSTHRU()}.</para></note>
+			<para>Example: ${CHANNEL} contains SIP/321-1</para>
+			<para>         ${CUT(PASSTHRU(${CUT(CHANNEL,-,1)}),/,2)}) will return 321</para>
 		</description>
 	</function>
 	<function name="REGEX" language="en_US">




More information about the svn-commits mailing list