[asterisk-commits] murf: branch murf/bug8386-1.4 r48070 - in
/team/murf/bug8386-1.4: ./ apps/ ch...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Nov 27 13:13:48 MST 2006
Author: murf
Date: Mon Nov 27 14:13:48 2006
New Revision: 48070
URL: http://svn.digium.com/view/asterisk?view=rev&rev=48070
Log:
Merged revisions 47911,47944,47959,47989,47992,48002,48015,48017,48031,48038,48046,48049,48054 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r47911 | murf | 2006-11-21 19:37:26 -0700 (Tue, 21 Nov 2006) | 1 line
blocking 47910 from 1.4; the time-limits on Dial are working OK
................
r47944 | file | 2006-11-22 14:47:43 -0700 (Wed, 22 Nov 2006) | 2 lines
Video will never reach Packet2Packet bridging and can do more harm then good.
................
r47959 | oej | 2006-11-23 04:01:47 -0700 (Thu, 23 Nov 2006) | 2 lines
Don't allocate unused variable.
................
r47989 | crichter | 2006-11-24 08:46:13 -0700 (Fri, 24 Nov 2006) | 9 lines
Merged revisions 47968 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r47968 | crichter | 2006-11-23 17:10:23 +0100 (Do, 23 Nov 2006) | 1 line
fixed a litle bug regarding HOLD/RETRIEVE. beatufied some logs, changed some loglevels. changed the default value of block_on_alarm
........
................
r47992 | murf | 2006-11-24 10:17:07 -0700 (Fri, 24 Nov 2006) | 1 line
bug 8189 posted this fix for main/translate.c for PLC
................
r48002 | oej | 2006-11-25 02:28:28 -0700 (Sat, 25 Nov 2006) | 4 lines
Not having a HINT is not an ERROR. In 1.4 and future releases, you can disable
subscription support totally or per peer in sip.conf with allowsubscribe = yes | no
................
r48015 | murf | 2006-11-25 17:01:34 -0700 (Sat, 25 Nov 2006) | 1 line
A little bit of func_cdr documentation upgrade-- no bug# involved, although 8221 may have inspired it.
................
r48017 | murf | 2006-11-25 17:26:16 -0700 (Sat, 25 Nov 2006) | 1 line
might as well also document the raw values of the flag vars
................
r48031 | oej | 2006-11-26 23:41:33 -0700 (Sun, 26 Nov 2006) | 2 lines
Change logging message
................
r48038 | file | 2006-11-27 08:32:19 -0700 (Mon, 27 Nov 2006) | 10 lines
Merged revisions 48037 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r48037 | file | 2006-11-27 10:30:37 -0500 (Mon, 27 Nov 2006) | 2 lines
Do not reference the freed outgoing structure in the debug message. (issue #8425 reported by arkadia)
........
................
r48046 | russell | 2006-11-27 10:17:40 -0700 (Mon, 27 Nov 2006) | 2 lines
Remove a couple of unused variables (issue #8380, casper)
................
r48049 | tilghman | 2006-11-27 10:20:37 -0700 (Mon, 27 Nov 2006) | 10 lines
Merged revisions 48045 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r48045 | tilghman | 2006-11-27 11:15:54 -0600 (Mon, 27 Nov 2006) | 2 lines
Random MOH wasn't really random (bug 8381)
........
................
r48054 | file | 2006-11-27 11:06:50 -0700 (Mon, 27 Nov 2006) | 10 lines
Merged revisions 48053 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r48053 | file | 2006-11-27 13:03:57 -0500 (Mon, 27 Nov 2006) | 2 lines
Use the proper function to get the new message count instead of always using the filesystem. (issue #8421 reported by slimey)
........
................
Modified:
team/murf/bug8386-1.4/ (props changed)
team/murf/bug8386-1.4/apps/app_voicemail.c
team/murf/bug8386-1.4/channels/chan_misdn.c
team/murf/bug8386-1.4/channels/chan_sip.c
team/murf/bug8386-1.4/channels/misdn/isdn_lib.c
team/murf/bug8386-1.4/channels/misdn_config.c
team/murf/bug8386-1.4/funcs/func_cdr.c
team/murf/bug8386-1.4/main/manager.c
team/murf/bug8386-1.4/main/rtp.c
team/murf/bug8386-1.4/main/translate.c
team/murf/bug8386-1.4/pbx/pbx_spool.c
team/murf/bug8386-1.4/res/res_musiconhold.c
Propchange: team/murf/bug8386-1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.
Propchange: team/murf/bug8386-1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: team/murf/bug8386-1.4/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8386-1.4/apps/app_voicemail.c?view=diff&rev=48070&r1=48069&r2=48070
==============================================================================
--- team/murf/bug8386-1.4/apps/app_voicemail.c (original)
+++ team/murf/bug8386-1.4/apps/app_voicemail.c Mon Nov 27 14:13:48 2006
@@ -6875,22 +6875,13 @@
}
}
AST_LIST_TRAVERSE(&users, vmu, list) {
- char dirname[256];
- DIR *vmdir;
- struct dirent *vment;
- int vmcount = 0;
- char count[12];
+ int newmsgs = 0, oldmsgs = 0;
+ char count[12], tmp[256] = "";
if ((argc == 3) || ((argc == 5) && !strcmp(argv[4],vmu->context))) {
- make_dir(dirname, 255, vmu->context, vmu->mailbox, "INBOX");
- if ((vmdir = opendir(dirname))) {
- /* No matter what the format of VM, there will always be a .txt file for each message. */
- while ((vment = readdir(vmdir)))
- if (strlen(vment->d_name) > 7 && !strncmp(vment->d_name + 7,".txt",4))
- vmcount++;
- closedir(vmdir);
- }
- snprintf(count,sizeof(count),"%d",vmcount);
+ snprintf(tmp, sizeof(tmp), "%s@%s", vmu->mailbox, ast_strlen_zero(vmu->context) ? "default" : vmu->context);
+ inboxcount(tmp, &newmsgs, &oldmsgs);
+ snprintf(count,sizeof(count),"%d",newmsgs);
ast_cli(fd, output_format, vmu->context, vmu->mailbox, vmu->fullname, vmu->zonetag, count);
}
}
Modified: team/murf/bug8386-1.4/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8386-1.4/channels/chan_misdn.c?view=diff&rev=48070&r1=48069&r2=48070
==============================================================================
--- team/murf/bug8386-1.4/channels/chan_misdn.c (original)
+++ team/murf/bug8386-1.4/channels/chan_misdn.c Mon Nov 27 14:13:48 2006
@@ -1046,8 +1046,8 @@
print_bc_info(fd, help, bc);
} else {
if (help->state == MISDN_HOLDED) {
- chan_misdn_log(0, 0, "ITS A HOLDED BC:\n");
- chan_misdn_log(0,0," --> l3_id: %x\n"
+ chan_misdn_log(2, 0, "ITS A HOLDED BC:\n");
+ chan_misdn_log(2,0," --> l3_id: %x\n"
" --> dad:%s oad:%s\n"
" --> hold_port: %d\n"
" --> hold_channel: %d\n"
@@ -1445,8 +1445,7 @@
int port=bc->port;
- chan_misdn_log(5,port,"update_config: Getting Config\n");
-
+ chan_misdn_log(7,port,"update_config: Getting Config\n");
int hdlc=0;
misdn_cfg_get( port, MISDN_CFG_HDLC, &hdlc, sizeof(int));
@@ -1912,7 +1911,7 @@
chan_misdn_log(1, port, "* CALL: %s\n",dest);
- chan_misdn_log(1, port, " --> * dad:%s tech:%s ctx:%s\n",ast->exten,ast->name, ast->context);
+ chan_misdn_log(2, port, " --> * dad:%s tech:%s ctx:%s\n",ast->exten,ast->name, ast->context);
chan_misdn_log(3, port, " --> * adding2newbc ext %s\n",ast->exten);
if (ast->exten) {
@@ -1968,7 +1967,7 @@
return -1;
}
- chan_misdn_log(1, port, " --> * SEND: State Dialing pid:%d\n",newbc?newbc->pid:1);
+ chan_misdn_log(2, port, " --> * SEND: State Dialing pid:%d\n",newbc?newbc->pid:1);
ast_setstate(ast, AST_STATE_DIALING);
ast->hangupcause=16;
@@ -2138,12 +2137,11 @@
return -1;
}
- chan_misdn_log(1, p->bc->port, "* IND : Indication [%d] from %s\n",cond, ast->exten);
+ chan_misdn_log(5, p->bc->port, "* IND : Indication [%d] from %s\n",cond, ast->exten);
switch (cond) {
case AST_CONTROL_BUSY:
- chan_misdn_log(1, p->bc->port, "* IND :\tbusy\n");
- chan_misdn_log(1, p->bc->port, " --> * SEND: State Busy pid:%d\n",p->bc?p->bc->pid:-1);
+ chan_misdn_log(1, p->bc->port, "* IND :\tbusy pid:%d\n",p->bc?p->bc->pid:-1);
ast_setstate(ast,AST_STATE_BUSY);
p->bc->out_cause=17;
@@ -2156,41 +2154,42 @@
return -1;
break;
case AST_CONTROL_RING:
- chan_misdn_log(1, p->bc->port, " --> * IND :\tring pid:%d\n",p->bc?p->bc->pid:-1);
+ chan_misdn_log(1, p->bc->port, "* IND :\tring pid:%d\n",p->bc?p->bc->pid:-1);
return -1;
break;
case AST_CONTROL_RINGING:
+ chan_misdn_log(1, p->bc->port, "* IND :\tringing pid:%d\n",p->bc?p->bc->pid:-1);
switch (p->state) {
case MISDN_ALERTING:
- chan_misdn_log(1, p->bc->port, " --> * IND :\tringing pid:%d but I was Ringing before, so ignoreing it\n",p->bc?p->bc->pid:-1);
+ chan_misdn_log(2, p->bc->port, " --> * IND :\tringing pid:%d but I was Ringing before, so ignoreing it\n",p->bc?p->bc->pid:-1);
break;
case MISDN_CONNECTED:
- chan_misdn_log(1, p->bc->port, " --> * IND :\tringing pid:%d but Connected, so just send TONE_ALERTING without state changes \n",p->bc?p->bc->pid:-1);
+ chan_misdn_log(2, p->bc->port, " --> * IND :\tringing pid:%d but Connected, so just send TONE_ALERTING without state changes \n",p->bc?p->bc->pid:-1);
return -1;
break;
default:
p->state=MISDN_ALERTING;
- chan_misdn_log(1, p->bc->port, " --> * IND :\tringing pid:%d\n",p->bc?p->bc->pid:-1);
+ chan_misdn_log(2, p->bc->port, " --> * IND :\tringing pid:%d\n",p->bc?p->bc->pid:-1);
misdn_lib_send_event( p->bc, EVENT_ALERTING);
if (p->other_ch && p->other_ch->bc) {
if (misdn_inband_avail(p->other_ch->bc)) {
- chan_misdn_log(1,p->bc->port, " --> other End is mISDN and has inband info available\n");
+ chan_misdn_log(2,p->bc->port, " --> other End is mISDN and has inband info available\n");
break;
}
if (!p->other_ch->bc->nt) {
- chan_misdn_log(1,p->bc->port, " --> other End is mISDN TE so it has inband info for sure (?)\n");
+ chan_misdn_log(2,p->bc->port, " --> other End is mISDN TE so it has inband info for sure (?)\n");
break;
}
}
- chan_misdn_log(1, p->bc->port, " --> * SEND: State Ring pid:%d\n",p->bc?p->bc->pid:-1);
+ chan_misdn_log(3, p->bc->port, " --> * SEND: State Ring pid:%d\n",p->bc?p->bc->pid:-1);
ast_setstate(ast,AST_STATE_RINGING);
if ( !p->bc->nt && (p->orginator==ORG_MISDN) && !p->incoming_early_audio )
- chan_misdn_log(1,p->bc->port, " --> incoming_early_audio off\n");
+ chan_misdn_log(2,p->bc->port, " --> incoming_early_audio off\n");
else
return -1;
}
@@ -2327,10 +2326,10 @@
}
chan_misdn_log(1, bc->port, "* IND : HANGUP\tpid:%d ctx:%s dad:%s oad:%s State:%s\n",p->bc?p->bc->pid:-1, ast->context, ast->exten, AST_CID_P(ast), misdn_get_ch_state(p));
- chan_misdn_log(2, bc->port, " --> l3id:%x\n",p->l3id);
- chan_misdn_log(1, bc->port, " --> cause:%d\n",bc->cause);
- chan_misdn_log(1, bc->port, " --> out_cause:%d\n",bc->out_cause);
- chan_misdn_log(1, bc->port, " --> state:%s\n", misdn_get_ch_state(p));
+ chan_misdn_log(3, bc->port, " --> l3id:%x\n",p->l3id);
+ chan_misdn_log(3, bc->port, " --> cause:%d\n",bc->cause);
+ chan_misdn_log(2, bc->port, " --> out_cause:%d\n",bc->out_cause);
+ chan_misdn_log(2, bc->port, " --> state:%s\n", misdn_get_ch_state(p));
switch (p->state) {
case MISDN_CALLING:
@@ -2415,7 +2414,7 @@
}
- chan_misdn_log(1, bc->port, "Channel: %s hanguped new state:%s\n",ast->name,misdn_get_ch_state(p));
+ chan_misdn_log(3, bc->port, " --> Channel: %s hanguped new state:%s\n",ast->name,misdn_get_ch_state(p));
return 0;
}
@@ -2722,9 +2721,9 @@
/* got hangup .. */
if (!f)
- chan_misdn_log(1,ch1->bc->port,"Read Null Frame\n");
+ chan_misdn_log(4,ch1->bc->port,"Read Null Frame\n");
else
- chan_misdn_log(1,ch1->bc->port,"Read Frame Controll class:%d\n",f->subclass);
+ chan_misdn_log(4,ch1->bc->port,"Read Frame Controll class:%d\n",f->subclass);
*fo=f;
*rc=who;
@@ -3303,11 +3302,11 @@
return;
}
- cb_log(1,port,"hangup_chan\n");
+ cb_log(5,port,"hangup_chan called\n");
if (ch->need_hangup)
{
- cb_log(1,port,"-> hangup\n");
+ cb_log(2,port," --> hangup\n");
send_cause2ast(ch->ast,ch->bc,ch);
ch->need_hangup=0;
ch->need_queue_hangup=0;
@@ -3317,7 +3316,7 @@
}
if (!ch->need_queue_hangup) {
- cb_log(1,port,"No need to queue hangup\n");
+ cb_log(2,port," --> No need to queue hangup\n");
}
ch->need_queue_hangup=0;
@@ -3326,7 +3325,7 @@
if (ch->ast)
ast_queue_hangup(ch->ast);
- cb_log(1,port,"-> queue_hangup\n");
+ cb_log(2,port," --> queue_hangup\n");
} else {
cb_log(1,port,"Cannot hangup chan, no ast\n");
}
@@ -3346,7 +3345,7 @@
ast=ch->ast;
}
- chan_misdn_log(1, bc->port, "release_chan: bc with l3id: %x\n",bc->l3_id);
+ chan_misdn_log(5, bc->port, "release_chan: bc with l3id: %x\n",bc->l3_id);
/*releaseing jitterbuffer*/
if (ch->jb ) {
@@ -3542,7 +3541,7 @@
tmp=pbx_builtin_getvar_helper(chan,"MISDN_PID");
if (tmp) {
ch->other_pid=atoi(tmp);
- chan_misdn_log(1,bc->port,"IMPORT_PID: importing pid:%s\n",tmp);
+ chan_misdn_log(3,bc->port," --> IMPORT_PID: importing pid:%s\n",tmp);
if (ch->other_pid >0) {
ch->other_ch=find_chan_by_pid(cl_te,ch->other_pid);
if (ch->other_ch) ch->other_ch->other_ch=ch;
@@ -3553,7 +3552,7 @@
void export_ch(struct ast_channel *chan, struct misdn_bchannel *bc, struct chan_list *ch)
{
char tmp[32];
- chan_misdn_log(1,bc->port,"EXPORT_PID: pid:%d\n",bc->pid);
+ chan_misdn_log(3,bc->port," --> EXPORT_PID: pid:%d\n",bc->pid);
sprintf(tmp,"%d",bc->pid);
pbx_builtin_setvar_helper(chan,"_MISDN_PID",tmp);
}
@@ -4165,15 +4164,15 @@
ast_queue_control(ch->ast, AST_CONTROL_RINGING);
ast_setstate(ch->ast, AST_STATE_RINGING);
- cb_log(1,bc->port,"Set State Ringing\n");
+ cb_log(7,bc->port," --> Set State Ringing\n");
if ( misdn_cap_is_speech(bc->capability) && misdn_inband_avail(bc)) {
cb_log(1,bc->port,"Starting Tones, we have inband Data\n");
start_bc_tones(ch);
} else {
- cb_log(1,bc->port,"We have no inband Data, the other end must create ringing\n");
+ cb_log(3,bc->port," --> We have no inband Data, the other end must create ringing\n");
if (ch->far_alerting) {
- cb_log(1,bc->port,"The other end can not do ringing eh ?.. we must do all ourself..");
+ cb_log(1,bc->port," --> The other end can not do ringing eh ?.. we must do all ourself..");
start_bc_tones(ch);
/*tone_indicate(ch, TONE_FAR_ALERTING);*/
}
@@ -4445,6 +4444,9 @@
ch->bc=bc;
ch->state = MISDN_CONNECTED;
+ ch->hold_info.port=0;
+ ch->hold_info.channel=0;
+
struct ast_channel *hold_ast=AST_BRIDGED_P(ch->ast);
if (hold_ast) {
Modified: team/murf/bug8386-1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8386-1.4/channels/chan_sip.c?view=diff&rev=48070&r1=48069&r2=48070
==============================================================================
--- team/murf/bug8386-1.4/channels/chan_sip.c (original)
+++ team/murf/bug8386-1.4/channels/chan_sip.c Mon Nov 27 14:13:48 2006
@@ -12088,7 +12088,8 @@
if (sipmethod == SIP_INVITE) {
/* First we ACK */
transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
- ast_log(LOG_WARNING, "INVITE with REPLACEs failed to '%s'\n", get_header(&p->initreq, "From"));
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Got 481 on Invite. Assuming INVITE with REPLACEs failed to '%s'\n", get_header(&p->initreq, "From"));
if (owner)
ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
@@ -14203,7 +14204,7 @@
if ((firststate = ast_extension_state(NULL, p->context, p->exten)) < 0) {
- ast_log(LOG_ERROR, "Got SUBSCRIBE for extension %s@%s from %s, but there is no hint for that extension\n", p->exten, p->context, ast_inet_ntoa(p->sa.sin_addr));
+ ast_log(LOG_NOTICE, "Got SUBSCRIBE for extension %s@%s from %s, but there is no hint for that extension.\n", p->exten, p->context, ast_inet_ntoa(p->sa.sin_addr));
transmit_response(p, "404 Not found", req);
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
return 0;
@@ -14296,7 +14297,6 @@
{
/* Called with p->lock held, as well as p->owner->lock if appropriate, keeping things
relatively static */
- struct sip_request resp;
const char *cmd;
const char *cseq;
const char *useragent;
@@ -14308,9 +14308,6 @@
int debug = sip_debug_test_pvt(p);
char *e;
int error = 0;
-
- /* Clear out potential response */
- memset(&resp, 0, sizeof(resp));
/* Get Method and Cseq */
cseq = get_header(req, "Cseq");
@@ -16868,6 +16865,7 @@
sip_destroy(iterator->call);
}
ASTOBJ_UNLOCK(iterator);
+
} while(0));
/* Then, actually destroy users and registry */
Modified: team/murf/bug8386-1.4/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8386-1.4/channels/misdn/isdn_lib.c?view=diff&rev=48070&r1=48069&r2=48070
==============================================================================
--- team/murf/bug8386-1.4/channels/misdn/isdn_lib.c (original)
+++ team/murf/bug8386-1.4/channels/misdn/isdn_lib.c Mon Nov 27 14:13:48 2006
@@ -434,10 +434,10 @@
{
int i;
- cb_log(1,stack->port,"find_free_chan: req_chan:%d\n",channel);
+ cb_log(5,stack->port,"find_free_chan: req_chan:%d\n",channel);
if (channel < 0 || channel > MAX_BCHANS) {
- cb_log(4, stack->port, " !! out of bound call to find_free_chan_in_stack! (ch:%d)\n", channel);
+ cb_log(0, stack->port, " !! out of bound call to find_free_chan_in_stack! (ch:%d)\n", channel);
return 0;
}
@@ -446,7 +446,7 @@
for (i = 0; i < stack->b_num; i++) {
if (i != 15 && (channel < 0 || i == channel)) { /* skip E1 Dchannel ;) and work with chan preselection */
if (!stack->channels[i]) {
- cb_log (1, stack->port, " --> found chan%s: %d\n", channel>=0?" (preselected)":"", i+1);
+ cb_log (3, stack->port, " --> found chan%s: %d\n", channel>=0?" (preselected)":"", i+1);
stack->channels[i] = 1;
bc->channel=i+1;
cb_event(EVENT_NEW_CHANNEL, bc, NULL);
@@ -455,7 +455,7 @@
}
}
- cb_log (4, stack->port, " !! NO FREE CHAN IN STACK\n");
+ cb_log (1, stack->port, " !! NO FREE CHAN IN STACK\n");
dump_chan_list(stack);
return 0;
@@ -1677,8 +1677,6 @@
stack;
stack=stack->next) {
- if ( !stack->ptp && !check) return 1;
-
if (stack->port == port) {
if (stack->blocked) {
@@ -1696,7 +1694,7 @@
return 0;
}
} else {
- if ( stack->l1link)
+ if ( !check || stack->l1link )
return 1;
else {
cb_log(0,port, "Port down PMP\n");
@@ -2034,7 +2032,7 @@
if (stack->ptp)
set_chan_in_stack(stack, bc->channel);
else
- cb_log(0,stack->port," --> PTMP but channel requested\n");
+ cb_log(3,stack->port," --> PTMP but channel requested\n");
} else {
@@ -3195,7 +3193,7 @@
}
cb_log(1, stack->port, "I SEND:%s oad:%s dad:%s pid:%d\n", isdn_get_info(msgs_g, event, 0), bc->oad, bc->dad, bc->pid);
- cb_log(1, stack->port, " --> bc_state:%s\n",bc_state2str(bc->bc_state));
+ cb_log(4, stack->port, " --> bc_state:%s\n",bc_state2str(bc->bc_state));
misdn_lib_log_ies(bc);
switch (event) {
@@ -4218,7 +4216,7 @@
struct misdn_stack *stack=get_stack_by_bc(bc);
- cb_log(1, stack?stack->port:0,"ec_enable\n");
+ cb_log(4, stack?stack->port:0,"ec_enable\n");
if (!misdn_cap_is_speech(bc->capability)) {
cb_log(1, stack?stack->port:0, " --> no speech? cannot enable EC\n");
@@ -4226,7 +4224,7 @@
}
if (bc->ec_enable) {
- cb_log(1, stack?stack->port:0,"Sending Control ECHOCAN_ON taps:%d training:%d\n",bc->ec_deftaps, bc->ec_training);
+ cb_log(3, stack?stack->port:0,"Sending Control ECHOCAN_ON taps:%d training:%d\n",bc->ec_deftaps, bc->ec_training);
switch (bc->ec_deftaps) {
case 4:
@@ -4262,7 +4260,7 @@
{
struct misdn_stack *stack=get_stack_by_bc(bc);
- cb_log(1, stack?stack->port:0,"ec_disable\n");
+ cb_log(4, stack?stack->port:0," --> ec_disable\n");
if (!misdn_cap_is_speech(bc->capability)) {
cb_log(1, stack?stack->port:0, " --> no speech? cannot disable EC\n");
@@ -4270,7 +4268,7 @@
}
if ( ! bc->ec_enable) {
- cb_log(1, stack?stack->port:0, "Sending Control ECHOCAN_OFF\n");
+ cb_log(3, stack?stack->port:0, "Sending Control ECHOCAN_OFF\n");
manager_ph_control(bc, ECHOCAN_OFF, 0);
}
}
@@ -4287,7 +4285,7 @@
manager_ph_control(bc, CMX_RECEIVE_OFF, 0);
manager_ph_control(bc, CMX_CONF_JOIN, conf_id);
- cb_log(1,bc->port, "Joining bc:%x in conf:%d\n",bc->addr,conf_id);
+ cb_log(3,bc->port, "Joining bc:%x in conf:%d\n",bc->addr,conf_id);
char data[16];
int len=15;
@@ -4305,13 +4303,13 @@
manager_ph_control(bc, CMX_RECEIVE_ON, 0);
manager_ph_control(bc, CMX_CONF_SPLIT, conf_id);
- cb_log(1,bc->port, "Splitting bc:%x in conf:%d\n",bc->addr,conf_id);
+ cb_log(4,bc->port, "Splitting bc:%x in conf:%d\n",bc->addr,conf_id);
}
void misdn_lib_bridge( struct misdn_bchannel * bc1, struct misdn_bchannel *bc2) {
int conf_id=bc1->pid +1;
- cb_log(1, bc1->port, "I Send: BRIDGE from:%d to:%d\n",bc1->port,bc2->port);
+ cb_log(4, bc1->port, "I Send: BRIDGE from:%d to:%d\n",bc1->port,bc2->port);
struct misdn_bchannel *bc_list[]={
bc1,bc2,NULL
@@ -4320,7 +4318,7 @@
for (bc=bc_list; *bc; bc++) {
(*bc)->conf_id=conf_id;
- cb_log(1, (*bc)->port, " --> bc_addr:%x\n",(*bc)->addr);
+ cb_log(4, (*bc)->port, " --> bc_addr:%x\n",(*bc)->addr);
switch((*bc)->bc_state) {
case BCHAN_ACTIVATED:
@@ -4355,7 +4353,7 @@
void misdn_lib_echo(struct misdn_bchannel *bc, int onoff)
{
- cb_log(1,bc->port, " --> ECHO %s\n", onoff?"ON":"OFF");
+ cb_log(3,bc->port, " --> ECHO %s\n", onoff?"ON":"OFF");
manager_ph_control(bc, onoff?CMX_ECHO_ON:CMX_ECHO_OFF, 0);
}
Modified: team/murf/bug8386-1.4/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8386-1.4/channels/misdn_config.c?view=diff&rev=48070&r1=48069&r2=48070
==============================================================================
--- team/murf/bug8386-1.4/channels/misdn_config.c (original)
+++ team/murf/bug8386-1.4/channels/misdn_config.c Mon Nov 27 14:13:48 2006
@@ -112,7 +112,7 @@
"\tBut be aware! a broken or plugged off cable might be used for a group call\n"
"\tas well, since chan_misdn has no chance to distinguish if the L1 is down\n"
"\tbecause of a lost Link or because the Provider shut it down..." },
- { "block_on_alarm", MISDN_CFG_ALARM_BLOCK, MISDN_CTYPE_BOOL, "yes", NONE ,
+ { "block_on_alarm", MISDN_CFG_ALARM_BLOCK, MISDN_CTYPE_BOOL, "no", NONE ,
"Block this port if we have an alarm on it."
"default: yes\n" },
{ "hdlc", MISDN_CFG_HDLC, MISDN_CTYPE_BOOL, "no", NONE,
@@ -308,7 +308,6 @@
"MSN's for TE ports, listen on those numbers on the above ports, and\n"
"\tindicate the incoming calls to Asterisk.\n"
"\tHere you can give a comma seperated list, or simply an '*' for any msn." },
-
};
static const struct misdn_cfg_spec gen_spec[] = {
Modified: team/murf/bug8386-1.4/funcs/func_cdr.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8386-1.4/funcs/func_cdr.c?view=diff&rev=48070&r1=48069&r2=48070
==============================================================================
--- team/murf/bug8386-1.4/funcs/func_cdr.c (original)
+++ team/murf/bug8386-1.4/funcs/func_cdr.c Mon Nov 27 14:13:48 2006
@@ -130,6 +130,27 @@
" values, when the 'u' option is passed, but formatted as YYYY-MM-DD HH:MM:SS\n"
" otherwise. Similarly, disposition and amaflags will return their raw\n"
" integral values.\n",
+" Here is a list of all the available cdr field names:\n"
+" clid lastdata disposition\n"
+" src start amaflags\n"
+" dst answer accountcode\n"
+" dcontext end uniqueid\n"
+" dstchannel duration userfield\n"
+" lastapp billsec channel\n"
+" All of the above variables are read-only, except for accountcode,\n"
+" userfield, and amaflags. You may, however, supply\n"
+" a name not on the above list, and create your own\n"
+" variable, whose value can be changed with this function,\n"
+" and this variable will be stored on the cdr.\n"
+" raw values for disposition:\n"
+" 1 = NO ANSWER\n"
+" 2 = BUSY\n"
+" 3 = FAILED\n"
+" 4 = ANSWERED\n"
+" raw values for amaflags:\n"
+" 1 = OMIT\n"
+" 2 = BILLING\n"
+" 3 = DOCUMENTATION\n",
};
static int unload_module(void)
Modified: team/murf/bug8386-1.4/main/manager.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8386-1.4/main/manager.c?view=diff&rev=48070&r1=48069&r2=48070
==============================================================================
--- team/murf/bug8386-1.4/main/manager.c (original)
+++ team/murf/bug8386-1.4/main/manager.c Mon Nov 27 14:13:48 2006
@@ -137,10 +137,6 @@
struct sockaddr_in sin;
/*! TCP socket */
int fd;
- /*! Whether or not we're busy doing an action */
- int busy;
- /*! Whether or not we're "dead" */
- int dead;
/*! Whether an HTTP manager is in use */
int inuse;
/*! Whether an HTTP session should be destroyed */
@@ -1167,8 +1163,6 @@
if (!s->send_events)
s->send_events = -1;
/* Once waitevent is called, always queue events from now on */
- if (s->busy == 1)
- s->busy = 2;
}
ast_mutex_unlock(&s->__lock);
s->waiting_thread = pthread_self();
@@ -1880,7 +1874,6 @@
int ret = 0;
ast_mutex_lock(&s->__lock);
if (s->fd > -1) {
- s->busy--;
if (!s->eventq)
s->eventq = master_eventq;
while(s->eventq->next) {
@@ -1980,9 +1973,6 @@
} else
astman_send_error(s, m, "Authentication Required");
} else {
- ast_mutex_lock(&s->__lock);
- s->busy++;
- ast_mutex_unlock(&s->__lock);
while (tmp) {
if (!strcasecmp(action, tmp->action)) {
if ((s->writeperm & tmp->authority) == tmp->authority) {
@@ -2039,8 +2029,6 @@
ast_mutex_unlock(&s->__lock);
if (res < 0) {
if (errno == EINTR) {
- if (s->dead)
- return -1;
return 0;
}
ast_log(LOG_WARNING, "Select returned error: %s\n", strerror(errno));
Modified: team/murf/bug8386-1.4/main/rtp.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8386-1.4/main/rtp.c?view=diff&rev=48070&r1=48069&r2=48070
==============================================================================
--- team/murf/bug8386-1.4/main/rtp.c (original)
+++ team/murf/bug8386-1.4/main/rtp.c Mon Nov 27 14:13:48 2006
@@ -2884,7 +2884,7 @@
}
/*! \brief Bridge loop for partial native bridge (packet2packet) */
-static enum ast_bridge_result bridge_p2p_loop(struct ast_channel *c0, struct ast_channel *c1, struct ast_rtp *p0, struct ast_rtp *p1, struct ast_rtp *vp0, struct ast_rtp *vp1, int timeoutms, int flags, struct ast_frame **fo, struct ast_channel **rc, void *pvt0, void *pvt1)
+static enum ast_bridge_result bridge_p2p_loop(struct ast_channel *c0, struct ast_channel *c1, struct ast_rtp *p0, struct ast_rtp *p1, int timeoutms, int flags, struct ast_frame **fo, struct ast_channel **rc, void *pvt0, void *pvt1)
{
struct ast_frame *fr = NULL;
struct ast_channel *who = NULL, *other = NULL, *cs[3] = {NULL, };
@@ -2898,12 +2898,6 @@
p0->bridged = p1;
ast_clear_flag(p1, FLAG_P2P_SENT_MARK);
p1->bridged = p0;
- if (vp0) {
- ast_clear_flag(vp0, FLAG_P2P_SENT_MARK);
- vp0->bridged = vp1;
- ast_clear_flag(vp1, FLAG_P2P_SENT_MARK);
- vp1->bridged = vp0;
- }
/* Activate callback modes if possible */
p0_callback = p2p_callback_enable(c0, p0, &p0_fds[0], &p0_iod[0]);
@@ -2964,22 +2958,12 @@
p1_callback = p2p_callback_disable(c1, p1, &p1_fds[0], &p1_iod[0]);
p0->bridged = NULL;
p1->bridged = NULL;
- if (vp0) {
- vp0->bridged = NULL;
- vp1->bridged = NULL;
- }
} else if (fr->subclass == AST_CONTROL_UNHOLD) {
/* If we are off hold, then go back to callback mode and P2P bridging */
ast_clear_flag(p0, FLAG_P2P_SENT_MARK);
p0->bridged = p1;
ast_clear_flag(p1, FLAG_P2P_SENT_MARK);
p1->bridged = p0;
- if (vp0) {
- ast_clear_flag(vp0, FLAG_P2P_SENT_MARK);
- vp0->bridged = vp1;
- ast_clear_flag(vp1, FLAG_P2P_SENT_MARK);
- vp1->bridged = vp0;
- }
p0_callback = p2p_callback_enable(c0, p0, &p0_fds[0], &p0_iod[0]);
p1_callback = p2p_callback_enable(c1, p1, &p1_fds[0], &p1_iod[0]);
}
@@ -3016,10 +3000,6 @@
/* Break out of the direct bridge */
p0->bridged = NULL;
p1->bridged = NULL;
- if (vp0) {
- vp0->bridged = NULL;
- vp1->bridged = NULL;
- }
return res;
}
@@ -3119,7 +3099,7 @@
}
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Packet2Packet bridging %s and %s\n", c0->name, c1->name);
- res = bridge_p2p_loop(c0, c1, p0, p1, vp0, vp1, timeoutms, flags, fo, rc, pvt0, pvt1);
+ res = bridge_p2p_loop(c0, c1, p0, p1, timeoutms, flags, fo, rc, pvt0, pvt1);
} else {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Native bridging %s and %s\n", c0->name, c1->name);
Modified: team/murf/bug8386-1.4/main/translate.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8386-1.4/main/translate.c?view=diff&rev=48070&r1=48069&r2=48070
==============================================================================
--- team/murf/bug8386-1.4/main/translate.c (original)
+++ team/murf/bug8386-1.4/main/translate.c Mon Nov 27 14:13:48 2006
@@ -172,6 +172,7 @@
}
l = plc_fillin(pvt->plc, dst + pvt->samples, l);
pvt->samples += l;
+ pvt->datalen = pvt->samples * 2; /* SLIN has 2bytes for 1sample */
}
return 0;
}
Modified: team/murf/bug8386-1.4/pbx/pbx_spool.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8386-1.4/pbx/pbx_spool.c?view=diff&rev=48070&r1=48069&r2=48070
==============================================================================
--- team/murf/bug8386-1.4/pbx/pbx_spool.c (original)
+++ team/murf/bug8386-1.4/pbx/pbx_spool.c Mon Nov 27 14:13:48 2006
@@ -387,8 +387,8 @@
now += o->retrytime;
if (o->callingpid && (o->callingpid == ast_mainpid)) {
safe_append(o, time(NULL), "DelayedRetry");
+ ast_log(LOG_DEBUG, "Delaying retry since we're currently running '%s'\n", o->fn);
free_outgoing(o);
- ast_log(LOG_DEBUG, "Delaying retry since we're currently running '%s'\n", o->fn);
} else {
/* Increment retries */
o->retries++;
Modified: team/murf/bug8386-1.4/res/res_musiconhold.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8386-1.4/res/res_musiconhold.c?view=diff&rev=48070&r1=48069&r2=48070
==============================================================================
--- team/murf/bug8386-1.4/res/res_musiconhold.c (original)
+++ team/murf/bug8386-1.4/res/res_musiconhold.c Mon Nov 27 14:13:48 2006
@@ -205,7 +205,7 @@
if (state->origwfmt && ast_set_write_format(chan, state->origwfmt)) {
ast_log(LOG_WARNING, "Unable to restore channel '%s' to format '%d'\n", chan->name, state->origwfmt);
}
- state->save_pos = state->pos + 1;
+ state->save_pos = state->pos;
}
}
@@ -216,32 +216,29 @@
int tries;
if (state->save_pos) {
- state->pos = state->save_pos - 1;
+ state->pos = state->save_pos;
state->save_pos = 0;
- } else {
+ }
+
+ state->samples = 0;
+ if (chan->stream) {
+ ast_closestream(chan->stream);
+ chan->stream = NULL;
+ state->pos++;
+ state->pos %= state->class->total_files;
+ }
+
+ if (ast_test_flag(state->class, MOH_RANDOMIZE)) {
/* Try 20 times to find something good */
- for (tries=0;tries < 20;tries++) {
- state->samples = 0;
- if (chan->stream) {
- ast_closestream(chan->stream);
- chan->stream = NULL;
- state->pos++;
- }
-
- if (ast_test_flag(state->class, MOH_RANDOMIZE))
- state->pos = ast_random();
-
- state->pos %= state->class->total_files;
+ for (tries = 0; tries < 20; tries++) {
+ state->pos = rand() % state->class->total_files;
/* check to see if this file's format can be opened */
if (ast_fileexists(state->class->filearray[state->pos], NULL, NULL) > 0)
break;
-
- }
- }
-
- state->pos = state->pos % state->class->total_files;
-
+ }
+ }
+
if (!ast_openstream_full(chan, state->class->filearray[state->pos], chan->language, 1)) {
ast_log(LOG_WARNING, "Unable to open file '%s': %s\n", state->class->filearray[state->pos], strerror(errno));
state->pos++;
More information about the asterisk-commits
mailing list