[asterisk-commits] russell: branch 1.6.0 r114240 - in /branches/1.6.0: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 17 18:08:32 CDT 2008


Author: russell
Date: Thu Apr 17 18:08:31 2008
New Revision: 114240

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

........
r114150 | oej | 2008-04-15 15:31:08 -0500 (Tue, 15 Apr 2008) | 2 lines

Adding chanvar to SIPPEER from 1.4 branch

........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/channels/chan_sip.c

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

Modified: branches/1.6.0/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/channels/chan_sip.c?view=diff&rev=114240&r1=114239&r2=114240
==============================================================================
--- branches/1.6.0/channels/chan_sip.c (original)
+++ branches/1.6.0/channels/chan_sip.c Thu Apr 17 18:08:31 2008
@@ -14258,6 +14258,14 @@
 		ast_copy_string(buf, peer->cid_num, len);
 	} else  if (!strcasecmp(colname, "codecs")) {
 		ast_getformatname_multiple(buf, len -1, peer->capability);
+	} else  if (!strncasecmp(colname, "chanvar[", 8)) {
+		char *chanvar=colname + 8;
+		struct ast_variable *v;
+	
+		chanvar = strsep(&chanvar, "]");
+		for (v = peer->chanvars ; v ; v = v->next)
+			if (strcasecmp(v->name, chanvar) == 0)
+				ast_copy_string(buf, v->value, sizeof(buf));
 	} else  if (!strncasecmp(colname, "codec[", 6)) {
 		char *codecnum;
 		int index = 0, codec = 0;
@@ -14302,6 +14310,7 @@
 	"- language              Default language for peer\n"
 	"- accountcode           Account code for this peer\n"
 	"- useragent             Current user agent id for peer\n"
+	"- chanvar[name]         A channel variable configured with setvar for this peer.\n"
 	"- codec[x]              Preferred codec index number 'x' (beginning with zero).\n"
 	"\n"
 };




More information about the asterisk-commits mailing list