[asterisk-commits] oej: trunk r114150 - /trunk/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Apr 15 15:31:08 CDT 2008
Author: oej
Date: Tue Apr 15 15:31:08 2008
New Revision: 114150
URL: http://svn.digium.com/view/asterisk?view=rev&rev=114150
Log:
Adding chanvar to SIPPEER from 1.4 branch
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=114150&r1=114149&r2=114150
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Apr 15 15:31:08 2008
@@ -14353,6 +14353,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;
@@ -14397,6 +14405,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