[asterisk-commits] mjordan: trunk r403617 - in /trunk: ./ doc/ funcs/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 11 06:32:00 CST 2013


Author: mjordan
Date: Wed Dec 11 06:31:57 2013
New Revision: 403617

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=403617
Log:
func_pjsip_endpoint: Add PJSIP_ENDPOINT function for querying endpoint details

This patch adds a new function, PJSIP_ENDPOINT, which lets the dialplan query,
for any endpoint, any property configured on an endpoint. This function is a
companion to the CHANNEL function, which can be used to extract the endpoint
name for a channel.

Review: https://reviewboard.asterisk.org/r/3035
........

Merged revisions 403616 from http://svn.asterisk.org/svn/asterisk/branches/12

Added:
    trunk/doc/appdocsxml.xslt
      - copied unchanged from r403616, branches/12/doc/appdocsxml.xslt
    trunk/funcs/func_pjsip_endpoint.c
      - copied unchanged from r403616, branches/12/funcs/func_pjsip_endpoint.c
Removed:
    trunk/doc/snapshots.xslt
Modified:
    trunk/   (props changed)
    trunk/Makefile
    trunk/doc/appdocsxml.dtd
    trunk/main/sorcery.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Wed Dec 11 06:31:57 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-403290,403292-403398,403435,403458,403510,403527,403541-403542,403545,403559,403587
+/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-403290,403292-403398,403435,403458,403510,403527,403541-403542,403545,403559,403587,403616

Modified: trunk/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/Makefile?view=diff&rev=403617&r1=403616&r2=403617
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Wed Dec 11 06:31:57 2013
@@ -448,7 +448,7 @@
 		fi \
 	done
 	$(INSTALL) -m 644 doc/core-en_US.xml "$(DESTDIR)$(ASTDATADIR)/static-http";
-	$(INSTALL) -m 644 doc/snapshots.xslt "$(DESTDIR)$(ASTDATADIR)/static-http";
+	$(INSTALL) -m 644 doc/appdocsxml.xslt "$(DESTDIR)$(ASTDATADIR)/static-http";
 	if [ -d doc/tex/asterisk ] ; then \
 		$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http/docs" ; \
 		for n in doc/tex/asterisk/* ; do \
@@ -471,7 +471,7 @@
 	@printf "Building Documentation For: "
 	@echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
 	@echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
-	@echo "<?xml-stylesheet type=\"text/xsl\" href=\"snapshots.xslt\"?>" > $@
+	@echo "<?xml-stylesheet type=\"text/xsl\" href=\"appdocsxml.xslt\"?>" > $@
 	@echo "<docs xmlns:xi=\"http://www.w3.org/2001/XInclude\">" >> $@
 	@for x in $(MOD_SUBDIRS); do \
 		printf "$$x " ; \
@@ -495,7 +495,7 @@
 	@printf "Building Documentation For: "
 	@echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
 	@echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
-	@echo "<?xml-stylesheet type=\"text/xsl\" href=\"snapshots.xslt\"?>" > $@
+	@echo "<?xml-stylesheet type=\"text/xsl\" href=\"appdocsxml.xslt\"?>" > $@
 	@echo "<docs xmlns:xi=\"http://www.w3.org/2001/XInclude\">" >> $@
 	@for x in $(MOD_SUBDIRS); do \
 		printf "$$x " ; \
@@ -578,7 +578,7 @@
 	fi
 
 	$(INSTALL) -m 644 doc/core-*.xml "$(DESTDIR)$(ASTDATADIR)/documentation"
-	$(INSTALL) -m 644 doc/snapshots.xslt "$(DESTDIR)$(ASTDATADIR)/documentation"
+	$(INSTALL) -m 644 doc/appdocsxml.xslt "$(DESTDIR)$(ASTDATADIR)/documentation"
 	$(INSTALL) -m 644 doc/appdocsxml.dtd "$(DESTDIR)$(ASTDATADIR)/documentation"
 	$(INSTALL) -m 644 doc/asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"
 	$(INSTALL) -m 644 doc/astdb*.8 "$(DESTDIR)$(ASTMANDIR)/man8"

Modified: trunk/doc/appdocsxml.dtd
URL: http://svnview.digium.com/svn/asterisk/trunk/doc/appdocsxml.dtd?view=diff&rev=403617&r1=403616&r2=403617
==============================================================================
--- trunk/doc/appdocsxml.dtd (original)
+++ trunk/doc/appdocsxml.dtd Wed Dec 11 06:31:57 2013
@@ -85,6 +85,9 @@
   <!ELEMENT bridge_snapshot (#PCDATA)>
   <!ATTLIST bridge_snapshot prefix CDATA "">
 
+  <!ELEMENT configOptionToEnum (configOption|xi:include)*>
+  <!ATTLIST configOptionToEnum prefix CDATA "">
+
   <!ELEMENT description (para|note|warning|variablelist|enumlist|info|xi:include)*>
 
   <!ELEMENT parameter (optionlist|enumlist|argument|para|note|warning|parameter|info|xi:include)*>
@@ -103,7 +106,7 @@
   <!ATTLIST option implies CDATA "">
   <!ATTLIST option hasparams CDATA "">
 
-  <!ELEMENT enumlist (enum+)>
+  <!ELEMENT enumlist (configOptionToEnum|enum+)>
   <!ELEMENT enum (para|note|warning|parameter|enumlist|info|xi:include)*>
   <!ATTLIST enum name CDATA "">
 

Modified: trunk/main/sorcery.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/sorcery.c?view=diff&rev=403617&r1=403616&r2=403617
==============================================================================
--- trunk/main/sorcery.c (original)
+++ trunk/main/sorcery.c Wed Dec 11 06:31:57 2013
@@ -34,6 +34,8 @@
 #include "asterisk/logger.h"
 #include "asterisk/sorcery.h"
 #include "asterisk/astobj2.h"
+#include "asterisk/format.h"
+#include "asterisk/format_cap.h"
 #include "asterisk/strings.h"
 #include "asterisk/config_options.h"
 #include "asterisk/netsock2.h"
@@ -217,11 +219,19 @@
 	return !(*buf = ast_strdup(field)) ? -1 : 0;
 }
 
+static int codec_handler_fn(const void *obj, const intptr_t *args, char **buf)
+{
+	char tmp_buf[256];
+	struct ast_format_cap **cap = (struct ast_format_cap **)(obj + args[1]);
+	return !(*buf = ast_strdup(ast_getformatname_multiple(tmp_buf, sizeof(tmp_buf), *cap)));
+}
+
 static sorcery_field_handler sorcery_field_default_handler(enum aco_option_type type)
 {
 	switch(type) {
 	case OPT_BOOL_T: return bool_handler_fn;
 	case OPT_CHAR_ARRAY_T: return chararray_handler_fn;
+	case OPT_CODEC_T: return codec_handler_fn;
 	case OPT_DOUBLE_T: return double_handler_fn;
 	case OPT_INT_T: return int_handler_fn;
 	case OPT_SOCKADDR_T: return sockaddr_handler_fn;




More information about the asterisk-commits mailing list