[asterisk-commits] murf: branch murf/bug_7638 r75523 - in /team/murf/bug_7638: ./ apps/ channels...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 17 21:09:36 CDT 2007
Author: murf
Date: Tue Jul 17 21:09:35 2007
New Revision: 75523
URL: http://svn.digium.com/view/asterisk?view=rev&rev=75523
Log:
Bringing this mess back into sync with trunk
Modified:
team/murf/bug_7638/ (props changed)
team/murf/bug_7638/Makefile
team/murf/bug_7638/apps/app_chanspy.c
team/murf/bug_7638/apps/app_queue.c
team/murf/bug_7638/apps/app_speech_utils.c
team/murf/bug_7638/apps/app_voicemail.c
team/murf/bug_7638/channels/chan_agent.c
team/murf/bug_7638/channels/chan_iax2.c
team/murf/bug_7638/channels/chan_phone.c
team/murf/bug_7638/channels/chan_sip.c
team/murf/bug_7638/channels/chan_skinny.c
team/murf/bug_7638/channels/chan_zap.c
team/murf/bug_7638/channels/misdn/isdn_lib_intern.h
team/murf/bug_7638/configure
team/murf/bug_7638/configure.ac
team/murf/bug_7638/include/asterisk/ael_structs.h
team/murf/bug_7638/include/asterisk/ast_expr.h
team/murf/bug_7638/include/asterisk/autoconfig.h.in
team/murf/bug_7638/include/asterisk/monitor.h
team/murf/bug_7638/include/asterisk/pval.h
team/murf/bug_7638/include/asterisk/rtp.h
team/murf/bug_7638/include/asterisk/speech.h
team/murf/bug_7638/include/asterisk/udptl.h
team/murf/bug_7638/main/Makefile
team/murf/bug_7638/main/app.c
team/murf/bug_7638/main/channel.c
team/murf/bug_7638/main/dns.c
team/murf/bug_7638/main/pval.c
team/murf/bug_7638/main/rtp.c
team/murf/bug_7638/main/udptl.c
team/murf/bug_7638/pbx/ael/ael.tab.c
team/murf/bug_7638/pbx/ael/ael.tab.h
team/murf/bug_7638/pbx/pbx_ael.c
team/murf/bug_7638/pbx/pbx_spool.c
team/murf/bug_7638/res/res_agi.c
team/murf/bug_7638/res/res_config_odbc.c
team/murf/bug_7638/res/res_monitor.c
team/murf/bug_7638/res/res_musiconhold.c
team/murf/bug_7638/res/res_smdi.c
team/murf/bug_7638/res/res_speech.c
team/murf/bug_7638/utils/ael_main.c
team/murf/bug_7638/utils/check_expr.c
team/murf/bug_7638/utils/conf2ael.c
team/murf/bug_7638/utils/extconf.c
Propchange: team/murf/bug_7638/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.
Propchange: team/murf/bug_7638/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/murf/bug_7638/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jul 17 21:09:35 2007
@@ -1,1 +1,1 @@
-/trunk:1-74255
+/trunk:1-75159
Modified: team/murf/bug_7638/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/Makefile?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/Makefile (original)
+++ team/murf/bug_7638/Makefile Tue Jul 17 21:09:35 2007
@@ -652,7 +652,10 @@
rm -f $(DESTDIR)$(ASTSBINDIR)/autosupport
rm -rf $(DESTDIR)$(ASTHEADERDIR)
rm -rf $(DESTDIR)$(ASTDATADIR)/firmware
- rm -rf $(DESTDIR)$(ASTMANDIR)/man8
+ rm -f $(DESTDIR)$(ASTMANDIR)/man8/asterisk.8
+ rm -f $(DESTDIR)$(ASTMANDIR)/man8/astgenkey.8
+ rm -f $(DESTDIR)$(ASTMANDIR)/man8/autosupport.8
+ rm -f $(DESTDIR)$(ASTMANDIR)/man8/safe_asterisk.8
$(MAKE) -C sounds uninstall
uninstall: _uninstall
Modified: team/murf/bug_7638/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_chanspy.c?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/apps/app_chanspy.c (original)
+++ team/murf/bug_7638/apps/app_chanspy.c Tue Jul 17 21:09:35 2007
@@ -674,7 +674,8 @@
if (ast_test_flag(&flags, OPTION_PRIVATE))
ast_set_flag(&flags, OPTION_WHISPER);
- }
+ } else
+ ast_clear_flag(&flags, AST_FLAGS_ALL);
oldwf = chan->writeformat;
if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
@@ -758,7 +759,8 @@
if (ast_test_flag(&flags, OPTION_PRIVATE))
ast_set_flag(&flags, OPTION_WHISPER);
- }
+ } else
+ ast_clear_flag(&flags, AST_FLAGS_ALL);
oldwf = chan->writeformat;
if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
Modified: team/murf/bug_7638/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_queue.c?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/apps/app_queue.c (original)
+++ team/murf/bug_7638/apps/app_queue.c Tue Jul 17 21:09:35 2007
@@ -1468,21 +1468,17 @@
return res;
}
-static void recalc_holdtime(struct queue_ent *qe)
-{
- int oldvalue, newvalue;
+static void recalc_holdtime(struct queue_ent *qe, int newholdtime)
+{
+ int oldvalue;
/* Calculate holdtime using a recursive boxcar filter */
/* Thanks to SRT for this contribution */
/* 2^2 (4) is the filter coefficient; a higher exponent would give old entries more weight */
- newvalue = time(NULL) - qe->start;
-
ast_mutex_lock(&qe->parent->lock);
- if (newvalue <= qe->parent->servicelevel)
- qe->parent->callscompletedinsl++;
oldvalue = qe->parent->holdtime;
- qe->parent->holdtime = (((oldvalue << 2) - oldvalue) + newvalue) >> 2;
+ qe->parent->holdtime = (((oldvalue << 2) - oldvalue) + newholdtime) >> 2;
ast_mutex_unlock(&qe->parent->lock);
}
@@ -2307,7 +2303,7 @@
return res;
}
-static int update_queue(struct call_queue *q, struct member *member)
+static int update_queue(struct call_queue *q, struct member *member, int callcompletedinsl)
{
struct member *cur;
@@ -2324,6 +2320,8 @@
cur = cur->next;
}
q->callscompleted++;
+ if (callcompletedinsl)
+ q->callscompletedinsl++;
ast_mutex_unlock(&q->lock);
return 0;
}
@@ -2450,6 +2448,8 @@
char *p;
char vars[2048];
int forwardsallowed = 1;
+ int callcompletedinsl;
+
memset(&bridge_config, 0, sizeof(bridge_config));
time(&now);
@@ -2559,7 +2559,11 @@
if (!strcmp(peer->tech->type, "Zap"))
ast_channel_setoption(peer, AST_OPTION_TONE_VERIFY, &nondataquality, sizeof(nondataquality), 0);
/* Update parameters for the queue */
- recalc_holdtime(qe);
+ time(&now);
+ recalc_holdtime(qe, (now - qe->start));
+ ast_mutex_lock(&qe->parent->lock);
+ callcompletedinsl = ((now - qe->start) <= qe->parent->servicelevel);
+ ast_mutex_unlock(&qe->parent->lock);
member = lpeer->member;
hangupcalls(outgoing, peer);
outgoing = NULL;
@@ -2649,13 +2653,13 @@
else
which = peer;
if (monitorfilename)
- ast_monitor_start(which, qe->parent->monfmt, monitorfilename, 1 );
+ ast_monitor_start(which, qe->parent->monfmt, monitorfilename, 1, X_REC_IN | X_REC_OUT);
else if (qe->chan->cdr)
- ast_monitor_start(which, qe->parent->monfmt, qe->chan->cdr->uniqueid, 1 );
+ ast_monitor_start(which, qe->parent->monfmt, qe->chan->cdr->uniqueid, 1, X_REC_IN | X_REC_OUT);
else {
/* Last ditch effort -- no CDR, make up something */
snprintf(tmpid, sizeof(tmpid), "chan-%lx", ast_random());
- ast_monitor_start(which, qe->parent->monfmt, tmpid, 1 );
+ ast_monitor_start(which, qe->parent->monfmt, tmpid, 1, X_REC_IN | X_REC_OUT);
}
if (qe->parent->monjoin)
ast_monitor_setjoinfiles(which, 1);
@@ -2893,7 +2897,7 @@
if (bridge != AST_PBX_NO_HANGUP_PEER)
ast_hangup(peer);
- update_queue(qe->parent, member);
+ update_queue(qe->parent, member, callcompletedinsl);
res = bridge ? bridge : 1;
}
out:
Modified: team/murf/bug_7638/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_speech_utils.c?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/apps/app_speech_utils.c (original)
+++ team/murf/bug_7638/apps/app_speech_utils.c Tue Jul 17 21:09:35 2007
@@ -150,7 +150,7 @@
if (i == wanted_num)
break;
i++;
- } while ((result = result->next));
+ } while ((result = AST_LIST_NEXT(result, list)));
return result;
}
@@ -315,11 +315,8 @@
ast_copy_string(buf, "0", len);
} else if (!strcasecmp(data, "results")) {
/* Count number of results */
- result = speech->results;
- while (result) {
+ for (result = speech->results; result; result = AST_LIST_NEXT(result, list))
results++;
- result = result->next;
- }
snprintf(tmp, sizeof(tmp), "%d", results);
ast_copy_string(buf, tmp, len);
}
@@ -352,7 +349,7 @@
u = ast_module_user_add(chan);
/* Request a speech object */
- speech = ast_speech_new(data, AST_FORMAT_SLINEAR);
+ speech = ast_speech_new(data, chan->nativeformats);
if (speech == NULL) {
/* Not available */
pbx_builtin_setvar_helper(chan, "ERROR", "1");
@@ -572,7 +569,7 @@
oldreadformat = chan->readformat;
/* Change read format to be signed linear */
- if (ast_set_read_format(chan, AST_FORMAT_SLINEAR)) {
+ if (ast_set_read_format(chan, speech->format)) {
ast_module_user_remove(u);
return -1;
}
Modified: team/murf/bug_7638/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_voicemail.c?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/apps/app_voicemail.c (original)
+++ team/murf/bug_7638/apps/app_voicemail.c Tue Jul 17 21:09:35 2007
@@ -495,7 +495,7 @@
" message. The units are whole-number decibels (dB).\n"
" s - Skip the playback of instructions for leaving a message to the\n"
" calling party.\n"
- " u - Play the 'unavailable greeting.\n";
+ " u - Play the 'unavailable' greeting.\n";
static char *synopsis_vmain = "Check Voicemail messages";
@@ -4176,6 +4176,7 @@
char *temp;
char todir[256];
int todircount=0;
+ struct vm_state *dstvms;
#endif
char username[70]="";
int res = 0, cmd = 0;
@@ -4366,7 +4367,19 @@
/* should not assume "fmt" here! */
save_body(body,vms,"2",fmt);
- STORE(todir, vmtmp->mailbox, vmtmp->context, vms->curmsg, chan, vmtmp, fmt, duration, vms);
+ /* get destination mailbox */
+ dstvms = get_vm_state_by_mailbox(vmtmp->mailbox,0);
+ if (dstvms) {
+ init_mailstream(dstvms, 0);
+ if (!dstvms->mailstream) {
+ ast_log (LOG_ERROR,"IMAP mailstream for %s is NULL\n",vmtmp->mailbox);
+ } else {
+ STORE(todir, vmtmp->mailbox, vmtmp->context, dstvms->curmsg, chan, vmtmp, fmt, duration, dstvms);
+ run_externnotify(vmtmp->context, vmtmp->mailbox);
+ }
+ } else {
+ ast_log (LOG_ERROR,"Could not find state information for mailbox %s\n",vmtmp->mailbox);
+ }
if (!ast_strlen_zero(vmtmp->serveremail))
myserveremail = vmtmp->serveremail;
Modified: team/murf/bug_7638/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/channels/chan_agent.c?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/channels/chan_agent.c (original)
+++ team/murf/bug_7638/channels/chan_agent.c Tue Jul 17 21:09:35 2007
@@ -391,7 +391,7 @@
if ((pointer = strchr(filename, '.')))
*pointer = '-';
snprintf(tmp, sizeof(tmp), "%s%s",savecallsin ? savecallsin : "", filename);
- ast_monitor_start(ast, recordformat, tmp, needlock);
+ ast_monitor_start(ast, recordformat, tmp, needlock, X_REC_IN | X_REC_OUT);
ast_monitor_setjoinfiles(ast, 1);
snprintf(tmp2, sizeof(tmp2), "%s%s.%s", urlprefix ? urlprefix : "", filename, recordformatext);
#if 0
@@ -794,7 +794,7 @@
/* Not dead -- check availability now */
ast_mutex_lock(&p->lock);
/* Store last disconnect time */
- p->lastdisc = ast_tvnow();
+ p->lastdisc = ast_tvadd(ast_tvnow(), ast_samp2tv(p->wrapuptime, 1000));
ast_mutex_unlock(&p->lock);
}
/* Release ownership of the agent to other threads (presumably running the login app). */
@@ -814,7 +814,7 @@
ast_mutex_lock(&p->lock);
res = p->app_sleep_cond;
if (p->lastdisc.tv_sec) {
- if (ast_tvdiff_ms(ast_tvnow(), p->lastdisc) > p->wrapuptime)
+ if (ast_tvdiff_ms(ast_tvnow(), p->lastdisc) > 0)
res = 1;
}
ast_mutex_unlock(&p->lock);
@@ -1260,7 +1260,9 @@
ast_strlen_zero(p->loginchan)) {
if (p->chan)
hasagent++;
- if (!p->lastdisc.tv_sec) {
+ tv = ast_tvnow();
+ if (!p->lastdisc.tv_sec || (tv.tv_sec >= p->lastdisc.tv_sec)) {
+ p->lastdisc = ast_tv(0, 0);
/* Agent must be registered, but not have any active call, and not be in a waiting state */
if (!p->owner && p->chan) {
/* Fixed agent */
@@ -1463,13 +1465,13 @@
if (!strcasecmp(p->agent, agent)) {
ret = 0;
if (p->owner || p->chan) {
- p->deferlogoff = 1;
if (!soft) {
if (p->owner)
ast_softhangup(p->owner, AST_SOFTHANGUP_EXPLICIT);
if (p->chan)
ast_softhangup(p->chan, AST_SOFTHANGUP_EXPLICIT);
- }
+ } else
+ p->deferlogoff = 1;
} else {
logintime = time(NULL) - p->loginstart;
p->loginstart = 0;
@@ -1899,6 +1901,10 @@
ast_device_state_changed("Agent/%s", p->agent);
while (res >= 0) {
ast_mutex_lock(&p->lock);
+ if (p->deferlogoff && p->chan) {
+ ast_softhangup(p->chan, AST_SOFTHANGUP_EXPLICIT);
+ p->deferlogoff = 0;
+ }
if (p->chan != chan)
res = -1;
ast_mutex_unlock(&p->lock);
@@ -1910,7 +1916,7 @@
AST_LIST_LOCK(&agents);
ast_mutex_lock(&p->lock);
if (p->lastdisc.tv_sec) {
- if (ast_tvdiff_ms(ast_tvnow(), p->lastdisc) > p->wrapuptime) {
+ if (ast_tvdiff_ms(ast_tvnow(), p->lastdisc) > 0) {
ast_debug(1, "Wrapup time for %s expired!\n", p->agent);
p->lastdisc = ast_tv(0, 0);
if (p->ackcall > 1)
Modified: team/murf/bug_7638/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/channels/chan_iax2.c?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/channels/chan_iax2.c (original)
+++ team/murf/bug_7638/channels/chan_iax2.c Tue Jul 17 21:09:35 2007
@@ -7246,7 +7246,9 @@
check_provisioning(&sin, fd, ies.serviceident, ies.provver);
/* If we're in trunk mode, do it now, and update the trunk number in our frame before continuing */
if (ast_test_flag(iaxs[fr->callno], IAX_TRUNK)) {
- fr->callno = make_trunk(fr->callno, 1);
+ int new_callno;
+ if ((new_callno = make_trunk(fr->callno, 1)) != -1)
+ fr->callno = new_callno;
}
/* For security, always ack immediately */
if (delayreject)
@@ -8519,8 +8521,11 @@
/* If this is a trunk, update it now */
ast_copy_flags(iaxs[callno], &cai, IAX_TRUNK | IAX_SENDANI | IAX_NOTRANSFER | IAX_TRANSFERMEDIA | IAX_USEJITTERBUF | IAX_FORCEJITTERBUF);
- if (ast_test_flag(&cai, IAX_TRUNK))
- callno = make_trunk(callno, 1);
+ if (ast_test_flag(&cai, IAX_TRUNK)) {
+ int new_callno;
+ if ((new_callno = make_trunk(callno, 1)) != -1)
+ callno = new_callno;
+ }
iaxs[callno]->maxtime = cai.maxtime;
if (cai.found)
ast_string_field_set(iaxs[callno], host, pds.peer);
Modified: team/murf/bug_7638/channels/chan_phone.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/channels/chan_phone.c?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/channels/chan_phone.c (original)
+++ team/murf/bug_7638/channels/chan_phone.c Tue Jul 17 21:09:35 2007
@@ -45,6 +45,9 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <signal.h>
+#ifdef HAVE_LINUX_COMPILER_H
+#include <linux/compiler.h>
+#endif
#include <linux/telephony.h>
/* Still use some IXJ specific stuff */
#include <linux/version.h>
@@ -1068,7 +1071,7 @@
ast_mutex_unlock(&iflock);
/* Wait indefinitely for something to happen */
- if (dotone && i->mode != MODE_SIGMA) {
+ if (dotone && i && i->mode != MODE_SIGMA) {
/* If we're ready to recycle the time, set it to 30 ms */
tonepos += 240;
if (tonepos >= sizeof(DialTone))
Modified: team/murf/bug_7638/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/channels/chan_sip.c?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/channels/chan_sip.c (original)
+++ team/murf/bug_7638/channels/chan_sip.c Tue Jul 17 21:09:35 2007
@@ -13992,7 +13992,8 @@
sip_pvt_unlock(p->refer->refer_call);
/* Make sure that the masq does not free our PVT for the old call */
- ast_set_flag(&p->refer->refer_call->flags[0], SIP_DEFER_BYE_ON_TRANSFER); /* Delay hangup */
+ if (! earlyreplace && ! oneleggedreplace )
+ ast_set_flag(&p->refer->refer_call->flags[0], SIP_DEFER_BYE_ON_TRANSFER); /* Delay hangup */
/* Prepare the masquerade - if this does not happen, we will be gone */
if(ast_channel_masquerade(replacecall, c))
@@ -14202,7 +14203,7 @@
error = 1;
}
- if (!error && p->refer->refer_call->owner->_state != AST_STATE_RING && p->refer->refer_call->owner->_state != AST_STATE_UP ) {
+ if (!error && p->refer->refer_call->owner->_state != AST_STATE_RINGING && p->refer->refer_call->owner->_state != AST_STATE_RING && p->refer->refer_call->owner->_state != AST_STATE_UP ) {
ast_log(LOG_NOTICE, "Supervised transfer attempted to replace non-ringing or active call id (%s)!\n", replace_id);
transmit_response(p, "603 Declined (Replaces)", req);
error = 1;
Modified: team/murf/bug_7638/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/channels/chan_skinny.c?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/channels/chan_skinny.c (original)
+++ team/murf/bug_7638/channels/chan_skinny.c Tue Jul 17 21:09:35 2007
@@ -821,6 +821,7 @@
#define SKINNY_DEVICE_7911 307
#define SKINNY_DEVICE_7961GE 308
#define SKINNY_DEVICE_7941GE 309
+#define SKINNY_DEVICE_7921 365
#define SKINNY_DEVICE_7905 20000
#define SKINNY_DEVICE_7920 30002
#define SKINNY_DEVICE_7970 30006
@@ -1178,6 +1179,7 @@
(btn++)->buttonDefinition = BT_HOLD;
break;
case SKINNY_DEVICE_7920:
+ case SKINNY_DEVICE_7921:
/* XXX I don't know if this is right. */
for (i = 0; i < 4; i++)
(btn++)->buttonDefinition = BT_CUST_LINESPEEDDIAL;
@@ -2073,6 +2075,8 @@
return "7961GE";
case SKINNY_DEVICE_7941GE:
return "7941GE";
+ case SKINNY_DEVICE_7921:
+ return "7921";
case SKINNY_DEVICE_7905:
return "7905";
case SKINNY_DEVICE_7920:
Modified: team/murf/bug_7638/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/channels/chan_zap.c?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/channels/chan_zap.c (original)
+++ team/murf/bug_7638/channels/chan_zap.c Tue Jul 17 21:09:35 2007
@@ -1757,14 +1757,23 @@
static inline int zt_set_hook(int fd, int hs)
{
- int x, res;
+ int x, res, count = 0;
+
x = hs;
res = ioctl(fd, ZT_HOOK, &x);
- if (res < 0)
- {
+
+ while (res < 0 && count < 20) {
+ usleep(100000); /* 1/10 sec. */
+ x = hs;
+ res = ioctl(fd, ZT_HOOK, &x);
+ count++;
+ }
+
+ if (res < 0) {
if (errno == EINPROGRESS) return 0;
ast_log(LOG_WARNING, "zt hook failed: %s\n", strerror(errno));
}
+
return res;
}
Modified: team/murf/bug_7638/channels/misdn/isdn_lib_intern.h
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/channels/misdn/isdn_lib_intern.h?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/channels/misdn/isdn_lib_intern.h (original)
+++ team/murf/bug_7638/channels/misdn/isdn_lib_intern.h Tue Jul 17 21:09:35 2007
@@ -11,7 +11,9 @@
#include "isdn_lib.h"
-#if !defined MISDNUSER_VERSION_CODE || (MISDNUSER_VERSION_CODE < MISDNUSER_VERSION(1, 0, 3))
+#ifndef MISDNUSER_VERSION_CODE
+#error "You need a newer version of mISDNuser ..."
+#elif MISDNUSER_VERSION_CODE < MISDNUSER_VERSION(1, 0, 3)
#error "You need a newer version of mISDNuser ..."
#endif
Modified: team/murf/bug_7638/configure
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/configure?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/configure (original)
+++ team/murf/bug_7638/configure Tue Jul 17 21:09:35 2007
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 73911 .
+# From configure.ac Revision: 74375 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61.
#
@@ -12127,13 +12127,11 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/types.h> /* for off_t */
- #include <stdio.h>
+#include <stdio.h>
int
main ()
{
-int (*fp) (FILE *, off_t, int) = fseeko;
- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
;
return 0;
}
@@ -12173,13 +12171,11 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _LARGEFILE_SOURCE 1
-#include <sys/types.h> /* for off_t */
- #include <stdio.h>
+#include <stdio.h>
int
main ()
{
-int (*fp) (FILE *, off_t, int) = fseeko;
- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
;
return 0;
}
@@ -15783,6 +15779,59 @@
#define HAVE_RES_NINIT 1
_ACEOF
+ { echo "$as_me:$LINENO: checking for res_ndestroy" >&5
+echo $ECHO_N "checking for res_ndestroy... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <resolv.h>
+int
+main ()
+{
+int foo = res_ndestroy(NULL);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RES_NDESTROY 1
+_ACEOF
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -39730,6 +39779,141 @@
+if test "${ac_cv_header_linux_compiler_h+set}" = set; then
+ { echo "$as_me:$LINENO: checking for linux/compiler.h" >&5
+echo $ECHO_N "checking for linux/compiler.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_linux_compiler_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_compiler_h" >&5
+echo "${ECHO_T}$ac_cv_header_linux_compiler_h" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking linux/compiler.h usability" >&5
+echo $ECHO_N "checking linux/compiler.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <linux/compiler.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking linux/compiler.h presence" >&5
+echo $ECHO_N "checking linux/compiler.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <linux/compiler.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: linux/compiler.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: linux/compiler.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/compiler.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: linux/compiler.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: linux/compiler.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: linux/compiler.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/compiler.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: linux/compiler.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/compiler.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: linux/compiler.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/compiler.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: linux/compiler.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/compiler.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: linux/compiler.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/compiler.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: linux/compiler.h: in the future, the compiler will take precedence" >&2;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for linux/compiler.h" >&5
+echo $ECHO_N "checking for linux/compiler.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_linux_compiler_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_linux_compiler_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_compiler_h" >&5
+echo "${ECHO_T}$ac_cv_header_linux_compiler_h" >&6; }
+
+fi
+if test $ac_cv_header_linux_compiler_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LINUX_COMPILER_H 1
+_ACEOF
+
+fi
+
+
+
{ echo "$as_me:$LINENO: checking for linux/ixjuser.h" >&5
echo $ECHO_N "checking for linux/ixjuser.h... $ECHO_C" >&6; }
if test "${ac_cv_header_linux_ixjuser_h+set}" = set; then
@@ -39743,7 +39927,7 @@
/* end confdefs.h. */
#include <linux/version.h>
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+ #ifdef HAVE_LINUX_COMPILER_H
#include <linux/compiler.h>
#endif
Modified: team/murf/bug_7638/configure.ac
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/configure.ac?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/configure.ac (original)
+++ team/murf/bug_7638/configure.ac Tue Jul 17 21:09:35 2007
@@ -351,7 +351,15 @@
AC_LANG_PROGRAM([#include <resolv.h>],
[int foo = res_ninit(NULL);]),
AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_RES_NINIT], 1, [Define to 1 if your system has the re-entrant resolver functions.]),
+ AC_DEFINE([HAVE_RES_NINIT], 1, [Define to 1 if your system has the re-entrant resolver functions.])
+ AC_MSG_CHECKING(for res_ndestroy)
+ AC_LINK_IFELSE(
+ AC_LANG_PROGRAM([#include <resolv.h>],
+ [int foo = res_ndestroy(NULL);]),
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_RES_NDESTROY], 1, [Define to 1 if your system has the ndestroy resolver function.]),
+ AC_MSG_RESULT(no)
+ ),
AC_MSG_RESULT(no)
)
@@ -1020,9 +1028,12 @@
AC_CHECK_HEADER([h323.h], [PBX_H323=1], [PBX_H323=0])
AC_SUBST(PBX_H323)
+AC_CHECK_HEADER([linux/compiler.h],
+ [AC_DEFINE_UNQUOTED([HAVE_LINUX_COMPILER_H], 1, [Define to 1 if your system has linux/compiler.h.])])
+
AC_CHECK_HEADER([linux/ixjuser.h], [PBX_IXJUSER=1], [PBX_IXJUSER=0], [
#include <linux/version.h>
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+ #ifdef HAVE_LINUX_COMPILER_H
#include <linux/compiler.h>
#endif
])
Modified: team/murf/bug_7638/include/asterisk/ael_structs.h
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/include/asterisk/ael_structs.h?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/include/asterisk/ael_structs.h (original)
+++ team/murf/bug_7638/include/asterisk/ael_structs.h Tue Jul 17 21:09:35 2007
@@ -47,8 +47,6 @@
# define QUAD_MAX (0x7fffffffffffffffLL)
# endif
-
- PV_LOCALVARDEC, /* you know, local var=val; */ /* 28 */
#if 0
#endif
Modified: team/murf/bug_7638/include/asterisk/ast_expr.h
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/include/asterisk/ast_expr.h?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/include/asterisk/ast_expr.h (original)
+++ team/murf/bug_7638/include/asterisk/ast_expr.h Tue Jul 17 21:09:35 2007
@@ -19,7 +19,6 @@
#ifndef _ASTERISK_EXPR_H
#define _ASTERISK_EXPR_H
#ifndef STANDALONE
-#include "asterisk/channel.h"
#endif
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
Modified: team/murf/bug_7638/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/include/asterisk/autoconfig.h.in?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/include/asterisk/autoconfig.h.in (original)
+++ team/murf/bug_7638/include/asterisk/autoconfig.h.in Tue Jul 17 21:09:35 2007
@@ -244,6 +244,9 @@
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
+/* Define to 1 if your system has linux/compiler.h. */
+#undef HAVE_LINUX_COMPILER_H
+
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
@@ -423,6 +426,9 @@
/* Define to 1 if you have the `regcomp' function. */
#undef HAVE_REGCOMP
+
+/* Define to 1 if your system has the ndestroy resolver function. */
+#undef HAVE_RES_NDESTROY
/* Define to 1 if your system has the re-entrant resolver functions. */
#undef HAVE_RES_NINIT
Modified: team/murf/bug_7638/include/asterisk/monitor.h
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/include/asterisk/monitor.h?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/include/asterisk/monitor.h (original)
+++ team/murf/bug_7638/include/asterisk/monitor.h Tue Jul 17 21:09:35 2007
@@ -29,6 +29,11 @@
AST_MONITOR_RUNNING,
AST_MONITOR_PAUSED
};
+
+/* Streams recording control */
+#define X_REC_IN 1
+#define X_REC_OUT 2
+#define X_JOIN 4
/*! Responsible for channel monitoring data */
struct ast_channel_monitor {
Modified: team/murf/bug_7638/include/asterisk/pval.h
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/include/asterisk/pval.h?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/include/asterisk/pval.h (original)
+++ team/murf/bug_7638/include/asterisk/pval.h Tue Jul 17 21:09:35 2007
@@ -32,7 +32,7 @@
PV_EXTENSION, /* 25 */
PV_IGNOREPAT, /* 26 */
PV_GLOBALS, /* 27 */
-
+ PV_LOCALVARDEC, /* 28 */
} pvaltype;
/* why this horrible mess? It's always been a tradeoff-- tons of structs,
@@ -129,7 +129,7 @@
void check_switch_expr(pval *item, struct argapp *apps);
void ast_expr_register_extra_error_info(char *errmsg);
void ast_expr_clear_extra_error_info(void);
-int ast_expr(char *expr, char *buf, int length);
+int ast_expr(char *expr, char *buf, int length, struct ast_channel *chan);
struct pval *find_macro(char *name);
struct pval *find_context(char *name);
struct pval *find_context(char *name);
Modified: team/murf/bug_7638/include/asterisk/rtp.h
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/include/asterisk/rtp.h?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/include/asterisk/rtp.h (original)
+++ team/murf/bug_7638/include/asterisk/rtp.h Tue Jul 17 21:09:35 2007
@@ -211,7 +211,22 @@
/*! \brief Enable STUN capability */
void ast_rtp_setstun(struct ast_rtp *rtp, int stun_enable);
-/*! \brief Send STUN request (??) */
+/*! \brief Generic STUN request
+ * send a generic stun request to the server specified.
+ * \param s the socket used to send the request
+ * \param dst the address of the STUN server
+ * \param username if non null, add the username in the request
+ * \param answer if non null, the function waits for a response and
+ * puts here the externally visible address.
+ * \return 0 on success, other values on error.
+ * The interface it may change in the future.
+ */
+int ast_stun_request(int s, struct sockaddr_in *dst,
+ const char *username, struct sockaddr_in *answer);
+
+/*! \brief Send STUN request for an RTP socket
+ * Deprecated, this is just a wrapper for ast_rtp_stun_request()
+ */
void ast_rtp_stun_request(struct ast_rtp *rtp, struct sockaddr_in *suggestion, const char *username);
/*! \brief The RTP bridge.
Modified: team/murf/bug_7638/include/asterisk/speech.h
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/include/asterisk/speech.h?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/include/asterisk/speech.h (original)
+++ team/murf/bug_7638/include/asterisk/speech.h Tue Jul 17 21:09:35 2007
@@ -73,7 +73,7 @@
/*! Name of speech engine */
char *name;
/*! Set up the speech structure within the engine */
- int (*create)(struct ast_speech *speech);
+ int (*create)(struct ast_speech *speech, int format);
/*! Destroy any data set on the speech structure by the engine */
int (*destroy)(struct ast_speech *speech);
/*! Load a local grammar on the speech structure */
@@ -110,7 +110,7 @@
/*! Matched grammar */
char *grammar;
/*! List information */
- struct ast_speech_result *next;
+ AST_LIST_ENTRY(ast_speech_result) list;
};
/*! \brief Activate a grammar on a speech structure */
@@ -128,7 +128,7 @@
/*! \brief Indicate to the speech engine that audio is now going to start being written */
void ast_speech_start(struct ast_speech *speech);
/*! \brief Create a new speech structure */
-struct ast_speech *ast_speech_new(char *engine_name, int format);
+struct ast_speech *ast_speech_new(char *engine_name, int formats);
/*! \brief Destroy a speech structure */
int ast_speech_destroy(struct ast_speech *speech);
/*! \brief Write audio to the speech engine */
Modified: team/murf/bug_7638/include/asterisk/udptl.h
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/include/asterisk/udptl.h?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/include/asterisk/udptl.h (original)
+++ team/murf/bug_7638/include/asterisk/udptl.h Tue Jul 17 21:09:35 2007
@@ -42,7 +42,7 @@
/* Set UDPTL peer */
int (* const set_udptl_peer)(struct ast_channel *chan, struct ast_udptl *peer);
const char * const type;
- struct ast_udptl_protocol *next;
+ AST_RWLIST_ENTRY(ast_udptl_protocol) list;
};
struct ast_udptl;
Modified: team/murf/bug_7638/main/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/main/Makefile?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/main/Makefile (original)
+++ team/murf/bug_7638/main/Makefile Tue Jul 17 21:09:35 2007
@@ -27,8 +27,7 @@
netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \
cryptostub.o sha1.o http.o fixedjitterbuf.o abstract_jb.o \
strcompat.o threadstorage.o ../pbx/ael/ael_lex.o ../pbx/ael/ael.tab.o \
- dial.o
- event.o adsistub.o
+ event.o adsistub.o dial.o
# we need to link in the objects statically, not as a library, because
# otherwise modules will not have them available if none of the static
Modified: team/murf/bug_7638/main/app.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/main/app.c?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/main/app.c (original)
+++ team/murf/bug_7638/main/app.c Tue Jul 17 21:09:35 2007
@@ -908,7 +908,7 @@
AST_RWLIST_RDLOCK(&groups);
AST_RWLIST_TRAVERSE(&groups, gi, list) {
- if (!strcasecmp(gi->group, group) && (ast_strlen_zero(category) || !strcasecmp(gi->category, category)))
+ if (!strcasecmp(gi->group, group) && (ast_strlen_zero(category) || (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, category))))
count++;
}
AST_RWLIST_UNLOCK(&groups);
@@ -931,7 +931,7 @@
AST_RWLIST_RDLOCK(&groups);
AST_RWLIST_TRAVERSE(&groups, gi, list) {
- if (!regexec(®exbuf, gi->group, 0, NULL, 0) && (ast_strlen_zero(category) || !strcasecmp(gi->category, category)))
+ if (!regexec(®exbuf, gi->group, 0, NULL, 0) && (ast_strlen_zero(category) || (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, category))))
count++;
}
AST_RWLIST_UNLOCK(&groups);
Modified: team/murf/bug_7638/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/main/channel.c?view=diff&rev=75523&r1=75522&r2=75523
==============================================================================
--- team/murf/bug_7638/main/channel.c (original)
+++ team/murf/bug_7638/main/channel.c Tue Jul 17 21:09:35 2007
@@ -1992,6 +1992,7 @@
int ast_waitfordigit_full(struct ast_channel *c, int ms, int audiofd, int cmdfd)
{
+ int begin_digit = 0;
[... 7514 lines stripped ...]
More information about the asterisk-commits
mailing list