[asterisk-commits] russell: branch group/http_mods r60264 - in
/team/group/http_mods: ./ apps/ c...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Apr 5 08:40:08 MST 2007
Author: russell
Date: Thu Apr 5 10:40:07 2007
New Revision: 60264
URL: http://svn.digium.com/view/asterisk?view=rev&rev=60264
Log:
Merged revisions 59688,59724,59774,59804,59853,59887,59936,59939,59963,60013,60015,60017,60069,60088,60112,60137,60214 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r59688 | murf | 2007-04-02 12:31:32 -0500 (Mon, 02 Apr 2007) | 1 line
continue in for-loop should go to the incrementer, not the test. As per 9435, thanks to marcelbarbulescu
................
r59724 | file | 2007-04-02 13:58:24 -0500 (Mon, 02 Apr 2007) | 10 lines
Merged revisions 59723 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r59723 | file | 2007-04-02 14:55:25 -0400 (Mon, 02 Apr 2007) | 2 lines
Increase the maximum size for a string of mailboxes to 1024. (issue #9270 reported by rtucker)
........
................
r59774 | crichter | 2007-04-03 02:20:27 -0500 (Tue, 03 Apr 2007) | 17 lines
Merged revisions 59623-59624,59639 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r59623 | crichter | 2007-04-02 09:12:24 +0200 (Mo, 02 Apr 2007) | 1 line
we can now make 30 channels on a PRI (before we forgot chan 31..)
........
r59624 | crichter | 2007-04-02 09:25:54 +0200 (Mo, 02 Apr 2007) | 1 line
don't be verbose if no need
........
r59639 | crichter | 2007-04-02 14:08:12 +0200 (Mo, 02 Apr 2007) | 1 line
added option which allows us to accept incoming SETUP Messages without automatically sending Proceeding or Setup Acknowledge, this is useful with some broken switches and if you want to Release incoming calls without previously having acknowledged them. The new option is noautorespond_on_setup=yes|no default is no, so we don't break the existing behaviour
........
................
r59804 | nadi | 2007-04-03 06:02:46 -0500 (Tue, 03 Apr 2007) | 15 lines
Merged revisions 59788,59803 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r59788 | nadi | 2007-04-03 11:37:00 +0200 (Di, 03 Apr 2007) | 2 lines
Use the new sysfs way of mISDN 1.2 to check if a port is NT or not.
........
r59803 | nadi | 2007-04-03 12:40:58 +0200 (Di, 03 Apr 2007) | 2 lines
ptp is the 5th bit, not the 4th.
........
................
r59853 | russell | 2007-04-03 11:03:35 -0500 (Tue, 03 Apr 2007) | 1 line
Ensure that menuselect gets executed in dependency check mode every time you run make.
................
r59887 | russell | 2007-04-03 13:01:49 -0500 (Tue, 03 Apr 2007) | 13 lines
Merged revisions 59886 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r59886 | russell | 2007-04-03 12:58:19 -0500 (Tue, 03 Apr 2007) | 5 lines
When doing a built-in blind or attended transfer, restore the ability to use '#'
to terminate the number and immediately do the transfer instead of having to
dial the number and just wait for the feature digit timeout.
(issue #8366, xueliangliang)
........
................
r59936 | russell | 2007-04-03 13:55:57 -0500 (Tue, 03 Apr 2007) | 11 lines
Merged revisions 59916 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r59916 | russell | 2007-04-03 13:43:54 -0500 (Tue, 03 Apr 2007) | 3 lines
Make chan_sip report when it encounters an unknown option.
(issue #9440, reported by nightcrawler)
........
................
r59939 | russell | 2007-04-03 14:16:53 -0500 (Tue, 03 Apr 2007) | 12 lines
Merged revisions 59938 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r59938 | russell | 2007-04-03 14:15:04 -0500 (Tue, 03 Apr 2007) | 4 lines
Don't attempt to report configuration errors in build_user(). oej pointed out
that for a "friend" entry, this won't work, because all user options are valid
for peers, but not the other way around.
........
................
r59963 | file | 2007-04-03 14:40:59 -0500 (Tue, 03 Apr 2007) | 2 lines
Don't clash when a person both speaks and uses DTMF.
................
r60013 | russell | 2007-04-03 17:57:05 -0500 (Tue, 03 Apr 2007) | 10 lines
Blocked revisions 60012 via svnmerge
........
r60012 | russell | 2007-04-03 17:54:49 -0500 (Tue, 03 Apr 2007) | 3 lines
On Darwin, the -r argument to sed is not valid. It has to be -E.
(issue #9399, reported by jcovert)
........
................
r60015 | russell | 2007-04-03 18:00:36 -0500 (Tue, 03 Apr 2007) | 10 lines
Blocked revisions 60014 via svnmerge
........
r60014 | russell | 2007-04-03 18:00:10 -0500 (Tue, 03 Apr 2007) | 3 lines
Use the more generic check for "sed -r" support that was already present in 1.4.
(related to issue #9399)
........
................
r60017 | russell | 2007-04-03 18:25:24 -0500 (Tue, 03 Apr 2007) | 10 lines
Blocked revisions 60016 via svnmerge
........
r60016 | russell | 2007-04-03 18:23:23 -0500 (Tue, 03 Apr 2007) | 3 lines
Add a missing "\r\n" in the body of the NOTIFY that is sent to indicate the
status of a transfer. (issue #9388, reported by rarritt)
........
................
r60069 | russell | 2007-04-04 11:26:23 -0500 (Wed, 04 Apr 2007) | 4 lines
Fix a problem where if a trunk was hung up while it was on hold, all of the
hints would reflect the line still on hold, even though it should reflect that
it is back to not in use. (issue #9459, reported by francesco_r, fixed by me)
................
r60088 | russell | 2007-04-04 11:39:04 -0500 (Wed, 04 Apr 2007) | 12 lines
Merged revisions 60083 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r60083 | russell | 2007-04-04 11:37:04 -0500 (Wed, 04 Apr 2007) | 4 lines
Fix the return value of handle_common_options() so that it always properly
indicates whether it handled the option or not.
(issue #9455, reported by Netview, fixed by me)
........
................
r60112 | russell | 2007-04-04 11:49:45 -0500 (Wed, 04 Apr 2007) | 3 lines
Add a Content-Length of 0 to the response built by transmit_response_with_unsupported().
(issue #9454, reported by makoto, fixed by me)
................
r60137 | russell | 2007-04-04 12:40:10 -0500 (Wed, 04 Apr 2007) | 14 lines
Merged revisions 60134 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r60134 | russell | 2007-04-04 12:38:47 -0500 (Wed, 04 Apr 2007) | 6 lines
It is valid to redirect channels via the manager interface that are not in the
UP state. Instead of checking for that to prevent to ensure a dead channel
doesn't get redirected, just use the ast_check_hangup() API call.
(issue #9457, reported by Callmewind, patch by me)
(related to issue #8977)
........
................
r60214 | file | 2007-04-05 07:55:02 -0500 (Thu, 05 Apr 2007) | 10 lines
Merged revisions 60213 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r60213 | file | 2007-04-05 08:52:50 -0400 (Thu, 05 Apr 2007) | 2 lines
Only unlock our pvt and net locks if we are actually going to try to lock the owner again. (issue #9472 reported by zoa)
........
................
Modified:
team/group/http_mods/ (props changed)
team/group/http_mods/Makefile
team/group/http_mods/apps/app_meetme.c
team/group/http_mods/apps/app_speech_utils.c
team/group/http_mods/apps/app_voicemail.c
team/group/http_mods/channels/chan_misdn.c
team/group/http_mods/channels/chan_sip.c
team/group/http_mods/channels/misdn/chan_misdn_config.h
team/group/http_mods/channels/misdn/isdn_lib.c
team/group/http_mods/channels/misdn_config.c
team/group/http_mods/main/app.c
team/group/http_mods/main/manager.c
team/group/http_mods/pbx/pbx_ael.c
Propchange: team/group/http_mods/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.
Propchange: team/group/http_mods/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/group/http_mods/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Apr 5 10:40:07 2007
@@ -1,1 +1,1 @@
-/branches/1.4:1-59686
+/branches/1.4:1-60263
Modified: team/group/http_mods/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/http_mods/Makefile?view=diff&rev=60264&r1=60263&r2=60264
==============================================================================
--- team/group/http_mods/Makefile (original)
+++ team/group/http_mods/Makefile Thu Apr 5 10:40:07 2007
@@ -686,4 +686,4 @@
@echo "Generating input for menuselect ..."
@build_tools/prep_moduledeps > $@
-.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS)
+.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) menuselect.makeopts
Modified: team/group/http_mods/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/group/http_mods/apps/app_meetme.c?view=diff&rev=60264&r1=60263&r2=60264
==============================================================================
--- team/group/http_mods/apps/app_meetme.c (original)
+++ team/group/http_mods/apps/app_meetme.c Thu Apr 5 10:40:07 2007
@@ -4039,6 +4039,9 @@
conf = NULL;
}
+ /* If the trunk is going away, it is definitely now IDLE. */
+ sla_change_trunk_state(trunk_ref->trunk, SLA_TRUNK_STATE_IDLE, ALL_TRUNK_REFS, NULL);
+
trunk_ref->trunk->chan = NULL;
ast_dial_join(dial);
Modified: team/group/http_mods/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/team/group/http_mods/apps/app_speech_utils.c?view=diff&rev=60264&r1=60263&r2=60264
==============================================================================
--- team/group/http_mods/apps/app_speech_utils.c (original)
+++ team/group/http_mods/apps/app_speech_utils.c Thu Apr 5 10:40:07 2007
@@ -590,7 +590,7 @@
}
/* Do timeout check (shared between audio/dtmf) */
- if (!quieted && started == 1) {
+ if ((!quieted || strlen(dtmf)) && started == 1) {
time(¤t);
if ((current-start) >= timeout) {
done = 1;
@@ -677,11 +677,13 @@
} else {
if (chan->stream != NULL) {
ast_stopstream(chan);
+ }
+ if (!started) {
/* Change timeout to be 5 seconds for DTMF input */
timeout = (chan->pbx && chan->pbx->dtimeout) ? chan->pbx->dtimeout : 5;
- time(&start);
started = 1;
}
+ time(&start);
snprintf(tmp, sizeof(tmp), "%c", f->subclass);
strncat(dtmf, tmp, sizeof(dtmf));
}
Modified: team/group/http_mods/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/group/http_mods/apps/app_voicemail.c?view=diff&rev=60264&r1=60263&r2=60264
==============================================================================
--- team/group/http_mods/apps/app_voicemail.c (original)
+++ team/group/http_mods/apps/app_voicemail.c Thu Apr 5 10:40:07 2007
@@ -2828,7 +2828,7 @@
char fmt[80];
char *context;
char ecodes[16] = "#";
- char tmp[256] = "", *tmpptr;
+ char tmp[1024] = "", *tmpptr;
struct ast_vm_user *vmu;
struct ast_vm_user svm;
const char *category = NULL;
Modified: team/group/http_mods/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/group/http_mods/channels/chan_misdn.c?view=diff&rev=60264&r1=60263&r2=60264
==============================================================================
--- team/group/http_mods/channels/chan_misdn.c (original)
+++ team/group/http_mods/channels/chan_misdn.c Thu Apr 5 10:40:07 2007
@@ -114,6 +114,7 @@
MISDN_NOTHING=0, /*!< at beginning */
MISDN_WAITING4DIGS, /*!< when waiting for infos */
MISDN_EXTCANTMATCH, /*!< when asterisk couldnt match our ext */
+ MISDN_INCOMING_SETUP, /*!< for incoming setups*/
MISDN_DIALING, /*!< when pbx_start */
MISDN_PROGRESS, /*!< we got a progress */
MISDN_PROCEEDING, /*!< we got a progress */
@@ -151,6 +152,8 @@
int need_queue_hangup;
int need_hangup;
int need_busy;
+
+ int noautorespond_on_setup;
int orginator;
@@ -946,6 +949,7 @@
{MISDN_NOTHING,"NOTHING"}, /* at beginning */
{MISDN_WAITING4DIGS,"WAITING4DIGS"}, /* when waiting for infos */
{MISDN_EXTCANTMATCH,"EXTCANTMATCH"}, /* when asterisk couldnt match our ext */
+ {MISDN_INCOMING_SETUP,"INCOMING SETUP"}, /* when pbx_start */
{MISDN_DIALING,"DIALING"}, /* when pbx_start */
{MISDN_PROGRESS,"PROGRESS"}, /* when pbx_start */
{MISDN_PROCEEDING,"PROCEEDING"}, /* when pbx_start */
@@ -1710,6 +1714,8 @@
misdn_cfg_get( port, MISDN_CFG_NEED_MORE_INFOS, &bc->need_more_infos, sizeof(int));
misdn_cfg_get( port, MISDN_CFG_NTTIMEOUT, &ch->nttimeout, sizeof(int));
+ misdn_cfg_get( port, MISDN_CFG_NOAUTORESPOND_ON_SETUP, &ch->noautorespond_on_setup, sizeof(int));
+
misdn_cfg_get( port, MISDN_CFG_FAR_ALERTING, &ch->far_alerting, sizeof(int));
misdn_cfg_get( port, MISDN_CFG_ALLOWED_BEARERS, &ch->allowed_bearers, BUFFERSIZE);
@@ -2020,11 +2026,11 @@
misdn_cfg_get( 0, MISDN_GEN_BRIDGING, &bridging, sizeof(int));
if (bridging && ch->other_ch) {
#ifdef MISDN_1_2
- chan_misdn_log(0, port, "Disabling EC (aka Pipeline) on both Sides\n");
+ chan_misdn_log(1, port, "Disabling EC (aka Pipeline) on both Sides\n");
*ch->bc->pipeline=0;
*ch->other_ch->bc->pipeline=0;
#else
- chan_misdn_log(0, port, "Disabling EC on both Sides\n");
+ chan_misdn_log(1, port, "Disabling EC on both Sides\n");
ch->bc->ec_enable=0;
ch->other_ch->bc->ec_enable=0;
#endif
@@ -2404,6 +2410,7 @@
chan_misdn_log(2, bc->port, " --> state:%s\n", misdn_get_ch_state(p));
switch (p->state) {
+ case MISDN_INCOMING_SETUP:
case MISDN_CALLING:
p->state=MISDN_CLEANING;
misdn_lib_send_event( bc, EVENT_RELEASE_COMPLETE);
@@ -3495,16 +3502,20 @@
ch->state=MISDN_DIALING;
- if (bc->nt) {
- int ret;
- ret = misdn_lib_send_event(bc, EVENT_SETUP_ACKNOWLEDGE );
- } else {
- int ret;
- if ( misdn_lib_is_ptp(bc->port)) {
+ if (!ch->noautorespond_on_setup) {
+ if (bc->nt) {
+ int ret;
ret = misdn_lib_send_event(bc, EVENT_SETUP_ACKNOWLEDGE );
} else {
- ret = misdn_lib_send_event(bc, EVENT_PROCEEDING );
- }
+ int ret;
+ if ( misdn_lib_is_ptp(bc->port)) {
+ ret = misdn_lib_send_event(bc, EVENT_SETUP_ACKNOWLEDGE );
+ } else {
+ ret = misdn_lib_send_event(bc, EVENT_PROCEEDING );
+ }
+ }
+ } else {
+ ch->state = MISDN_INCOMING_SETUP;
}
if ( !bc->nt && (ch->orginator==ORG_MISDN) && !ch->incoming_early_audio )
@@ -4066,8 +4077,12 @@
/* Check for Pickup Request first */
if (!strcmp(chan->exten, ast_pickup_ext())) {
- int ret;/** Sending SETUP_ACK**/
- ret = misdn_lib_send_event(bc, EVENT_SETUP_ACKNOWLEDGE );
+ if (!ch->noautorespond_on_setup) {
+ int ret;/** Sending SETUP_ACK**/
+ ret = misdn_lib_send_event(bc, EVENT_SETUP_ACKNOWLEDGE );
+ } else {
+ ch->state = MISDN_INCOMING_SETUP;
+ }
if (ast_pickup_call(chan)) {
hangup_chan(ch);
} else {
@@ -4125,14 +4140,19 @@
}
if (!ch->overlap_dial && ast_exists_extension(ch->ast, ch->context, bc->dad, 1, bc->oad)) {
- ch->state=MISDN_DIALING;
-
- if (bc->nt || (bc->need_more_infos && misdn_lib_is_ptp(bc->port)) ) {
- int ret;
- ret = misdn_lib_send_event(bc, EVENT_SETUP_ACKNOWLEDGE );
+
+ if (!ch->noautorespond_on_setup) {
+ ch->state=MISDN_DIALING;
+
+ if (bc->nt || (bc->need_more_infos && misdn_lib_is_ptp(bc->port)) ) {
+ int ret;
+ ret = misdn_lib_send_event(bc, EVENT_SETUP_ACKNOWLEDGE );
+ } else {
+ int ret;
+ ret= misdn_lib_send_event(bc, EVENT_PROCEEDING );
+ }
} else {
- int ret;
- ret= misdn_lib_send_event(bc, EVENT_PROCEEDING );
+ ch->state = MISDN_INCOMING_SETUP;
}
if (pbx_start_chan(ch)<0) {
@@ -4162,7 +4182,6 @@
}
} else {
-
int ret= misdn_lib_send_event(bc, EVENT_SETUP_ACKNOWLEDGE );
if (ret == -ENOCHAN) {
ast_log(LOG_WARNING,"Channel was catched, before we could Acknowledge\n");
Modified: team/group/http_mods/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/http_mods/channels/chan_sip.c?view=diff&rev=60264&r1=60263&r2=60264
==============================================================================
--- team/group/http_mods/channels/chan_sip.c (original)
+++ team/group/http_mods/channels/chan_sip.c Thu Apr 5 10:40:07 2007
@@ -5815,6 +5815,7 @@
respprep(&resp, p, msg, req);
append_date(&resp);
add_header(&resp, "Unsupported", unsupported);
+ add_header_contentLength(&resp, 0);
return send_response(p, &resp, XMIT_UNRELIABLE, 0);
}
@@ -14897,7 +14898,8 @@
append_history(p, "Rx", "%s / %s / %s", req.data, get_header(&req, "CSeq"), req.rlPart2);
if (!lockretry) {
- ast_log(LOG_ERROR, "We could NOT get the channel lock for %s! \n", S_OR(p->owner->name, "- no channel name ??? - "));
+ if (p->owner)
+ ast_log(LOG_ERROR, "We could NOT get the channel lock for %s! \n", S_OR(p->owner->name, "- no channel name ??? - "));
ast_log(LOG_ERROR, "SIP transaction failed: %s \n", p->callid);
if (req.method != SIP_ACK)
transmit_response(p, "503 Server error", &req); /* We must respond according to RFC 3261 sec 12.2 */
@@ -15444,26 +15446,22 @@
*/
static int handle_common_options(struct ast_flags *flags, struct ast_flags *mask, struct ast_variable *v)
{
- int res = 0;
+ int res = 1;
static int dep_insecure_very = 0;
static int dep_insecure_yes = 0;
if (!strcasecmp(v->name, "trustrpid")) {
ast_set_flag(&mask[0], SIP_TRUSTRPID);
ast_set2_flag(&flags[0], ast_true(v->value), SIP_TRUSTRPID);
- res = 1;
} else if (!strcasecmp(v->name, "sendrpid")) {
ast_set_flag(&mask[0], SIP_SENDRPID);
ast_set2_flag(&flags[0], ast_true(v->value), SIP_SENDRPID);
- res = 1;
} else if (!strcasecmp(v->name, "g726nonstandard")) {
ast_set_flag(&mask[0], SIP_G726_NONSTANDARD);
ast_set2_flag(&flags[0], ast_true(v->value), SIP_G726_NONSTANDARD);
- res = 1;
} else if (!strcasecmp(v->name, "useclientcode")) {
ast_set_flag(&mask[0], SIP_USECLIENTCODE);
ast_set2_flag(&flags[0], ast_true(v->value), SIP_USECLIENTCODE);
- res = 1;
} else if (!strcasecmp(v->name, "dtmfmode")) {
ast_set_flag(&mask[0], SIP_DTMF);
ast_clear_flag(&flags[0], SIP_DTMF);
@@ -15479,7 +15477,6 @@
ast_log(LOG_WARNING, "Unknown dtmf mode '%s' on line %d, using rfc2833\n", v->value, v->lineno);
ast_set_flag(&flags[0], SIP_DTMF_RFC2833);
}
- res = 1;
} else if (!strcasecmp(v->name, "nat")) {
ast_set_flag(&mask[0], SIP_NAT);
ast_clear_flag(&flags[0], SIP_NAT);
@@ -15491,7 +15488,6 @@
ast_set_flag(&flags[0], SIP_NAT_ALWAYS);
else
ast_set_flag(&flags[0], SIP_NAT_RFC3581);
- res = 1;
} else if (!strcasecmp(v->name, "canreinvite")) {
ast_set_flag(&mask[0], SIP_REINVITE);
ast_clear_flag(&flags[0], SIP_REINVITE);
@@ -15513,7 +15509,6 @@
}
}
}
- res = 1;
} else if (!strcasecmp(v->name, "insecure")) {
ast_set_flag(&mask[0], SIP_INSECURE_PORT | SIP_INSECURE_INVITE);
ast_clear_flag(&flags[0], SIP_INSECURE_PORT | SIP_INSECURE_INVITE);
@@ -15546,7 +15541,6 @@
ast_log(LOG_WARNING, "Unknown insecure mode '%s' on line %d\n", v->value, v->lineno);
}
}
- res = 1;
} else if (!strcasecmp(v->name, "progressinband")) {
ast_set_flag(&mask[0], SIP_PROG_INBAND);
ast_clear_flag(&flags[0], SIP_PROG_INBAND);
@@ -15554,46 +15548,37 @@
ast_set_flag(&flags[0], SIP_PROG_INBAND_YES);
else if (strcasecmp(v->value, "never"))
ast_set_flag(&flags[0], SIP_PROG_INBAND_NO);
- res = 1;
} else if (!strcasecmp(v->name, "promiscredir")) {
ast_set_flag(&mask[0], SIP_PROMISCREDIR);
ast_set2_flag(&flags[0], ast_true(v->value), SIP_PROMISCREDIR);
- res = 1;
} else if (!strcasecmp(v->name, "videosupport")) {
ast_set_flag(&mask[1], SIP_PAGE2_VIDEOSUPPORT);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_VIDEOSUPPORT);
- res = 1;
} else if (!strcasecmp(v->name, "allowoverlap")) {
ast_set_flag(&mask[1], SIP_PAGE2_ALLOWOVERLAP);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_ALLOWOVERLAP);
- res = 1;
} else if (!strcasecmp(v->name, "allowsubscribe")) {
ast_set_flag(&mask[1], SIP_PAGE2_ALLOWSUBSCRIBE);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_ALLOWSUBSCRIBE);
- res = 1;
} else if (!strcasecmp(v->name, "t38pt_udptl")) {
ast_set_flag(&mask[1], SIP_PAGE2_T38SUPPORT_UDPTL);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_UDPTL);
- res = 1;
#ifdef WHEN_WE_HAVE_T38_FOR_OTHER_TRANSPORTS
} else if (!strcasecmp(v->name, "t38pt_rtp")) {
ast_set_flag(&mask[1], SIP_PAGE2_T38SUPPORT_RTP);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_RTP);
- res = 1;
} else if (!strcasecmp(v->name, "t38pt_tcp")) {
ast_set_flag(&mask[1], SIP_PAGE2_T38SUPPORT_TCP);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_TCP);
- res = 1;
#endif
} else if (!strcasecmp(v->name, "rfc2833compensate")) {
ast_set_flag(&mask[1], SIP_PAGE2_RFC2833_COMPENSATE);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_RFC2833_COMPENSATE);
- res = 1;
} else if (!strcasecmp(v->name, "buggymwi")) {
ast_set_flag(&mask[1], SIP_PAGE2_BUGGY_MWI);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_BUGGY_MWI);
- res = 1;
- }
+ } else
+ res = 0;
return res;
}
@@ -15852,6 +15837,9 @@
if (user->maxcallbitrate < 0)
user->maxcallbitrate = default_maxcallbitrate;
}
+ /* We can't just report unknown options here because this may be a
+ * type=friend entry. All user options are valid for a peer, but not
+ * the other way around. */
}
ast_copy_flags(&user->flags[0], &userflags[0], mask[0].flags);
ast_copy_flags(&user->flags[1], &userflags[1], mask[1].flags);
@@ -16148,7 +16136,8 @@
peer->maxcallbitrate = atoi(v->value);
if (peer->maxcallbitrate < 0)
peer->maxcallbitrate = default_maxcallbitrate;
- }
+ } else if (strcasecmp(v->name, "type"))
+ ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno);
}
if (!ast_test_flag(&global_flags[1], SIP_PAGE2_IGNOREREGEXPIRE) && ast_test_flag(&peer->flags[1], SIP_PAGE2_DYNAMIC) && realtime) {
time_t nowtime = time(NULL);
@@ -16532,7 +16521,8 @@
default_maxcallbitrate = DEFAULT_MAX_CALL_BITRATE;
} else if (!strcasecmp(v->name, "matchexterniplocally")) {
global_matchexterniplocally = ast_true(v->value);
- }
+ } else
+ ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno);
}
if (!allow_external_domains && AST_LIST_EMPTY(&domain_list)) {
@@ -16545,6 +16535,8 @@
/* Format for authentication is auth = username:password at realm */
if (!strcasecmp(v->name, "auth"))
authl = add_realm_authentication(authl, v->value, v->lineno);
+ else
+ ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno);
}
ucfg = ast_config_load("users.conf");
Modified: team/group/http_mods/channels/misdn/chan_misdn_config.h
URL: http://svn.digium.com/view/asterisk/team/group/http_mods/channels/misdn/chan_misdn_config.h?view=diff&rev=60264&r1=60263&r2=60264
==============================================================================
--- team/group/http_mods/channels/misdn/chan_misdn_config.h (original)
+++ team/group/http_mods/channels/misdn/chan_misdn_config.h Thu Apr 5 10:40:07 2007
@@ -65,6 +65,7 @@
MISDN_CFG_BNEC_ADAPT,
#endif
MISDN_CFG_NEED_MORE_INFOS, /* bool */
+ MISDN_CFG_NOAUTORESPOND_ON_SETUP, /* bool */
MISDN_CFG_NTTIMEOUT, /* bool */
MISDN_CFG_JITTERBUFFER, /* int */
MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD, /* int */
@@ -83,7 +84,9 @@
/* general config items */
MISDN_GEN_FIRST,
+#ifndef MISDN_1_2
MISDN_GEN_MISDN_INIT, /* char[] */
+#endif
MISDN_GEN_DEBUG, /* int */
MISDN_GEN_TRACEFILE, /* char[] */
MISDN_GEN_BRIDGING, /* int (bool) */
Modified: team/group/http_mods/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/team/group/http_mods/channels/misdn/isdn_lib.c?view=diff&rev=60264&r1=60263&r2=60264
==============================================================================
--- team/group/http_mods/channels/misdn/isdn_lib.c (original)
+++ team/group/http_mods/channels/misdn/isdn_lib.c Thu Apr 5 10:40:07 2007
@@ -443,9 +443,11 @@
}
channel--;
+
+ int bnums=stack->pri?stack->b_num:stack->b_num-1;
if (dec) {
- for (i = stack->b_num-1; i >=0; i--) {
+ for (i = bnums; i >=0; i--) {
if (i != 15 && (channel < 0 || i == channel)) { /* skip E1 Dchannel ;) and work with chan preselection */
if (!stack->channels[i]) {
cb_log (3, stack->port, " --> found chan%s: %d\n", channel>=0?" (preselected)":"", i+1);
@@ -455,7 +457,7 @@
}
}
} else {
- for (i = 0; i < stack->b_num; i++) {
+ for (i = 0; i <= bnums; i++) {
if (i != 15 && (channel < 0 || i == channel)) { /* skip E1 Dchannel ;) and work with chan preselection */
if (!stack->channels[i]) {
cb_log (3, stack->port, " --> found chan%s: %d\n", channel>=0?" (preselected)":"", i+1);
Modified: team/group/http_mods/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/team/group/http_mods/channels/misdn_config.c?view=diff&rev=60264&r1=60263&r2=60264
==============================================================================
--- team/group/http_mods/channels/misdn_config.c (original)
+++ team/group/http_mods/channels/misdn_config.c Thu Apr 5 10:40:07 2007
@@ -261,6 +261,11 @@
"Send Setup_Acknowledge on incoming calls anyway (instead of PROCEEDING),\n"
"\tthis requests additional Infos, so we can waitfordigits without much\n"
"\tissues. This works only for PTP Ports" },
+ { "noautorespond_on_setup", MISDN_CFG_NOAUTORESPOND_ON_SETUP, MISDN_CTYPE_BOOL, "0", NONE,
+ "Do not send SETUP_ACKNOWLEDGE or PROCEEDING automatically to the calling Party.\n"
+ "Instead we directly jump into the dialplan. This might be useful for fast call\n"
+ "rejection, or for some broken switches, that need hangup causes like busy in the.\n"
+ "RELEASE_COMPLETE Message, instead of the DISCONNECT Message.\n"},
{ "jitterbuffer", MISDN_CFG_JITTERBUFFER, MISDN_CTYPE_INT, "4000", NONE,
"The jitterbuffer." },
{ "jitterbuffer_upper_threshold", MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD, MISDN_CTYPE_INT, "0", NONE,
@@ -323,8 +328,10 @@
"\t2 - Messages + Message specific Informations (e.g. bearer capability)\n"
"\t3 - very Verbose, the above + lots of Driver specific infos\n"
"\t4 - even more Verbose than 3" },
+#ifndef MISDN_1_2
{ "misdn_init", MISDN_GEN_MISDN_INIT, MISDN_CTYPE_STR, "/etc/misdn-init.conf", NONE,
"Set the path to the misdn-init.conf (for nt_ptp mode checking)." },
+#endif
{ "tracefile", MISDN_GEN_TRACEFILE, MISDN_CTYPE_STR, "/var/log/asterisk/misdn.log", NONE,
"Set the path to the massively growing trace file, if you want that." },
{ "bridging", MISDN_GEN_BRIDGING, MISDN_CTYPE_BOOL, "yes", NONE,
@@ -973,6 +980,7 @@
void misdn_cfg_update_ptp (void)
{
+#ifndef MISDN_1_2
char misdn_init[BUFFERSIZE];
char line[BUFFERSIZE];
FILE *fp;
@@ -1003,6 +1011,26 @@
ast_log(LOG_WARNING,"Couldn't open %s: %s\n", misdn_init, strerror(errno));
}
}
+#else
+ int i;
+ int proto;
+ char filename[128];
+ FILE *fp;
+
+ for (i = 1; i <= max_ports; ++i) {
+ snprintf(filename, sizeof(filename), "/sys/class/mISDN-stacks/st-%08x/protocol", i << 8);
+ fp = fopen(filename, "r");
+ if (!fp) {
+ ast_log(LOG_WARNING, "Could not open %s: %s\n", filename, strerror(errno));
+ continue;
+ }
+ if (fscanf(fp, "0x%08x", &proto) != 1)
+ ast_log(LOG_WARNING, "Could not parse contents of %s!\n", filename);
+ else
+ ptp[i] = proto & 1<<5 ? 1 : 0;
+ fclose(fp);
+ }
+#endif
}
static void _fill_defaults (void)
Modified: team/group/http_mods/main/app.c
URL: http://svn.digium.com/view/asterisk/team/group/http_mods/main/app.c?view=diff&rev=60264&r1=60263&r2=60264
==============================================================================
--- team/group/http_mods/main/app.c (original)
+++ team/group/http_mods/main/app.c Thu Apr 5 10:40:07 2007
@@ -85,14 +85,11 @@
ast_playtones_stop(chan);
if (res < 1)
break;
+ if (res == '#')
+ break;
collect[x++] = res;
- if (!ast_matchmore_extension(chan, context, collect, 1, chan->cid.cid_num)) {
- if (collect[x-1] == '#') {
- /* Not a valid extension, ending in #, assume the # was to finish dialing */
- collect[x-1] = '\0';
- }
+ if (!ast_matchmore_extension(chan, context, collect, 1, chan->cid.cid_num))
break;
- }
}
if (res >= 0)
res = ast_exists_extension(chan, context, collect, 1, chan->cid.cid_num) ? 1 : 0;
Modified: team/group/http_mods/main/manager.c
URL: http://svn.digium.com/view/asterisk/team/group/http_mods/main/manager.c?view=diff&rev=60264&r1=60263&r2=60264
==============================================================================
--- team/group/http_mods/main/manager.c (original)
+++ team/group/http_mods/main/manager.c Thu Apr 5 10:40:07 2007
@@ -1558,14 +1558,14 @@
astman_send_error(s, m, buf);
return 0;
}
- if (chan->_state != AST_STATE_UP) {
+ if (ast_check_hangup(chan)) {
astman_send_error(s, m, "Redirect failed, channel not up.\n");
ast_channel_unlock(chan);
return 0;
}
if (!ast_strlen_zero(name2))
chan2 = ast_get_channel_by_name_locked(name2);
- if (chan2 && chan2->_state != AST_STATE_UP) {
+ if (chan2 && ast_check_hangup(chan2)) {
astman_send_error(s, m, "Redirect failed, extra channel not up.\n");
ast_channel_unlock(chan);
ast_channel_unlock(chan2);
Modified: team/group/http_mods/pbx/pbx_ael.c
URL: http://svn.digium.com/view/asterisk/team/group/http_mods/pbx/pbx_ael.c?view=diff&rev=60264&r1=60263&r2=60264
==============================================================================
--- team/group/http_mods/pbx/pbx_ael.c (original)
+++ team/group/http_mods/pbx/pbx_ael.c Thu Apr 5 10:40:07 2007
@@ -2993,7 +2993,7 @@
/* now, put the body of the for loop here */
exten->loop_break = for_end;
- exten->loop_continue = for_test;
+ exten->loop_continue = for_inc;
gen_prios(exten, new_label, p->u4.for_statements, mother_exten, this_context); /* this will link in all the statements here */
More information about the asterisk-commits
mailing list