[asterisk-commits] may: branch may/ooh323_ipv6_direct_rtp r321269 - in /team/may/ooh323_ipv6_dir...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 27 07:50:06 CDT 2011
Author: may
Date: Fri May 27 07:49:58 2011
New Revision: 321269
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321269
Log:
Merged revisions 313367 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r313367 | rmudgett | 2011-04-12 02:28:43 +0400 (Tue, 12 Apr 2011) | 9 lines
Merged revisions 313366 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r313366 | rmudgett | 2011-04-11 17:27:25 -0500 (Mon, 11 Apr 2011) | 2 lines
Added "Connected Line ID" and "Connected Line ID Name" to "core show channel" output.
........
................
Modified:
team/may/ooh323_ipv6_direct_rtp/ (props changed)
team/may/ooh323_ipv6_direct_rtp/CHANGES
team/may/ooh323_ipv6_direct_rtp/CREDITS
team/may/ooh323_ipv6_direct_rtp/apps/app_dial.c
team/may/ooh323_ipv6_direct_rtp/apps/app_dumpchan.c
team/may/ooh323_ipv6_direct_rtp/apps/app_meetme.c
team/may/ooh323_ipv6_direct_rtp/channels/chan_dahdi.c
team/may/ooh323_ipv6_direct_rtp/channels/chan_iax2.c
team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c
team/may/ooh323_ipv6_direct_rtp/channels/sip/include/sip.h
Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri May 27 07:49:58 2011
@@ -1,1 +1,1 @@
-/trunk:1-313143,313191,313280
+/trunk:1-313143,313191,313280,313367
Modified: team/may/ooh323_ipv6_direct_rtp/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/CHANGES?view=diff&rev=321269&r1=321268&r2=321269
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/CHANGES (original)
+++ team/may/ooh323_ipv6_direct_rtp/CHANGES Fri May 27 07:49:58 2011
@@ -23,6 +23,9 @@
for chan_dahdi ISDN channels.
* Added new action MeetmeListRooms to list active conferences (shows same
data as "meetme list" at the CLI).
+ * DAHDIShowChannels, SIPshowpeer, SIPpeers, and IAXpeers now contains a
+ Description field that is set by 'description' in the channel configuration
+ file.
Asterisk HTTP Server
--------------------------
@@ -41,6 +44,9 @@
alternate configuration file to use.
* 'dialplan add extension' command will now automatically create a context if
the specified context does not exist with a message indicated it did so.
+ * 'sip show peers', 'iax show peers', and 'dahdi show peers' now contains a
+ Description field which can be populated with 'description' in the channel
+ configuration files (sip.conf, iax2.conf, and chan_dahdi.conf).
CDR
--------------------------
Modified: team/may/ooh323_ipv6_direct_rtp/CREDITS
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/CREDITS?view=diff&rev=321269&r1=321268&r2=321269
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/CREDITS (original)
+++ team/may/ooh323_ipv6_direct_rtp/CREDITS Fri May 27 07:49:58 2011
@@ -222,6 +222,8 @@
Despegar.com, Argentina - AstData API implementation, also sponsored by Google as part of the
gsoc/2009 program (developed by Eliel)
+Philippe Lindheimer - DEV_STATE additions to CCSS
+
=== OTHER CONTRIBUTIONS ===
John Todd - Monkey sounds and associated teletorture prompt
Michael Jerris - bug marshaling
Modified: team/may/ooh323_ipv6_direct_rtp/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/apps/app_dial.c?view=diff&rev=321269&r1=321268&r2=321269
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/apps/app_dial.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/apps/app_dial.c Fri May 27 07:49:58 2011
@@ -1418,12 +1418,17 @@
}
}
- if (single) {
+ /* Send the frame from the in channel to all outgoing channels. */
+ for (o = outgoing; o; o = o->next) {
+ if (!o->chan || !ast_test_flag64(o, DIAL_STILLGOING)) {
+ /* This outgoing channel has died so don't send the frame to it. */
+ continue;
+ }
switch (f->frametype) {
case AST_FRAME_HTML:
/* Forward HTML stuff */
- if (!ast_test_flag64(outgoing, DIAL_NOFORWARDHTML)
- && ast_channel_sendhtml(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen) == -1) {
+ if (!ast_test_flag64(o, DIAL_NOFORWARDHTML)
+ && ast_channel_sendhtml(o->chan, f->subclass.integer, f->data.ptr, f->datalen) == -1) {
ast_log(LOG_WARNING, "Unable to send URL\n");
}
break;
@@ -1432,7 +1437,7 @@
case AST_FRAME_TEXT:
case AST_FRAME_DTMF_BEGIN:
case AST_FRAME_DTMF_END:
- if (ast_write(outgoing->chan, f)) {
+ if (ast_write(o->chan, f)) {
ast_log(LOG_WARNING, "Unable to forward frametype: %d\n",
f->frametype);
}
@@ -1443,17 +1448,18 @@
case AST_CONTROL_UNHOLD:
case AST_CONTROL_VIDUPDATE:
case AST_CONTROL_SRCUPDATE:
- ast_verb(3, "%s requested special control %d, passing it to %s\n", in->name, f->subclass.integer, outgoing->chan->name);
- ast_indicate_data(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen);
+ ast_verb(3, "%s requested special control %d, passing it to %s\n",
+ in->name, f->subclass.integer, o->chan->name);
+ ast_indicate_data(o->chan, f->subclass.integer, f->data.ptr, f->datalen);
break;
case AST_CONTROL_CONNECTED_LINE:
- if (ast_channel_connected_line_macro(in, outgoing->chan, f, 0, 1)) {
- ast_indicate_data(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen);
+ if (ast_channel_connected_line_macro(in, o->chan, f, 0, 1)) {
+ ast_indicate_data(o->chan, f->subclass.integer, f->data.ptr, f->datalen);
}
break;
case AST_CONTROL_REDIRECTING:
- if (ast_channel_redirecting_macro(in, outgoing->chan, f, 0, 1)) {
- ast_indicate_data(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen);
+ if (ast_channel_redirecting_macro(in, o->chan, f, 0, 1)) {
+ ast_indicate_data(o->chan, f->subclass.integer, f->data.ptr, f->datalen);
}
break;
default:
Modified: team/may/ooh323_ipv6_direct_rtp/apps/app_dumpchan.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/apps/app_dumpchan.c?view=diff&rev=321269&r1=321268&r2=321269
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/apps/app_dumpchan.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/apps/app_dumpchan.c Fri May 27 07:49:58 2011
@@ -36,6 +36,7 @@
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/app.h"
+#include "asterisk/translate.h"
/*** DOCUMENTATION
<application name="DumpChan" language="en_US">
@@ -67,9 +68,11 @@
struct timeval now;
long elapsed_seconds = 0;
int hour = 0, min = 0, sec = 0;
- char cgrp[BUFSIZ/2];
- char pgrp[BUFSIZ/2];
- char formatbuf[BUFSIZ/2];
+ char nf[256];
+ char cgrp[256];
+ char pgrp[256];
+ struct ast_str *write_transpath = ast_str_alloca(256);
+ struct ast_str *read_transpath = ast_str_alloca(256);
now = ast_tvnow();
memset(buf, 0, size);
@@ -84,65 +87,83 @@
}
snprintf(buf,size,
- "Name= %s\n"
- "Type= %s\n"
- "UniqueID= %s\n"
- "CallerIDNum= %s\n"
- "CallerIDName= %s\n"
- "DNIDDigits= %s\n"
- "RDNIS= %s\n"
- "Parkinglot= %s\n"
- "Language= %s\n"
- "State= %s (%d)\n"
- "Rings= %d\n"
- "NativeFormat= %s\n"
- "WriteFormat= %s\n"
- "ReadFormat= %s\n"
- "RawWriteFormat= %s\n"
- "RawReadFormat= %s\n"
- "1stFileDescriptor= %d\n"
- "Framesin= %d %s\n"
- "Framesout= %d %s\n"
- "TimetoHangup= %ld\n"
- "ElapsedTime= %dh%dm%ds\n"
- "Context= %s\n"
- "Extension= %s\n"
- "Priority= %d\n"
- "CallGroup= %s\n"
- "PickupGroup= %s\n"
- "Application= %s\n"
- "Data= %s\n"
- "Blocking_in= %s\n",
- c->name,
- c->tech->type,
- c->uniqueid,
- S_COR(c->caller.id.number.valid, c->caller.id.number.str, "(N/A)"),
- S_COR(c->caller.id.name.valid, c->caller.id.name.str, "(N/A)"),
- S_OR(c->dialed.number.str, "(N/A)"),
- S_COR(c->redirecting.from.number.valid, c->redirecting.from.number.str, "(N/A)"),
- c->parkinglot,
- c->language,
- ast_state2str(c->_state),
- c->_state,
- c->rings,
- ast_getformatname_multiple(formatbuf, sizeof(formatbuf), c->nativeformats),
- ast_getformatname(&c->writeformat),
- ast_getformatname(&c->readformat),
- ast_getformatname(&c->rawwriteformat),
- ast_getformatname(&c->rawreadformat),
- c->fds[0], c->fin & ~DEBUGCHAN_FLAG, (c->fin & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "",
- c->fout & ~DEBUGCHAN_FLAG, (c->fout & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "", (long)c->whentohangup.tv_sec,
- hour,
- min,
- sec,
- c->context,
- c->exten,
- c->priority,
- ast_print_group(cgrp, sizeof(cgrp), c->callgroup),
- ast_print_group(pgrp, sizeof(pgrp), c->pickupgroup),
- ( c->appl ? c->appl : "(N/A)" ),
- ( c-> data ? S_OR(c->data, "(Empty)") : "(None)"),
- (ast_test_flag(c, AST_FLAG_BLOCKING) ? c->blockproc : "(Not Blocking)"));
+ "Name= %s\n"
+ "Type= %s\n"
+ "UniqueID= %s\n"
+ "LinkedID= %s\n"
+ "CallerIDNum= %s\n"
+ "CallerIDName= %s\n"
+ "ConnectedLineIDNum= %s\n"
+ "ConnectedLineIDName=%s\n"
+ "DNIDDigits= %s\n"
+ "RDNIS= %s\n"
+ "Parkinglot= %s\n"
+ "Language= %s\n"
+ "State= %s (%d)\n"
+ "Rings= %d\n"
+ "NativeFormat= %s\n"
+ "WriteFormat= %s\n"
+ "ReadFormat= %s\n"
+ "RawWriteFormat= %s\n"
+ "RawReadFormat= %s\n"
+ "WriteTranscode= %s %s\n"
+ "ReadTranscode= %s %s\n"
+ "1stFileDescriptor= %d\n"
+ "Framesin= %d %s\n"
+ "Framesout= %d %s\n"
+ "TimetoHangup= %ld\n"
+ "ElapsedTime= %dh%dm%ds\n"
+ "DirectBridge= %s\n"
+ "IndirectBridge= %s\n"
+ "Context= %s\n"
+ "Extension= %s\n"
+ "Priority= %d\n"
+ "CallGroup= %s\n"
+ "PickupGroup= %s\n"
+ "Application= %s\n"
+ "Data= %s\n"
+ "Blocking_in= %s\n",
+ c->name,
+ c->tech->type,
+ c->uniqueid,
+ c->linkedid,
+ S_COR(c->caller.id.number.valid, c->caller.id.number.str, "(N/A)"),
+ S_COR(c->caller.id.name.valid, c->caller.id.name.str, "(N/A)"),
+ S_COR(c->connected.id.number.valid, c->connected.id.number.str, "(N/A)"),
+ S_COR(c->connected.id.name.valid, c->connected.id.name.str, "(N/A)"),
+ S_OR(c->dialed.number.str, "(N/A)"),
+ S_COR(c->redirecting.from.number.valid, c->redirecting.from.number.str, "(N/A)"),
+ c->parkinglot,
+ c->language,
+ ast_state2str(c->_state),
+ c->_state,
+ c->rings,
+ ast_getformatname_multiple(nf, sizeof(nf), c->nativeformats),
+ ast_getformatname(&c->writeformat),
+ ast_getformatname(&c->readformat),
+ ast_getformatname(&c->rawwriteformat),
+ ast_getformatname(&c->rawreadformat),
+ c->writetrans ? "Yes" : "No",
+ ast_translate_path_to_str(c->writetrans, &write_transpath),
+ c->readtrans ? "Yes" : "No",
+ ast_translate_path_to_str(c->readtrans, &read_transpath),
+ c->fds[0],
+ c->fin & ~DEBUGCHAN_FLAG, (c->fin & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "",
+ c->fout & ~DEBUGCHAN_FLAG, (c->fout & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "",
+ (long)c->whentohangup.tv_sec,
+ hour,
+ min,
+ sec,
+ c->_bridge ? c->_bridge->name : "<none>",
+ ast_bridged_channel(c) ? ast_bridged_channel(c)->name : "<none>",
+ c->context,
+ c->exten,
+ c->priority,
+ ast_print_group(cgrp, sizeof(cgrp), c->callgroup),
+ ast_print_group(pgrp, sizeof(pgrp), c->pickupgroup),
+ c->appl ? c->appl : "(N/A)",
+ c->data ? S_OR(c->data, "(Empty)") : "(None)",
+ (ast_test_flag(c, AST_FLAG_BLOCKING) ? c->blockproc : "(Not Blocking)"));
return 0;
}
@@ -150,7 +171,7 @@
static int dumpchan_exec(struct ast_channel *chan, const char *data)
{
struct ast_str *vars = ast_str_thread_get(&ast_str_thread_global_buf, 16);
- char info[1024];
+ char info[2048];
int level = 0;
static char *line = "================================================================================";
@@ -160,7 +181,13 @@
if (option_verbose >= level) {
serialize_showchan(chan, info, sizeof(info));
pbx_builtin_serialize_variables(chan, &vars);
- ast_verbose("\nDumping Info For Channel: %s:\n%s\nInfo:\n%s\nVariables:\n%s%s\n", chan->name, line, info, ast_str_buffer(vars), line);
+ ast_verbose("\n"
+ "Dumping Info For Channel: %s:\n"
+ "%s\n"
+ "Info:\n"
+ "%s\n"
+ "Variables:\n"
+ "%s%s\n", chan->name, line, info, ast_str_buffer(vars), line);
}
return 0;
Modified: team/may/ooh323_ipv6_direct_rtp/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/apps/app_meetme.c?view=diff&rev=321269&r1=321268&r2=321269
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/apps/app_meetme.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/apps/app_meetme.c Fri May 27 07:49:58 2011
@@ -1370,6 +1370,7 @@
AST_LIST_UNLOCK(&confs);
return usr ? ast_strdup(usrno) : NULL;
}
+ AST_LIST_UNLOCK(&confs);
}
}
Modified: team/may/ooh323_ipv6_direct_rtp/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/channels/chan_dahdi.c?view=diff&rev=321269&r1=321268&r2=321269
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/channels/chan_dahdi.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/channels/chan_dahdi.c Fri May 27 07:49:58 2011
@@ -979,6 +979,11 @@
* \note The "context" string read in from chan_dahdi.conf
*/
char context[AST_MAX_CONTEXT];
+ /*!
+ * \brief A description for the channel configuration
+ * \note The "description" string read in from chan_dahdi.conf
+ */
+ char description[32];
/*!
* \brief Saved context string.
*/
@@ -1276,6 +1281,7 @@
MEMBER(dahdi_pvt, use_smdi, AST_DATA_BOOLEAN) \
MEMBER(dahdi_pvt, context, AST_DATA_STRING) \
MEMBER(dahdi_pvt, defcontext, AST_DATA_STRING) \
+ MEMBER(dahdi_pvt, description, AST_DATA_STRING) \
MEMBER(dahdi_pvt, exten, AST_DATA_STRING) \
MEMBER(dahdi_pvt, language, AST_DATA_STRING) \
MEMBER(dahdi_pvt, mohinterpret, AST_DATA_STRING) \
@@ -12138,6 +12144,12 @@
if (tmp) {
int chan_sig = conf->chan.sig;
+ /* If there are variables in tmp before it is updated to match the new config, clear them */
+ if (reloading && tmp->vars) {
+ ast_variables_destroy(tmp->vars);
+ tmp->vars = NULL;
+ }
+
if (!here) {
/* Can only get here if this is a new channel interface being created. */
if ((channel != CHAN_PSEUDO)) {
@@ -12676,6 +12688,7 @@
ast_copy_string(tmp->mohinterpret, conf->chan.mohinterpret, sizeof(tmp->mohinterpret));
ast_copy_string(tmp->mohsuggest, conf->chan.mohsuggest, sizeof(tmp->mohsuggest));
ast_copy_string(tmp->context, conf->chan.context, sizeof(tmp->context));
+ ast_copy_string(tmp->description, conf->chan.description, sizeof(tmp->description));
ast_copy_string(tmp->parkinglot, conf->chan.parkinglot, sizeof(tmp->parkinglot));
tmp->cid_ton = 0;
if (analog_lib_handles(tmp->sig, tmp->radio, tmp->oprmode)) {
@@ -14989,8 +15002,8 @@
static char *dahdi_show_channels(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
-#define FORMAT "%7s %-10.10s %-15.15s %-10.10s %-20.20s %-10.10s %-10.10s\n"
-#define FORMAT2 "%7s %-10.10s %-15.15s %-10.10s %-20.20s %-10.10s %-10.10s\n"
+#define FORMAT "%7s %-10.10s %-15.15s %-10.10s %-20.20s %-10.10s %-10.10s %-32.32s\n"
+#define FORMAT2 "%7s %-10.10s %-15.15s %-10.10s %-20.20s %-10.10s %-10.10s %-32.32s\n"
unsigned int targetnum = 0;
int filtertype = 0;
struct dahdi_pvt *tmp = NULL;
@@ -15027,7 +15040,7 @@
}
}
- ast_cli(a->fd, FORMAT2, "Chan", "Extension", "Context", "Language", "MOH Interpret", "Blocked", "State");
+ ast_cli(a->fd, FORMAT2, "Chan", "Extension", "Context", "Language", "MOH Interpret", "Blocked", "State", "Description");
ast_mutex_lock(&iflock);
for (tmp = iflist; tmp; tmp = tmp->next) {
if (filtertype) {
@@ -15065,7 +15078,7 @@
snprintf(statestr, sizeof(statestr), "%s", "In Service");
- ast_cli(a->fd, FORMAT, tmps, tmp->exten, tmp->context, tmp->language, tmp->mohinterpret, blockstr, statestr);
+ ast_cli(a->fd, FORMAT, tmps, tmp->exten, tmp->context, tmp->language, tmp->mohinterpret, blockstr, statestr, tmp->description);
}
ast_mutex_unlock(&iflock);
return CLI_SUCCESS;
@@ -15101,6 +15114,7 @@
for (tmp = iflist; tmp; tmp = tmp->next) {
if (tmp->channel == channel) {
ast_cli(a->fd, "Channel: %d\n", tmp->channel);
+ ast_cli(a->fd, "Description: %s\n", tmp->description);
ast_cli(a->fd, "File Descriptor: %d\n", tmp->subs[SUB_REAL].dfd);
ast_cli(a->fd, "Span: %d\n", tmp->span);
ast_cli(a->fd, "Extension: %s\n", tmp->exten);
@@ -15806,6 +15820,7 @@
"Context: %s\r\n"
"DND: %s\r\n"
"Alarm: %s\r\n"
+ "Description: %s\r\n"
"%s"
"\r\n",
tmp->channel,
@@ -15816,7 +15831,8 @@
tmp->sig,
tmp->context,
dahdi_dnd(tmp, -1) ? "Enabled" : "Disabled",
- alarm2str(alm), idText);
+ alarm2str(alm),
+ tmp->description, idText);
} else {
astman_append(s,
"Event: DAHDIShowChannels\r\n"
@@ -15826,12 +15842,14 @@
"Context: %s\r\n"
"DND: %s\r\n"
"Alarm: %s\r\n"
+ "Description: %s\r\n"
"%s"
"\r\n",
tmp->channel, sig2str(tmp->sig), tmp->sig,
tmp->context,
dahdi_dnd(tmp, -1) ? "Enabled" : "Disabled",
- alarm2str(alm), idText);
+ alarm2str(alm),
+ tmp->description, idText);
}
}
}
@@ -16830,6 +16848,8 @@
confp->chan.dtmfrelax = 0;
} else if (!strcasecmp(v->name, "mailbox")) {
ast_copy_string(confp->chan.mailbox, v->value, sizeof(confp->chan.mailbox));
+ } else if (!strcasecmp(v->name, "description")) {
+ ast_copy_string(confp->chan.description, v->value, sizeof(confp->chan.description));
} else if (!strcasecmp(v->name, "hasvoicemail")) {
if (ast_true(v->value) && ast_strlen_zero(confp->chan.mailbox)) {
ast_copy_string(confp->chan.mailbox, cat, sizeof(confp->chan.mailbox));
@@ -17817,6 +17837,13 @@
} else if (!(options & PROC_DAHDI_OPT_NOWARN) )
ast_log(LOG_WARNING, "Ignoring any changes to '%s' (on reload) at line %d.\n", v->name, v->lineno);
}
+
+ /* Since confp has already filled invidual dahdi_pvt objects with channels at this point, clear the variables in confp's pvt. */
+ if (confp->chan.vars) {
+ ast_variables_destroy(confp->chan.vars);
+ confp->chan.vars = NULL;
+ }
+
if (dahdichan[0]) {
/* The user has set 'dahdichan' */
/*< \todo pass proper line number instead of 0 */
Modified: team/may/ooh323_ipv6_direct_rtp/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/channels/chan_iax2.c?view=diff&rev=321269&r1=321268&r2=321269
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/channels/chan_iax2.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/channels/chan_iax2.c Fri May 27 07:49:58 2011
@@ -484,6 +484,7 @@
AST_DECLARE_STRING_FIELDS(
AST_STRING_FIELD(name);
AST_STRING_FIELD(username);
+ AST_STRING_FIELD(description); /*!< Description of the peer */
AST_STRING_FIELD(secret);
AST_STRING_FIELD(dbsecret);
AST_STRING_FIELD(outkey); /*!< What key we use to talk to this peer */
@@ -3837,6 +3838,7 @@
encmethods_to_str(peer->encmethods, encmethods);
ast_cli(a->fd, "\n\n");
ast_cli(a->fd, " * Name : %s\n", peer->name);
+ ast_cli(a->fd, " Description : %s\n", peer->description);
ast_cli(a->fd, " Secret : %s\n", ast_strlen_zero(peer->secret) ? "<Not set>" : "<Set>");
ast_cli(a->fd, " Context : %s\n", peer->context);
ast_cli(a->fd, " Parking lot : %s\n", peer->parkinglot);
@@ -6712,8 +6714,8 @@
int unmonitored_peers = 0;
struct ao2_iterator i;
-#define FORMAT2 "%-15.15s %-15.15s %s %-15.15s %-8s %s %-10s\n"
-#define FORMAT "%-15.15s %-15.15s %s %-15.15s %-5d%s %s %-10s\n"
+#define FORMAT2 "%-15.15s %-15.15s %s %-15.15s %-8s %s %-11s %-32.32s\n"
+#define FORMAT "%-15.15s %-15.15s %s %-15.15s %-5d%s %s %-11s %-32.32s\n"
struct iax2_peer *peer = NULL;
char name[256];
@@ -6755,7 +6757,7 @@
if (!s)
- ast_cli(fd, FORMAT2, "Name/Username", "Host", " ", "Mask", "Port", " ", "Status");
+ ast_cli(fd, FORMAT2, "Name/Username", "Host", " ", "Mask", "Port", " ", "Status", "Description");
i = ao2_iterator_init(peers, 0);
for (peer = ao2_iterator_next(&i); peer;
@@ -6801,7 +6803,8 @@
"Dynamic: %s\r\n"
"Trunk: %s\r\n"
"Encryption: %s\r\n"
- "Status: %s\r\n\r\n",
+ "Status: %s\r\n"
+ "Description: %s\r\n\r\n",
idtext,
name,
ast_sockaddr_stringify_addr(&peer->addr),
@@ -6809,7 +6812,8 @@
ast_test_flag64(peer, IAX_DYNAMIC) ? "yes" : "no",
ast_test_flag64(peer, IAX_TRUNK) ? "yes" : "no",
peer->encmethods ? ast_str_buffer(encmethods) : "no",
- status);
+ status,
+ peer->description);
} else {
ast_cli(fd, FORMAT, name,
ast_sockaddr_stringify_addr(&peer->addr),
@@ -6818,7 +6822,8 @@
ast_sockaddr_port(&peer->addr),
ast_test_flag64(peer, IAX_TRUNK) ? "(T)" : " ",
peer->encmethods ? "(E)" : " ",
- status);
+ status,
+ peer->description);
}
total_peers++;
}
@@ -12459,6 +12464,8 @@
ast_string_field_set(peer, mohsuggest, v->value);
} else if (!strcasecmp(v->name, "dbsecret")) {
ast_string_field_set(peer, dbsecret, v->value);
+ } else if (!strcasecmp(v->name, "description")) {
+ ast_string_field_set(peer, description, v->value);
} else if (!strcasecmp(v->name, "trunk")) {
ast_set2_flag64(peer, ast_true(v->value), IAX_TRUNK);
if (ast_test_flag64(peer, IAX_TRUNK) && !timer) {
Modified: team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c?view=diff&rev=321269&r1=321268&r2=321269
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c Fri May 27 07:49:58 2011
@@ -15997,8 +15997,8 @@
struct ao2_iterator i;
/* the last argument is left-aligned, so we don't need a size anyways */
-#define FORMAT2 "%-25.25s %-39.39s %-3.3s %-10.10s %-3.3s %-8s %-10s %s\n"
-#define FORMAT "%-25.25s %-39.39s %-3.3s %-3.3s %-3.3s %-8d %-10s %s\n"
+#define FORMAT2 "%-25.25s %-39.39s %-3.3s %-10.10s %-3.3s %-8s %-11s %-32.32s %s\n"
+#define FORMAT "%-25.25s %-39.39s %-3.3s %-10.10s %-3.3s %-8d %-11s %-32.32s %s\n"
char name[256];
int total_peers = 0;
@@ -16038,7 +16038,7 @@
}
if (!s) /* Normal list */
- ast_cli(fd, FORMAT2, "Name/username", "Host", "Dyn", "Forcerport", "ACL", "Port", "Status", (realtimepeers ? "Realtime" : ""));
+ ast_cli(fd, FORMAT2, "Name/username", "Host", "Dyn", "Forcerport", "ACL", "Port", "Status", "Description", (realtimepeers ? "Realtime" : ""));
i = ao2_iterator_init(peers, 0);
@@ -16103,6 +16103,7 @@
ast_test_flag(&peer->flags[0], SIP_NAT_FORCE_RPORT) ? " N " : " ", /* NAT=yes? */
peer->ha ? " A " : " ", /* permit/deny */
ast_sockaddr_isnull(&peer->addr) ? 0 : ast_sockaddr_port(&peer->addr), status,
+ peer->description ? peer->description : "",
realtimepeers ? (peer->is_realtime ? "Cached RT":"") : "");
if (!s) {/* Normal CLI list */
@@ -16112,6 +16113,7 @@
ast_test_flag(&peer->flags[0], SIP_NAT_FORCE_RPORT) ? " N " : " ", /* NAT=yes? */
peer->ha ? " A " : " ", /* permit/deny */
ast_sockaddr_isnull(&peer->addr) ? 0 : ast_sockaddr_port(&peer->addr), status,
+ peer->description ? peer->description : "",
realtimepeers ? (peer->is_realtime ? "Cached RT":"") : "");
} else { /* Manager format */
/* The names here need to be the same as other channels */
@@ -16128,7 +16130,8 @@
"TextSupport: %s\r\n"
"ACL: %s\r\n"
"Status: %s\r\n"
- "RealtimeDevice: %s\r\n\r\n",
+ "RealtimeDevice: %s\r\n"
+ "Description: %s\r\n\r\n",
idtext,
peer->name,
ast_sockaddr_isnull(&peer->addr) ? "-none-" : ast_sockaddr_stringify_fmt(&peer->addr, AST_SOCKADDR_STR_HOST),
@@ -16139,7 +16142,8 @@
ast_test_flag(&peer->flags[1], SIP_PAGE2_TEXTSUPPORT) ? "yes" : "no", /* TEXTSUPPORT=yes? */
peer->ha ? "yes" : "no", /* permit/deny */
status,
- realtimepeers ? (peer->is_realtime ? "yes":"no") : "no");
+ realtimepeers ? (peer->is_realtime ? "yes":"no") : "no",
+ peer->description);
}
ao2_unlock(peer);
unref_peer(peer, "toss iterator peer ptr");
@@ -16717,6 +16721,7 @@
struct ast_str *mailbox_str = ast_str_alloca(512);
ast_cli(fd, "\n\n");
ast_cli(fd, " * Name : %s\n", peer->name);
+ ast_cli(fd, " Description : %s\n", peer->description);
if (realtimepeers) { /* Realtime is enabled */
ast_cli(fd, " Realtime peer: %s\n", peer->is_realtime ? "Yes, cached" : "No");
}
@@ -16924,7 +16929,8 @@
astman_append(s, "ChanVariable: %s=%s\r\n", v->name, v->value);
}
}
- astman_append(s, "SIP-Use-Reason-Header : %s\n", (ast_test_flag(&peer->flags[1], SIP_PAGE2_Q850_REASON)) ? "Y" : "N");
+ astman_append(s, "SIP-Use-Reason-Header : %s\r\n", (ast_test_flag(&peer->flags[1], SIP_PAGE2_Q850_REASON)) ? "Y" : "N");
+ astman_append(s, "Description : %s\r\n", peer->description);
peer = unref_peer(peer, "sip_show_peer: unref_peer: done with peer");
@@ -26105,6 +26111,7 @@
peer->call_limit=INT_MAX;
ast_string_field_set(peer, vmexten, default_vmexten);
ast_string_field_set(peer, secret, "");
+ ast_string_field_set(peer, description, "");
ast_string_field_set(peer, remotesecret, "");
ast_string_field_set(peer, md5secret, "");
ast_string_field_set(peer, cid_num, "");
@@ -26347,6 +26354,8 @@
ast_string_field_set(peer, remotesecret, v->value);
} else if (!strcasecmp(v->name, "secret")) {
ast_string_field_set(peer, secret, v->value);
+ } else if (!strcasecmp(v->name, "description")) {
+ ast_string_field_set(peer, description, v->value);
} else if (!strcasecmp(v->name, "md5secret")) {
ast_string_field_set(peer, md5secret, v->value);
} else if (!strcasecmp(v->name, "auth")) {
@@ -29093,7 +29102,8 @@
MEMBER(sip_peer, maxms, AST_DATA_MILLISECONDS) \
MEMBER(sip_peer, qualifyfreq, AST_DATA_MILLISECONDS) \
MEMBER(sip_peer, timer_t1, AST_DATA_MILLISECONDS) \
- MEMBER(sip_peer, timer_b, AST_DATA_MILLISECONDS)
+ MEMBER(sip_peer, timer_b, AST_DATA_MILLISECONDS) \
+ MEMBER(sip_peer, description, AST_DATA_STRING)
AST_DATA_STRUCTURE(sip_peer, DATA_EXPORT_SIP_PEER);
Modified: team/may/ooh323_ipv6_direct_rtp/channels/sip/include/sip.h
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/channels/sip/include/sip.h?view=diff&rev=321269&r1=321268&r2=321269
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/channels/sip/include/sip.h (original)
+++ team/may/ooh323_ipv6_direct_rtp/channels/sip/include/sip.h Fri May 27 07:49:58 2011
@@ -1157,6 +1157,7 @@
AST_DECLARE_STRING_FIELDS(
AST_STRING_FIELD(secret); /*!< Password for inbound auth */
AST_STRING_FIELD(md5secret); /*!< Password in MD5 */
+ AST_STRING_FIELD(description); /*!< Description of this peer */
AST_STRING_FIELD(remotesecret); /*!< Remote secret (trunks, remote devices) */
AST_STRING_FIELD(context); /*!< Default context for incoming calls */
AST_STRING_FIELD(subscribecontext); /*!< Default context for subscriptions */
More information about the asterisk-commits
mailing list