summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2006-03-07 09:57:22 +0000
committerOlle Johansson <oej@edvina.net>2006-03-07 09:57:22 +0000
commite3f05acab236a9ac15eb041a82a33dcbec661090 (patch)
tree10c6ff28ca148229111302a17a2a37b7b7d5f015 /channels/chan_sip.c
parentbb92e0ec1f2c706772f5225fda60307e68849320 (diff)
Add accountcode to sip_peer dialplan function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 124052c84..942447744 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -9366,6 +9366,8 @@ static int function_sippeer(struct ast_channel *chan, char *cmd, char *data, cha
snprintf(buf, len, "%d", peer->call_limit);
} else if (!strcasecmp(colname, "curcalls")) {
snprintf(buf, len, "%d", peer->inUse);
+ } else if (!strcasecmp(colname, "accountcode")) {
+ ast_copy_string(buf, peer->accountcode, len);
} else if (!strcasecmp(colname, "useragent")) {
ast_copy_string(buf, peer->useragent, len);
} else if (!strcasecmp(colname, "mailbox")) {
@@ -9424,6 +9426,7 @@ struct ast_custom_function sippeer_function = {
"- curcalls Current amount of calls \n"
" Only available if call-limit is set\n"
"- language Default language for peer\n"
+ "- accountcode Account code for this peer\n"
"- useragent Current user agent id for peer\n"
"- codec[x] Preferred codec index number 'x' (beginning with zero).\n"
"\n"