[asterisk-commits] twilson: branch twilson/hidden_channel r350021 - in /team/twilson/hidden_chan...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Jan 8 12:50:16 CST 2012
Author: twilson
Date: Sun Jan 8 12:50:09 2012
New Revision: 350021
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=350021
Log:
Initial try ast ast_channel_name/ast_channel_name_set
Modified:
team/twilson/hidden_channel/addons/chan_mobile.c
team/twilson/hidden_channel/addons/chan_ooh323.c
team/twilson/hidden_channel/addons/ooh323c/src/memheap.c
team/twilson/hidden_channel/apps/app_adsiprog.c
team/twilson/hidden_channel/apps/app_alarmreceiver.c
team/twilson/hidden_channel/apps/app_amd.c
team/twilson/hidden_channel/apps/app_chanisavail.c
team/twilson/hidden_channel/apps/app_chanspy.c
team/twilson/hidden_channel/apps/app_confbridge.c
team/twilson/hidden_channel/apps/app_dahdibarge.c
team/twilson/hidden_channel/apps/app_dahdiras.c
team/twilson/hidden_channel/apps/app_dial.c
team/twilson/hidden_channel/apps/app_directed_pickup.c
team/twilson/hidden_channel/apps/app_disa.c
team/twilson/hidden_channel/apps/app_dumpchan.c
team/twilson/hidden_channel/apps/app_externalivr.c
team/twilson/hidden_channel/apps/app_fax.c
team/twilson/hidden_channel/apps/app_flash.c
team/twilson/hidden_channel/apps/app_followme.c
team/twilson/hidden_channel/apps/app_getcpeid.c
team/twilson/hidden_channel/apps/app_jack.c
team/twilson/hidden_channel/apps/app_macro.c
team/twilson/hidden_channel/apps/app_meetme.c
team/twilson/hidden_channel/apps/app_milliwatt.c
team/twilson/hidden_channel/apps/app_minivm.c
team/twilson/hidden_channel/apps/app_mixmonitor.c
team/twilson/hidden_channel/apps/app_page.c
team/twilson/hidden_channel/apps/app_parkandannounce.c
team/twilson/hidden_channel/apps/app_playback.c
team/twilson/hidden_channel/apps/app_queue.c
team/twilson/hidden_channel/apps/app_readexten.c
team/twilson/hidden_channel/apps/app_record.c
team/twilson/hidden_channel/apps/app_rpt.c
team/twilson/hidden_channel/apps/app_sms.c
team/twilson/hidden_channel/apps/app_softhangup.c
team/twilson/hidden_channel/apps/app_stack.c
team/twilson/hidden_channel/apps/app_talkdetect.c
team/twilson/hidden_channel/apps/app_test.c
team/twilson/hidden_channel/apps/app_voicemail.c
team/twilson/hidden_channel/apps/app_waitforsilence.c
team/twilson/hidden_channel/bridges/bridge_multiplexed.c
team/twilson/hidden_channel/channels/chan_agent.c
team/twilson/hidden_channel/channels/chan_alsa.c
team/twilson/hidden_channel/channels/chan_console.c
team/twilson/hidden_channel/channels/chan_dahdi.c
team/twilson/hidden_channel/channels/chan_gtalk.c
team/twilson/hidden_channel/channels/chan_h323.c
team/twilson/hidden_channel/channels/chan_iax2.c
team/twilson/hidden_channel/channels/chan_jingle.c
team/twilson/hidden_channel/channels/chan_local.c
team/twilson/hidden_channel/channels/chan_mgcp.c
team/twilson/hidden_channel/channels/chan_misdn.c
team/twilson/hidden_channel/channels/chan_nbs.c
team/twilson/hidden_channel/channels/chan_oss.c
team/twilson/hidden_channel/channels/chan_phone.c
team/twilson/hidden_channel/channels/chan_sip.c
team/twilson/hidden_channel/channels/chan_skinny.c
team/twilson/hidden_channel/channels/chan_unistim.c
team/twilson/hidden_channel/channels/chan_usbradio.c
team/twilson/hidden_channel/channels/chan_vpb.cc
team/twilson/hidden_channel/channels/console_video.c
team/twilson/hidden_channel/channels/sig_analog.c
team/twilson/hidden_channel/channels/sig_pri.c
team/twilson/hidden_channel/channels/sig_ss7.c
team/twilson/hidden_channel/funcs/func_audiohookinherit.c
team/twilson/hidden_channel/funcs/func_channel.c
team/twilson/hidden_channel/funcs/func_frame_trace.c
team/twilson/hidden_channel/funcs/func_global.c
team/twilson/hidden_channel/funcs/func_groupcount.c
team/twilson/hidden_channel/funcs/func_lock.c
team/twilson/hidden_channel/include/asterisk/channel.h
team/twilson/hidden_channel/main/abstract_jb.c
team/twilson/hidden_channel/main/aoc.c
team/twilson/hidden_channel/main/app.c
team/twilson/hidden_channel/main/autochan.c
team/twilson/hidden_channel/main/bridging.c
team/twilson/hidden_channel/main/ccss.c
team/twilson/hidden_channel/main/cdr.c
team/twilson/hidden_channel/main/cel.c
team/twilson/hidden_channel/main/channel.c
team/twilson/hidden_channel/main/cli.c
team/twilson/hidden_channel/main/dial.c
team/twilson/hidden_channel/main/dsp.c
team/twilson/hidden_channel/main/features.c
team/twilson/hidden_channel/main/file.c
team/twilson/hidden_channel/main/indications.c
team/twilson/hidden_channel/main/manager.c
team/twilson/hidden_channel/main/pbx.c
team/twilson/hidden_channel/main/rtp_engine.c
team/twilson/hidden_channel/main/say.c
team/twilson/hidden_channel/main/udptl.c
team/twilson/hidden_channel/pbx/pbx_dundi.c
team/twilson/hidden_channel/pbx/pbx_lua.c
team/twilson/hidden_channel/pbx/pbx_realtime.c
team/twilson/hidden_channel/res/res_adsi.c
team/twilson/hidden_channel/res/res_agi.c
team/twilson/hidden_channel/res/res_calendar.c
team/twilson/hidden_channel/res/res_fax.c
team/twilson/hidden_channel/res/res_jabber.c
team/twilson/hidden_channel/res/res_monitor.c
team/twilson/hidden_channel/res/res_musiconhold.c
team/twilson/hidden_channel/res/res_mutestream.c
team/twilson/hidden_channel/res/snmp/agent.c
Modified: team/twilson/hidden_channel/addons/chan_mobile.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/hidden_channel/addons/chan_mobile.c?view=diff&rev=350021&r1=350020&r2=350021
==============================================================================
--- team/twilson/hidden_channel/addons/chan_mobile.c (original)
+++ team/twilson/hidden_channel/addons/chan_mobile.c Sun Jan 8 12:50:09 2012
@@ -960,11 +960,11 @@
}
if ((ast->_state != AST_STATE_DOWN) && (ast->_state != AST_STATE_RESERVED)) {
- ast_log(LOG_WARNING, "mbl_call called on %s, neither down nor reserved\n", ast->name);
+ ast_log(LOG_WARNING, "mbl_call called on %s, neither down nor reserved\n", ast_channel_name(ast));
return -1;
}
- ast_debug(1, "Calling %s on %s\n", dest, ast->name);
+ ast_debug(1, "Calling %s on %s\n", dest, ast_channel_name(ast));
ast_mutex_lock(&pvt->lock);
if (pvt->type == MBL_TYPE_PHONE) {
Modified: team/twilson/hidden_channel/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/hidden_channel/addons/chan_ooh323.c?view=diff&rev=350021&r1=350020&r2=350021
==============================================================================
--- team/twilson/hidden_channel/addons/chan_ooh323.c (original)
+++ team/twilson/hidden_channel/addons/chan_ooh323.c Sun Jan 8 12:50:09 2012
@@ -469,7 +469,7 @@
ast_setstate(ch, state);
if (state != AST_STATE_DOWN) {
if (ast_pbx_start(ch)) {
- ast_log(LOG_WARNING, "Unable to start PBX on %s\n", ch->name);
+ ast_log(LOG_WARNING, "Unable to start PBX on %s\n", ast_channel_name(ch));
ast_channel_unlock(ch);
ast_hangup(ch);
ch = NULL;
@@ -477,7 +477,7 @@
}
manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate", "Channel: %s\r\nChanneltype: %s\r\n"
- "CallRef: %d\r\n", ch->name, "OOH323", i->call_reference);
+ "CallRef: %d\r\n", ast_channel_name(ch), "OOH323", i->call_reference);
} else
ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
@@ -927,7 +927,7 @@
if ((ast->_state != AST_STATE_DOWN) && (ast->_state != AST_STATE_RESERVED)) {
ast_log(LOG_WARNING, "ooh323_call called on %s, neither down nor "
- "reserved\n", ast->name);
+ "reserved\n", ast_channel_name(ast));
return -1;
}
ast_mutex_lock(&p->lock);
@@ -1096,7 +1096,7 @@
}
ast_setstate(ast, AST_STATE_UP);
if (option_debug)
- ast_debug(1, "ooh323_answer(%s)\n", ast->name);
+ ast_debug(1, "ooh323_answer(%s)\n", ast_channel_name(ast));
ast_channel_unlock(ast);
ooAnswerCall(p->callToken);
}
@@ -1141,7 +1141,7 @@
if (f->frametype == AST_FRAME_MODEM) {
ast_debug(1, "Send UDPTL %d/%d len %d for %s\n",
- f->frametype, f->subclass.integer, f->datalen, ast->name);
+ f->frametype, f->subclass.integer, f->datalen, ast_channel_name(ast));
if (p->udptl)
res = ast_udptl_write(p->udptl, f);
ast_mutex_unlock(&p->lock);
@@ -1388,7 +1388,7 @@
ast_mutex_lock(&p->lock);
if (gH323Debug)
- ast_verb(0, "----- ooh323_queryoption %d on channel %s\n", option, ast->name);
+ ast_verb(0, "----- ooh323_queryoption %d on channel %s\n", option, ast_channel_name(ast));
switch (option) {
@@ -1418,7 +1418,7 @@
cp = (char *) data;
*cp = p->vad ? 1 : 0;
ast_debug(1, "Reporting digit detection %sabled on %s\n",
- *cp ? "en" : "dis", ast->name);
+ *cp ? "en" : "dis", ast_channel_name(ast));
res = 0;
break;
@@ -1428,7 +1428,7 @@
}
if (gH323Debug)
- ast_verb(0, "+++++ ooh323_queryoption %d on channel %s\n", option, ast->name);
+ ast_verb(0, "+++++ ooh323_queryoption %d on channel %s\n", option, ast_channel_name(ast));
ast_mutex_unlock(&p->lock);
@@ -2103,7 +2103,7 @@
ast_queue_control(c, AST_CONTROL_ANSWER);
ast_channel_unlock(p->owner);
manager_event(EVENT_FLAG_SYSTEM,"ChannelUpdate","Channel: %s\r\nChanneltype: %s\r\n"
- "CallRef: %d\r\n", c->name, "OOH323", p->call_reference);
+ "CallRef: %d\r\n", ast_channel_name(c), "OOH323", p->call_reference);
}
ast_mutex_unlock(&p->lock);
@@ -3844,7 +3844,7 @@
ast_debug(1, "Failed to grab lock, trying again\n");
DEADLOCK_AVOIDANCE(&cur->lock);
}
- ast_debug(1, "Detaching from %s\n", cur->owner->name);
+ ast_debug(1, "Detaching from %s\n", ast_channel_name(cur->owner));
cur->owner->tech_pvt = NULL;
ast_channel_unlock(cur->owner);
cur->owner = NULL;
@@ -4176,16 +4176,16 @@
/* XXX Deal with Video */
struct ooh323_pvt *p;
struct ast_sockaddr tmp;
- int mode;
-
- if (gH323Debug)
- ast_verb(0, "--- ooh323_set_peer - %s\n", chan->name);
+ /*int mode */;
+
+ if (gH323Debug)
+ ast_verb(0, "--- ooh323_set_peer - %s\n", ast_channel_name(chan));
if (!rtp) {
return 0;
}
- mode = ooh323_convertAsteriskCapToH323Cap(&chan->writeformat);
+ /*mode = ooh323_convertAsteriskCapToH323Cap(&chan->writeformat);*/
p = (struct ooh323_pvt *) chan->tech_pvt;
if (!p) {
ast_log(LOG_ERROR, "No Private Structure, this is bad\n");
@@ -4469,7 +4469,7 @@
ast_sockaddr_set_port(&them, remotePort);
ast_udptl_set_peer(p->udptl, &them);
- ast_udptl_set_tag(p->udptl, "%s", p->owner->name);
+ ast_udptl_set_tag(p->udptl, "%s", ast_channel_name(p->owner));
p->t38_tx_enable = 1;
p->lastTxT38 = time(NULL);
if (p->t38support == T38_ENABLED) {
@@ -4592,7 +4592,7 @@
f = ast_udptl_read(p->udptl); /* UDPTL t.38 data */
if (gH323Debug) {
ast_debug(1, "Got UDPTL %d/%d len %d for %s\n",
- f->frametype, f->subclass.integer, f->datalen, ast->name);
+ f->frametype, f->subclass.integer, f->datalen, ast_channel_name(ast));
}
break;
@@ -4633,10 +4633,10 @@
if ((strcmp(p->owner->exten, "fax")) &&
(ast_exists_extension(p->owner, target_context, "fax", 1,
S_COR(p->owner->caller.id.number.valid, p->owner->caller.id.number.str, NULL)))) {
- ast_verb(2, "Redirecting '%s' to fax extension due to CNG detection\n", p->owner->name);
+ ast_verb(2, "Redirecting '%s' to fax extension due to CNG detection\n", ast_channel_name(p->owner));
pbx_builtin_setvar_helper(p->owner, "FAXEXTEN", p->owner->exten);
if (ast_async_goto(p->owner, target_context, "fax", 1)) {
- ast_log(LOG_NOTICE, "Failed to async goto '%s' into fax of '%s'\n", p->owner->name,target_context);
+ ast_log(LOG_NOTICE, "Failed to async goto '%s' into fax of '%s'\n", ast_channel_name(p->owner),target_context);
}
p->faxdetected = 1;
if (dfr) {
@@ -4711,10 +4711,10 @@
if ((strcmp(p->owner->exten, "fax")) &&
(ast_exists_extension(p->owner, target_context, "fax", 1,
S_COR(p->owner->caller.id.number.valid, p->owner->caller.id.number.str, NULL)))) {
- ast_verb(2, "Redirecting '%s' to fax extension due to CNG detection\n", p->owner->name);
+ ast_verb(2, "Redirecting '%s' to fax extension due to CNG detection\n", ast_channel_name(p->owner));
pbx_builtin_setvar_helper(p->owner, "FAXEXTEN", p->owner->exten);
if (ast_async_goto(p->owner, target_context, "fax", 1)) {
- ast_log(LOG_NOTICE, "Failed to async goto '%s' into fax of '%s'\n", p->owner->name,target_context);
+ ast_log(LOG_NOTICE, "Failed to async goto '%s' into fax of '%s'\n", ast_channel_name(p->owner),target_context);
}
}
p->faxdetected = 1;
Modified: team/twilson/hidden_channel/addons/ooh323c/src/memheap.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/hidden_channel/addons/ooh323c/src/memheap.c?view=diff&rev=350021&r1=350020&r2=350021
==============================================================================
--- team/twilson/hidden_channel/addons/ooh323c/src/memheap.c (original)
+++ team/twilson/hidden_channel/addons/ooh323c/src/memheap.c Sun Jan 8 12:50:09 2012
@@ -726,7 +726,7 @@
OSMemLink** ppMemLink;
OSMemBlk* pMemBlk;
OSMemElemDescr* pElem;
- OSMemLink* pMemLink, *pPrevMemLink = 0;
+ OSMemLink* pMemLink/*, *pPrevMemLink = 0*/;
void *newMem_p;
unsigned nbytes, nunits;
@@ -758,7 +758,7 @@
*(int*)(((char*)pMemLink) + sizeof (OSMemLink)) = nbytes_;
return pMemLink->pMemBlk;
}
- pPrevMemLink = pMemLink;
+ /* pPrevMemLink = pMemLink; */
}
/* Round number of bytes to nearest 8-byte boundary */
Modified: team/twilson/hidden_channel/apps/app_adsiprog.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/hidden_channel/apps/app_adsiprog.c?view=diff&rev=350021&r1=350020&r2=350021
==============================================================================
--- team/twilson/hidden_channel/apps/app_adsiprog.c (original)
+++ team/twilson/hidden_channel/apps/app_adsiprog.c Sun Jan 8 12:50:09 2012
@@ -1469,7 +1469,7 @@
if (ast_adsi_begin_download(chan, scr->desc, scr->fdn, scr->sec, scr->ver)) {
/* User rejected us for some reason */
ast_verb(3, "User rejected download attempt\n");
- ast_log(LOG_NOTICE, "User rejected download on channel %s\n", chan->name);
+ ast_log(LOG_NOTICE, "User rejected download on channel %s\n", ast_channel_name(chan));
ast_free(scr);
return -1;
}
@@ -1554,7 +1554,7 @@
if (ast_adsi_end_download(chan)) {
/* Download failed for some reason */
ast_verb(3, "Download attempt failed\n");
- ast_log(LOG_NOTICE, "Download failed on %s\n", chan->name);
+ ast_log(LOG_NOTICE, "Download failed on %s\n", ast_channel_name(chan));
ast_free(scr);
return -1;
}
Modified: team/twilson/hidden_channel/apps/app_alarmreceiver.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/hidden_channel/apps/app_alarmreceiver.c?view=diff&rev=350021&r1=350020&r2=350021
==============================================================================
--- team/twilson/hidden_channel/apps/app_alarmreceiver.c (original)
+++ team/twilson/hidden_channel/apps/app_alarmreceiver.c Sun Jan 8 12:50:09 2012
@@ -210,8 +210,8 @@
break;
}
if (ast_write(chan, &wf)) {
- ast_verb(4, "AlarmReceiver: Failed to write frame on %s\n", chan->name);
- ast_log(LOG_WARNING, "AlarmReceiver Failed to write frame on %s\n",chan->name);
+ ast_verb(4, "AlarmReceiver: Failed to write frame on %s\n", ast_channel_name(chan));
+ ast_log(LOG_WARNING, "AlarmReceiver Failed to write frame on %s\n",ast_channel_name(chan));
res = -1;
ast_frfree(f);
break;
@@ -245,8 +245,8 @@
for (;;) {
/* if outa time, leave */
if (ast_tvdiff_ms(ast_tvnow(), lastdigittime) > ((i > 0) ? sdto : fdto)) {
- ast_verb(4, "AlarmReceiver: DTMF Digit Timeout on %s\n", chan->name);
- ast_debug(1,"AlarmReceiver: DTMF timeout on chan %s\n",chan->name);
+ ast_verb(4, "AlarmReceiver: DTMF Digit Timeout on %s\n", ast_channel_name(chan));
+ ast_debug(1,"AlarmReceiver: DTMF timeout on chan %s\n",ast_channel_name(chan));
res = 1;
break;
}
@@ -583,12 +583,12 @@
ast_verb(4, "AlarmReceiver: Setting read and write formats to ULAW\n");
if (ast_set_write_format_by_id(chan,AST_FORMAT_ULAW)) {
- ast_log(LOG_WARNING, "AlarmReceiver: Unable to set write format to Mu-law on %s\n",chan->name);
+ ast_log(LOG_WARNING, "AlarmReceiver: Unable to set write format to Mu-law on %s\n",ast_channel_name(chan));
return -1;
}
if (ast_set_read_format_by_id(chan,AST_FORMAT_ULAW)) {
- ast_log(LOG_WARNING, "AlarmReceiver: Unable to set read format to Mu-law on %s\n",chan->name);
+ ast_log(LOG_WARNING, "AlarmReceiver: Unable to set read format to Mu-law on %s\n",ast_channel_name(chan));
return -1;
}
Modified: team/twilson/hidden_channel/apps/app_amd.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/hidden_channel/apps/app_amd.c?view=diff&rev=350021&r1=350020&r2=350021
==============================================================================
--- team/twilson/hidden_channel/apps/app_amd.c (original)
+++ team/twilson/hidden_channel/apps/app_amd.c Sun Jan 8 12:50:09 2012
@@ -192,7 +192,7 @@
);
ast_format_clear(&readFormat);
- ast_verb(3, "AMD: %s %s %s (Fmt: %s)\n", chan->name,
+ ast_verb(3, "AMD: %s %s %s (Fmt: %s)\n", ast_channel_name(chan),
S_COR(chan->caller.ani.number.valid, chan->caller.ani.number.str, "(N/A)"),
S_COR(chan->redirecting.from.number.valid, chan->redirecting.from.number.str, "(N/A)"),
ast_getformatname(&chan->readformat));
@@ -246,7 +246,7 @@
/* Set read format to signed linear so we get signed linear frames in */
ast_format_copy(&readFormat, &chan->readformat);
if (ast_set_read_format_by_id(chan, AST_FORMAT_SLINEAR) < 0 ) {
- ast_log(LOG_WARNING, "AMD: Channel [%s]. Unable to set to linear mode, giving up\n", chan->name );
+ ast_log(LOG_WARNING, "AMD: Channel [%s]. Unable to set to linear mode, giving up\n", ast_channel_name(chan));
pbx_builtin_setvar_helper(chan , "AMDSTATUS", "");
pbx_builtin_setvar_helper(chan , "AMDCAUSE", "");
return;
@@ -254,7 +254,7 @@
/* Create a new DSP that will detect the silence */
if (!(silenceDetector = ast_dsp_new())) {
- ast_log(LOG_WARNING, "AMD: Channel [%s]. Unable to create silence detector :(\n", chan->name );
+ ast_log(LOG_WARNING, "AMD: Channel [%s]. Unable to create silence detector :(\n", ast_channel_name(chan));
pbx_builtin_setvar_helper(chan , "AMDSTATUS", "");
pbx_builtin_setvar_helper(chan , "AMDCAUSE", "");
return;
@@ -268,7 +268,7 @@
/* If we fail to read in a frame, that means they hung up */
if (!(f = ast_read(chan))) {
- ast_verb(3, "AMD: Channel [%s]. HANGUP\n", chan->name);
+ ast_verb(3, "AMD: Channel [%s]. HANGUP\n", ast_channel_name(chan));
ast_debug(1, "Got hangup\n");
strcpy(amdStatus, "HANGUP");
res = 1;
@@ -285,7 +285,7 @@
iTotalTime += framelength;
if (iTotalTime >= totalAnalysisTime) {
- ast_verb(3, "AMD: Channel [%s]. Too long...\n", chan->name );
+ ast_verb(3, "AMD: Channel [%s]. Too long...\n", ast_channel_name(chan));
ast_frfree(f);
strcpy(amdStatus , "NOTSURE");
sprintf(amdCause , "TOOLONG-%d", iTotalTime);
@@ -305,11 +305,11 @@
if (silenceDuration >= betweenWordsSilence) {
if (currentState != STATE_IN_SILENCE ) {
- ast_verb(3, "AMD: Channel [%s]. Changed state to STATE_IN_SILENCE\n", chan->name);
+ ast_verb(3, "AMD: Channel [%s]. Changed state to STATE_IN_SILENCE\n", ast_channel_name(chan));
}
/* Find words less than word duration */
if (consecutiveVoiceDuration < minimumWordLength && consecutiveVoiceDuration > 0){
- ast_verb(3, "AMD: Channel [%s]. Short Word Duration: %d\n", chan->name, consecutiveVoiceDuration);
+ ast_verb(3, "AMD: Channel [%s]. Short Word Duration: %d\n", ast_channel_name(chan), consecutiveVoiceDuration);
}
currentState = STATE_IN_SILENCE;
consecutiveVoiceDuration = 0;
@@ -317,7 +317,7 @@
if (inInitialSilence == 1 && silenceDuration >= initialSilence) {
ast_verb(3, "AMD: Channel [%s]. ANSWERING MACHINE: silenceDuration:%d initialSilence:%d\n",
- chan->name, silenceDuration, initialSilence);
+ ast_channel_name(chan), silenceDuration, initialSilence);
ast_frfree(f);
strcpy(amdStatus , "MACHINE");
sprintf(amdCause , "INITIALSILENCE-%d-%d", silenceDuration, initialSilence);
@@ -327,7 +327,7 @@
if (silenceDuration >= afterGreetingSilence && inGreeting == 1) {
ast_verb(3, "AMD: Channel [%s]. HUMAN: silenceDuration:%d afterGreetingSilence:%d\n",
- chan->name, silenceDuration, afterGreetingSilence);
+ ast_channel_name(chan), silenceDuration, afterGreetingSilence);
ast_frfree(f);
strcpy(amdStatus , "HUMAN");
sprintf(amdCause , "HUMAN-%d-%d", silenceDuration, afterGreetingSilence);
@@ -343,18 +343,18 @@
number of words if my previous state was Silence, which means that I moved into a word. */
if (consecutiveVoiceDuration >= minimumWordLength && currentState == STATE_IN_SILENCE) {
iWordsCount++;
- ast_verb(3, "AMD: Channel [%s]. Word detected. iWordsCount:%d\n", chan->name, iWordsCount);
+ ast_verb(3, "AMD: Channel [%s]. Word detected. iWordsCount:%d\n", ast_channel_name(chan), iWordsCount);
currentState = STATE_IN_WORD;
}
if (consecutiveVoiceDuration >= maximumWordLength){
- ast_verb(3, "AMD: Channel [%s]. Maximum Word Length detected. [%d]\n", chan->name, consecutiveVoiceDuration);
+ ast_verb(3, "AMD: Channel [%s]. Maximum Word Length detected. [%d]\n", ast_channel_name(chan), consecutiveVoiceDuration);
ast_frfree(f);
strcpy(amdStatus , "MACHINE");
sprintf(amdCause , "MAXWORDLENGTH-%d", consecutiveVoiceDuration);
break;
}
if (iWordsCount >= maximumNumberOfWords) {
- ast_verb(3, "AMD: Channel [%s]. ANSWERING MACHINE: iWordsCount:%d\n", chan->name, iWordsCount);
+ ast_verb(3, "AMD: Channel [%s]. ANSWERING MACHINE: iWordsCount:%d\n", ast_channel_name(chan), iWordsCount);
ast_frfree(f);
strcpy(amdStatus , "MACHINE");
sprintf(amdCause , "MAXWORDS-%d-%d", iWordsCount, maximumNumberOfWords);
@@ -363,7 +363,7 @@
}
if (inGreeting == 1 && voiceDuration >= greeting) {
- ast_verb(3, "AMD: Channel [%s]. ANSWERING MACHINE: voiceDuration:%d greeting:%d\n", chan->name, voiceDuration, greeting);
+ ast_verb(3, "AMD: Channel [%s]. ANSWERING MACHINE: voiceDuration:%d greeting:%d\n", ast_channel_name(chan), voiceDuration, greeting);
ast_frfree(f);
strcpy(amdStatus , "MACHINE");
sprintf(amdCause , "LONGGREETING-%d-%d", voiceDuration, greeting);
@@ -373,13 +373,13 @@
if (voiceDuration >= minimumWordLength ) {
if (silenceDuration > 0)
- ast_verb(3, "AMD: Channel [%s]. Detected Talk, previous silence duration: %d\n", chan->name, silenceDuration);
+ ast_verb(3, "AMD: Channel [%s]. Detected Talk, previous silence duration: %d\n", ast_channel_name(chan), silenceDuration);
silenceDuration = 0;
}
if (consecutiveVoiceDuration >= minimumWordLength && inGreeting == 0) {
/* Only go in here once to change the greeting flag when we detect the 1st word */
if (silenceDuration > 0)
- ast_verb(3, "AMD: Channel [%s]. Before Greeting Time: silenceDuration: %d voiceDuration: %d\n", chan->name, silenceDuration, voiceDuration);
+ ast_verb(3, "AMD: Channel [%s]. Before Greeting Time: silenceDuration: %d voiceDuration: %d\n", ast_channel_name(chan), silenceDuration, voiceDuration);
inInitialSilence = 0;
inGreeting = 1;
}
@@ -391,7 +391,7 @@
if (!res) {
/* It took too long to get a frame back. Giving up. */
- ast_verb(3, "AMD: Channel [%s]. Too long...\n", chan->name);
+ ast_verb(3, "AMD: Channel [%s]. Too long...\n", ast_channel_name(chan));
strcpy(amdStatus , "NOTSURE");
sprintf(amdCause , "TOOLONG-%d", iTotalTime);
}
@@ -402,7 +402,7 @@
/* Restore channel read format */
if (readFormat.id && ast_set_read_format(chan, &readFormat))
- ast_log(LOG_WARNING, "AMD: Unable to restore read format on '%s'\n", chan->name);
+ ast_log(LOG_WARNING, "AMD: Unable to restore read format on '%s'\n", ast_channel_name(chan));
/* Free the DSP used to detect silence */
ast_dsp_free(silenceDetector);
Modified: team/twilson/hidden_channel/apps/app_chanisavail.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/hidden_channel/apps/app_chanisavail.c?view=diff&rev=350021&r1=350020&r2=350021
==============================================================================
--- team/twilson/hidden_channel/apps/app_chanisavail.c (original)
+++ team/twilson/hidden_channel/apps/app_chanisavail.c Sun Jan 8 12:50:09 2012
@@ -170,7 +170,7 @@
snprintf(tmp, sizeof(tmp), "%d", status);
ast_str_append(&tmp_availstat, 0, "%s%s", ast_str_strlen(tmp_availstat) ? "&" : "", tmp);
if ((inuse <= 1) && (tempchan = ast_request(tech, chan->nativeformats, chan, number, &status))) {
- ast_str_append(&tmp_availchan, 0, "%s%s", ast_str_strlen(tmp_availchan) ? "&" : "", tempchan->name);
+ ast_str_append(&tmp_availchan, 0, "%s%s", ast_str_strlen(tmp_availchan) ? "&" : "", ast_channel_name(tempchan));
snprintf(tmp, sizeof(tmp), "%s/%s", tech, number);
ast_str_append(&tmp_availorig, 0, "%s%s", ast_str_strlen(tmp_availorig) ? "&" : "", tmp);
Modified: team/twilson/hidden_channel/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/hidden_channel/apps/app_chanspy.c?view=diff&rev=350021&r1=350020&r2=350021
==============================================================================
--- team/twilson/hidden_channel/apps/app_chanspy.c (original)
+++ team/twilson/hidden_channel/apps/app_chanspy.c Sun Jan 8 12:50:09 2012
@@ -484,7 +484,7 @@
int res = 0;
struct ast_channel *peer = NULL;
- ast_log(LOG_NOTICE, "Attaching %s to %s\n", spychan_name, autochan->chan->name);
+ ast_log(LOG_NOTICE, "Attaching %s to %s\n", spychan_name, ast_channel_name(autochan->chan));
ast_set_flag(audiohook, AST_AUDIOHOOK_TRIGGER_SYNC | AST_AUDIOHOOK_SMALL_QUEUE);
res = ast_audiohook_attach(autochan->chan, audiohook);
@@ -524,7 +524,7 @@
struct ast_channel *chans[] = { chan, spyee_autochan->chan };
ast_channel_lock(chan);
- spyer_name = ast_strdupa(chan->name);
+ spyer_name = ast_strdupa(ast_channel_name(chan));
ast_channel_unlock(chan);
/* We now hold the channel lock on spyee */
@@ -534,7 +534,7 @@
}
ast_channel_lock(spyee_autochan->chan);
- name = ast_strdupa(spyee_autochan->chan->name);
+ name = ast_strdupa(ast_channel_name(spyee_autochan->chan));
ast_channel_unlock(spyee_autochan->chan);
ast_verb(2, "Spying on channel %s\n", name);
@@ -685,7 +685,7 @@
(*volfactor)++;
if (*volfactor > 4)
*volfactor = -4;
- ast_verb(3, "Setting spy volume on %s to %d\n", chan->name, *volfactor);
+ ast_verb(3, "Setting spy volume on %s to %d\n", ast_channel_name(chan), *volfactor);
csth.volfactor = *volfactor;
csth.spy_audiohook.options.read_volume = csth.volfactor;
@@ -747,7 +747,7 @@
return NULL;
}
- if (!strncmp(next->name, "DAHDI/pseudo", pseudo_len)) {
+ if (!strncmp(ast_channel_name(next), "DAHDI/pseudo", pseudo_len)) {
goto redo;
} else if (next == chan) {
goto redo;
@@ -925,7 +925,7 @@
snprintf(buffer, sizeof(buffer) - 1, ":%s:", myenforced);
- ast_copy_string(ext + 1, autochan->chan->name, sizeof(ext) - 1);
+ ast_copy_string(ext + 1, ast_channel_name(autochan->chan), sizeof(ext) - 1);
if ((end = strchr(ext, '-'))) {
*end++ = ':';
*end = '\0';
@@ -943,7 +943,7 @@
}
strcpy(peer_name, "spy-");
- strncat(peer_name, autochan->chan->name, AST_NAME_STRLEN - 4 - 1);
+ strncat(peer_name, ast_channel_name(autochan->chan), AST_NAME_STRLEN - 4 - 1);
ptr = strchr(peer_name, '/');
*ptr++ = '\0';
ptr = strsep(&ptr, "-");
Modified: team/twilson/hidden_channel/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/hidden_channel/apps/app_confbridge.c?view=diff&rev=350021&r1=350020&r2=350021
==============================================================================
--- team/twilson/hidden_channel/apps/app_confbridge.c (original)
+++ team/twilson/hidden_channel/apps/app_confbridge.c Sun Jan 8 12:50:09 2012
@@ -545,7 +545,7 @@
"Conference: %s\r\n"
"CallerIDnum: %s\r\n"
"CallerIDname: %s\r\n",
- chan->name,
+ ast_channel_name(chan),
chan->uniqueid,
conf_name,
S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, "<unknown>"),
@@ -561,7 +561,7 @@
"Conference: %s\r\n"
"CallerIDnum: %s\r\n"
"CallerIDname: %s\r\n",
- chan->name,
+ ast_channel_name(chan),
chan->uniqueid,
conf_name,
S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, "<unknown>"),
@@ -1165,7 +1165,7 @@
ast_say_number(conference_bridge->playback_chan, say_number, "", conference_bridge->playback_chan->language, NULL);
}
- ast_debug(1, "Departing underlying channel '%s' from bridge '%p'\n", underlying_channel->name, conference_bridge->bridge);
+ ast_debug(1, "Departing underlying channel '%s' from bridge '%p'\n", ast_channel_name(underlying_channel), conference_bridge->bridge);
ast_bridge_depart(conference_bridge->bridge, underlying_channel);
ast_mutex_unlock(&conference_bridge->playback_lock);
@@ -1228,7 +1228,7 @@
"Uniqueid: %s\r\n"
"Conference: %s\r\n"
"TalkingStatus: %s\r\n",
- bridge_channel->chan->name, bridge_channel->chan->uniqueid, conf_name, talking ? "on" : "off");
+ ast_channel_name(bridge_channel->chan), bridge_channel->chan->uniqueid, conf_name, talking ? "on" : "off");
}
static int conf_get_pin(struct ast_channel *chan, struct conference_bridge_user *conference_bridge_user)
@@ -1548,7 +1548,7 @@
/* Mute or unmute yourself, note we only allow manipulation if they aren't waiting for a marked user or if marked users exist */
if (!ast_test_flag(&conference_bridge_user->u_profile, USER_OPT_WAITMARKED) || conference_bridge->markedusers) {
conference_bridge_user->features.mute = (!conference_bridge_user->features.mute ? 1 : 0);
- ast_test_suite_event_notify("CONF_MUTE", "Message: participant %s %s\r\nConference: %s\r\nChannel: %s", chan->name, conference_bridge_user->features.mute ? "muted" : "unmuted", conference_bridge_user->b_profile.name, chan->name);
+ ast_test_suite_event_notify("CONF_MUTE", "Message: participant %s %s\r\nConference: %s\r\nChannel: %s", ast_channel_name(chan), conference_bridge_user->features.mute ? "muted" : "unmuted", conference_bridge_user->b_profile.name, ast_channel_name(chan));
}
return ast_stream_and_wait(chan, (conference_bridge_user->features.mute ?
conf_get_sound(CONF_SOUND_MUTED, conference_bridge_user->b_profile.sounds) :
@@ -1684,7 +1684,7 @@
conf_get_sound(CONF_SOUND_ERROR_MENU, conference_bridge_user->b_profile.sounds),
"");
ast_log(LOG_WARNING, "Only admin users can use the kick_last menu action. Channel %s of conf %s is not an admin.\n",
- bridge_channel->chan->name,
+ ast_channel_name(bridge_channel->chan),
conference_bridge->name);
return -1;
}
@@ -1938,12 +1938,12 @@
}
ao2_lock(bridge);
AST_LIST_TRAVERSE(&bridge->users_list, participant, list) {
- if (!strncmp(a->argv[3], participant->chan->name, strlen(participant->chan->name))) {
+ if (!strncmp(a->argv[3], ast_channel_name(participant->chan), strlen(ast_channel_name(participant->chan)))) {
break;
}
}
if (participant) {
- ast_cli(a->fd, "Kicking %s from confbridge %s\n", participant->chan->name, bridge->name);
+ ast_cli(a->fd, "Kicking %s from confbridge %s\n", ast_channel_name(participant->chan), bridge->name);
participant->kicked = 1;
ast_bridge_remove(bridge->bridge, participant->chan);
}
@@ -1996,7 +1996,7 @@
ast_cli(a->fd, "============================= ================ ================ ================ ================\n");
ao2_lock(bridge);
AST_LIST_TRAVERSE(&bridge->users_list, participant, list) {
- ast_cli(a->fd, "%-29s ", participant->chan->name);
+ ast_cli(a->fd, "%-29s ", ast_channel_name(participant->chan));
ast_cli(a->fd, "%-17s", participant->u_profile.name);
ast_cli(a->fd, "%-17s", participant->b_profile.name);
ast_cli(a->fd, "%-17s", participant->menu_name);
@@ -2057,13 +2057,13 @@
}
ao2_lock(bridge);
AST_LIST_TRAVERSE(&bridge->users_list, participant, list) {
- if (!strncmp(user, participant->chan->name, strlen(user))) {
+ if (!strncmp(user, ast_channel_name(participant->chan), strlen(user))) {
break;
}
}
if (participant) {
participant->features.mute = mute;
- ast_test_suite_event_notify("CONF_MUTE", "Message: participant %s %s\r\nConference: %s\r\nChannel: %s", participant->chan->name, participant->features.mute ? "muted" : "unmuted", bridge->b_profile.name, participant->chan->name);
+ ast_test_suite_event_notify("CONF_MUTE", "Message: participant %s %s\r\nConference: %s\r\nChannel: %s", ast_channel_name(participant->chan), participant->features.mute ? "muted" : "unmuted", bridge->b_profile.name, ast_channel_name(participant->chan));
} else {
res = -2;;
}
@@ -2340,7 +2340,7 @@
bridge->name,
S_COR(participant->chan->caller.id.number.valid, participant->chan->caller.id.number.str, "<unknown>"),
S_COR(participant->chan->caller.id.name.valid, participant->chan->caller.id.name.str, "<no name>"),
- participant->chan->name,
+ ast_channel_name(participant->chan),
ast_test_flag(&participant->u_profile, USER_OPT_ADMIN) ? "Yes" : "No",
ast_test_flag(&participant->u_profile, USER_OPT_MARKEDUSER) ? "Yes" : "No");
}
@@ -2508,7 +2508,7 @@
ao2_lock(bridge);
AST_LIST_TRAVERSE(&bridge->users_list, participant, list) {
- if (!strcasecmp(participant->chan->name, channel)) {
+ if (!strcasecmp(ast_channel_name(participant->chan), channel)) {
participant->kicked = 1;
ast_bridge_remove(bridge->bridge, participant->chan);
found = 1;
@@ -2635,7 +2635,7 @@
/* find channel and set as video src. */
ao2_lock(bridge);
AST_LIST_TRAVERSE(&bridge->users_list, participant, list) {
- if (!strncmp(channel, participant->chan->name, strlen(channel))) {
+ if (!strncmp(channel, ast_channel_name(participant->chan), strlen(channel))) {
ast_bridge_set_single_src_video_mode(bridge->bridge, participant->chan);
break;
}
Modified: team/twilson/hidden_channel/apps/app_dahdibarge.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/hidden_channel/apps/app_dahdibarge.c?view=diff&rev=350021&r1=350020&r2=350021
==============================================================================
--- team/twilson/hidden_channel/apps/app_dahdibarge.c (original)
+++ team/twilson/hidden_channel/apps/app_dahdibarge.c Sun Jan 8 12:50:09 2012
@@ -117,13 +117,13 @@
/* Set it into U-law mode (write) */
if (ast_set_write_format_by_id(chan, AST_FORMAT_ULAW) < 0) {
- ast_log(LOG_WARNING, "Unable to set '%s' to write ulaw mode\n", chan->name);
+ ast_log(LOG_WARNING, "Unable to set '%s' to write ulaw mode\n", ast_channel_name(chan));
goto outrun;
}
/* Set it into U-law mode (read) */
if (ast_set_read_format_by_id(chan, AST_FORMAT_ULAW) < 0) {
- ast_log(LOG_WARNING, "Unable to set '%s' to read ulaw mode\n", chan->name);
+ ast_log(LOG_WARNING, "Unable to set '%s' to read ulaw mode\n", ast_channel_name(chan));
goto outrun;
}
ast_indicate(chan, -1);
@@ -192,7 +192,7 @@
close(fd);
goto outrun;
}
- ast_debug(1, "Placed channel %s in DAHDI channel %d monitor\n", chan->name, confno);
+ ast_debug(1, "Placed channel %s in DAHDI channel %d monitor\n", ast_channel_name(chan), confno);
for(;;) {
outfd = -1;
Modified: team/twilson/hidden_channel/apps/app_dahdiras.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/hidden_channel/apps/app_dahdiras.c?view=diff&rev=350021&r1=350020&r2=350021
==============================================================================
--- team/twilson/hidden_channel/apps/app_dahdiras.c (original)
+++ team/twilson/hidden_channel/apps/app_dahdiras.c Sun Jan 8 12:50:09 2012
@@ -141,7 +141,7 @@
res = ioctl(chan->fds[0], DAHDI_GET_BUFINFO, &savebi);
if(res) {
- ast_log(LOG_WARNING, "Unable to check buffer policy on channel %s\n", chan->name);
+ ast_log(LOG_WARNING, "Unable to check buffer policy on channel %s\n", ast_channel_name(chan));
return;
}
@@ -154,7 +154,7 @@
if (!res) {
/* Check for hangup */
if (ast_check_hangup(chan) && !signalled) {
- ast_debug(1, "Channel '%s' hungup. Signalling RAS at %d to die...\n", chan->name, pid);
+ ast_debug(1, "Channel '%s' hungup. Signalling RAS at %d to die...\n", ast_channel_name(chan), pid);
kill(pid, SIGTERM);
signalled=1;
}
@@ -166,12 +166,12 @@
ast_log(LOG_WARNING, "wait4 returned %d: %s\n", res, strerror(errno));
}
if (WIFEXITED(status)) {
- ast_verb(3, "RAS on %s terminated with status %d\n", chan->name, WEXITSTATUS(status));
+ ast_verb(3, "RAS on %s terminated with status %d\n", ast_channel_name(chan), WEXITSTATUS(status));
} else if (WIFSIGNALED(status)) {
ast_verb(3, "RAS on %s terminated with signal %d\n",
- chan->name, WTERMSIG(status));
+ ast_channel_name(chan), WTERMSIG(status));
} else {
- ast_verb(3, "RAS on %s terminated weirdly.\n", chan->name);
+ ast_verb(3, "RAS on %s terminated weirdly.\n", ast_channel_name(chan));
}
/* Throw back into audio mode */
x = 1;
@@ -180,7 +180,7 @@
/* Restore saved values */
res = ioctl(chan->fds[0], DAHDI_SET_BUFINFO, &savebi);
if (res < 0) {
- ast_log(LOG_WARNING, "Unable to set buffer policy on channel %s\n", chan->name);
+ ast_log(LOG_WARNING, "Unable to set buffer policy on channel %s\n", ast_channel_name(chan));
}
break;
}
@@ -205,17 +205,17 @@
if (strcasecmp(chan->tech->type, "DAHDI")) {
/* If it's not a DAHDI channel, we're done. Wait a couple of
seconds and then hangup... */
- ast_verb(2, "Channel %s is not a DAHDI channel\n", chan->name);
+ ast_verb(2, "Channel %s is not a DAHDI channel\n", ast_channel_name(chan));
sleep(2);
} else {
memset(&dahdip, 0, sizeof(dahdip));
if (ioctl(chan->fds[0], DAHDI_GET_PARAMS, &dahdip)) {
ast_log(LOG_WARNING, "Unable to get DAHDI parameters\n");
} else if (dahdip.sigtype != DAHDI_SIG_CLEAR) {
- ast_verb(2, "Channel %s is not a clear channel\n", chan->name);
+ ast_verb(2, "Channel %s is not a clear channel\n", ast_channel_name(chan));
} else {
/* Everything should be okay. Run PPP. */
- ast_verb(3, "Starting RAS on %s\n", chan->name);
+ ast_verb(3, "Starting RAS on %s\n", ast_channel_name(chan));
/* Execute RAS */
run_ras(chan, args);
}
Modified: team/twilson/hidden_channel/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/hidden_channel/apps/app_dial.c?view=diff&rev=350021&r1=350020&r2=350021
==============================================================================
--- team/twilson/hidden_channel/apps/app_dial.c (original)
+++ team/twilson/hidden_channel/apps/app_dial.c Sun Jan 8 12:50:09 2012
@@ -801,7 +801,7 @@
"UniqueID: %s\r\n"
"DestUniqueID: %s\r\n"
"Dialstring: %s\r\n",
- src->name, dst->name,
+ ast_channel_name(src), ast_channel_name(dst),
[... 11131 lines stripped ...]
More information about the asterisk-commits
mailing list