[asterisk-commits] branch russell/make_menuconfig - r7501 in
/team/russell/make_menuconfig: ./ a...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Dec 16 09:20:25 CST 2005
Author: russell
Date: Fri Dec 16 09:20:20 2005
New Revision: 7501
URL: http://svn.digium.com/view/asterisk?rev=7501&view=rev
Log:
Merged revisions 7446,7457,7469,7471-7472,7481,7494,7496,7498 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r7446 | crichter | 2005-12-12 17:26:35 -0500 (Mon, 12 Dec 2005) | 1 line
updated the documentation and the sample config to meet the present
................
r7457 | kpfleming | 2005-12-13 01:00:17 -0500 (Tue, 13 Dec 2005) | 25 lines
Merged revisions 7448-7449,7451,7453 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7448 | kpfleming | 2005-12-12 22:25:14 -0600 (Mon, 12 Dec 2005) | 2 lines
use the stream's current point when pausing/unpausing, instead of elapsed time (which doesn't work when the stream has been skipped forward or backward) (issue #5897)
........
r7449 | kpfleming | 2005-12-12 22:43:38 -0600 (Mon, 12 Dec 2005) | 2 lines
only report AGENT_IDLE for callback mode agents when they are actually idle (issue #5902)
........
r7451 | kpfleming | 2005-12-12 23:14:27 -0600 (Mon, 12 Dec 2005) | 2 lines
ensure that hangups while incoming calls are in early state are handled properly (issue #5919)
........
r7453 | kpfleming | 2005-12-12 23:53:00 -0600 (Mon, 12 Dec 2005) | 2 lines
restore ability of caller to hangup calls that are still ringing (issue #5839)
........
................
r7469 | kpfleming | 2005-12-13 11:07:19 -0500 (Tue, 13 Dec 2005) | 10 lines
Merged revisions 7468 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7468 | kpfleming | 2005-12-13 10:06:27 -0600 (Tue, 13 Dec 2005) | 2 lines
correct broken math in tvfix() for timestamp values over one million
........
................
r7471 | kpfleming | 2005-12-13 13:54:41 -0500 (Tue, 13 Dec 2005) | 10 lines
Merged revisions 7470 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7470 | kpfleming | 2005-12-13 12:54:22 -0600 (Tue, 13 Dec 2005) | 2 lines
clarify substring documentation
........
................
r7472 | russell | 2005-12-13 17:03:06 -0500 (Tue, 13 Dec 2005) | 2 lines
reduce some duplicated code when doing a strdup (issue #5986)
................
r7481 | bweschke | 2005-12-14 21:49:17 -0500 (Wed, 14 Dec 2005) | 3 lines
Bug #6003 - Don't free the channel structure until after having sent the manager event.
................
r7494 | tilghman | 2005-12-15 12:31:52 -0500 (Thu, 15 Dec 2005) | 2 lines
Make sure the functions CUT and SORT are built.
................
r7496 | tilghman | 2005-12-15 14:05:41 -0500 (Thu, 15 Dec 2005) | 2 lines
Properly move these functions over to the funcs directory (since they no longer contain apps)
................
r7498 | tilghman | 2005-12-15 19:55:39 -0500 (Thu, 15 Dec 2005) | 3 lines
First field was truncated.
(Don't kill me; this attempted merge didn't work because the paths changed.)
................
Added:
team/russell/make_menuconfig/funcs/func_cut.c
- copied unchanged from r7498, trunk/funcs/func_cut.c
Removed:
team/russell/make_menuconfig/apps/app_cut.c
Modified:
team/russell/make_menuconfig/ (props changed)
team/russell/make_menuconfig/app.c
team/russell/make_menuconfig/apps/app_dial.c
team/russell/make_menuconfig/apps/app_macro.c
team/russell/make_menuconfig/channel.c
team/russell/make_menuconfig/channels/chan_agent.c
team/russell/make_menuconfig/channels/chan_sip.c
team/russell/make_menuconfig/configs/misdn.conf.sample
team/russell/make_menuconfig/doc/README.misdn
team/russell/make_menuconfig/doc/README.variables
team/russell/make_menuconfig/pbx.c
team/russell/make_menuconfig/utils.c
Propchange: team/russell/make_menuconfig/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Dec 16 09:20:20 2005
@@ -1,1 +1,1 @@
-/trunk:1-7441
+/trunk:1-7500
Modified: team/russell/make_menuconfig/app.c
URL: http://svn.digium.com/view/asterisk/team/russell/make_menuconfig/app.c?rev=7501&r1=7500&r2=7501&view=diff
==============================================================================
--- team/russell/make_menuconfig/app.c (original)
+++ team/russell/make_menuconfig/app.c Fri Dec 16 09:20:20 2005
@@ -430,11 +430,11 @@
const char *stop, const char *pause,
const char *restart, int skipms)
{
- long elapsed = 0, last_elapsed = 0;
char *breaks = NULL;
char *end = NULL;
int blen = 2;
int res;
+ long pause_restart_point = 0;
if (stop)
blen += strlen(stop);
@@ -456,9 +456,6 @@
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);
- if (chan)
- ast_stopstream(chan);
-
if (file) {
if ((end = strchr(file,':'))) {
if (!strcasecmp(end, ":end")) {
@@ -469,25 +466,18 @@
}
for (;;) {
- struct timeval started = ast_tvnow();
-
- if (chan)
- ast_stopstream(chan);
+ ast_stopstream(chan);
res = ast_streamfile(chan, file, chan->language);
if (!res) {
- if (end) {
+ if (pause_restart_point) {
+ ast_seekstream(chan->stream, pause_restart_point, SEEK_SET);
+ pause_restart_point = 0;
+ }
+ else if (end) {
ast_seekstream(chan->stream, 0, SEEK_END);
- end=NULL;
- }
- res = 1;
- if (elapsed) {
- ast_stream_fastforward(chan->stream, elapsed);
- last_elapsed = elapsed - 200;
- }
- if (res)
- res = ast_waitstream_fr(chan, breaks, fwd, rev, skipms);
- else
- break;
+ end = NULL;
+ };
+ res = ast_waitstream_fr(chan, breaks, fwd, rev, skipms);
}
if (res < 1)
@@ -496,17 +486,16 @@
/* We go at next loop if we got the restart char */
if (restart && strchr(restart, res)) {
ast_log(LOG_DEBUG, "we'll restart the stream here at next loop\n");
- elapsed=0; /* To make sure the next stream will start at beginning */
+ pause_restart_point = 0;
continue;
}
- if (pause != NULL && strchr(pause, res)) {
- elapsed = ast_tvdiff_ms(ast_tvnow(), started) + last_elapsed;
- for(;;) {
- if (chan)
- ast_stopstream(chan);
+ if (pause && strchr(pause, res)) {
+ pause_restart_point = ast_tellstream(chan->stream);
+ for (;;) {
+ ast_stopstream(chan);
res = ast_waitfordigit(chan, 1000);
- if (res == 0)
+ if (!res)
continue;
else if (res == -1 || strchr(pause, res) || (stop && strchr(stop, res)))
break;
@@ -516,17 +505,16 @@
continue;
}
}
+
if (res == -1)
break;
/* if we get one of our stop chars, return it to the calling function */
- if (stop && strchr(stop, res)) {
- /* res = 0; */
- break;
- }
- }
- if (chan)
- ast_stopstream(chan);
+ if (stop && strchr(stop, res))
+ break;
+ }
+
+ ast_stopstream(chan);
return res;
}
Modified: team/russell/make_menuconfig/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/russell/make_menuconfig/apps/app_dial.c?rev=7501&r1=7500&r2=7501&view=diff
==============================================================================
--- team/russell/make_menuconfig/apps/app_dial.c (original)
+++ team/russell/make_menuconfig/apps/app_dial.c Fri Dec 16 09:20:20 2005
@@ -962,7 +962,7 @@
/* If a channel group has been specified, get it for use when we create peer channels */
outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
- ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID);
+ ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_CALLER_HANGUP);
cur = args.peers;
do {
/* Remember where to start next time */
Modified: team/russell/make_menuconfig/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/russell/make_menuconfig/apps/app_macro.c?rev=7501&r1=7500&r2=7501&view=diff
==============================================================================
--- team/russell/make_menuconfig/apps/app_macro.c (original)
+++ team/russell/make_menuconfig/apps/app_macro.c Fri Dec 16 09:20:20 2005
@@ -86,6 +86,11 @@
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
+
+static char *safe_strdup(const char *s)
+{
+ return s ? strdup(s) : NULL;
+}
static int macro_exec(struct ast_channel *chan, void *data)
{
@@ -162,25 +167,17 @@
}
argc = 1;
/* Save old macro variables */
- save_macro_exten = pbx_builtin_getvar_helper(chan, "MACRO_EXTEN");
- if (save_macro_exten)
- save_macro_exten = strdup(save_macro_exten);
+ save_macro_exten = safe_strdup(pbx_builtin_getvar_helper(chan, "MACRO_EXTEN"));
pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", oldexten);
- save_macro_context = pbx_builtin_getvar_helper(chan, "MACRO_CONTEXT");
- if (save_macro_context)
- save_macro_context = strdup(save_macro_context);
+ save_macro_context = safe_strdup(pbx_builtin_getvar_helper(chan, "MACRO_CONTEXT"));
pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", oldcontext);
- save_macro_priority = pbx_builtin_getvar_helper(chan, "MACRO_PRIORITY");
- if (save_macro_priority)
- save_macro_priority = strdup(save_macro_priority);
+ save_macro_priority = safe_strdup(pbx_builtin_getvar_helper(chan, "MACRO_PRIORITY"));
snprintf(pc, sizeof(pc), "%d", oldpriority);
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", pc);
- save_macro_offset = pbx_builtin_getvar_helper(chan, "MACRO_OFFSET");
- if (save_macro_offset)
- save_macro_offset = strdup(save_macro_offset);
+ save_macro_offset = safe_strdup(pbx_builtin_getvar_helper(chan, "MACRO_OFFSET"));
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", NULL);
/* Setup environment for new run */
Modified: team/russell/make_menuconfig/channel.c
URL: http://svn.digium.com/view/asterisk/team/russell/make_menuconfig/channel.c?rev=7501&r1=7500&r2=7501&view=diff
==============================================================================
--- team/russell/make_menuconfig/channel.c (original)
+++ team/russell/make_menuconfig/channel.c Fri Dec 16 09:20:20 2005
@@ -3055,7 +3055,6 @@
if (ast_test_flag(clone, AST_FLAG_ZOMBIE)) {
ast_log(LOG_DEBUG, "Destroying channel clone '%s'\n", clone->name);
ast_mutex_unlock(&clone->lock);
- ast_channel_free(clone);
manager_event(EVENT_FLAG_CALL, "Hangup",
"Channel: %s\r\n"
"Uniqueid: %s\r\n"
@@ -3066,6 +3065,7 @@
clone->hangupcause,
ast_cause2str(clone->hangupcause)
);
+ ast_channel_free(clone);
} else {
struct ast_frame null_frame = { AST_FRAME_NULL, };
ast_log(LOG_DEBUG, "Released clone lock on '%s'\n", clone->name);
Modified: team/russell/make_menuconfig/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/russell/make_menuconfig/channels/chan_agent.c?rev=7501&r1=7500&r2=7501&view=diff
==============================================================================
--- team/russell/make_menuconfig/channels/chan_agent.c (original)
+++ team/russell/make_menuconfig/channels/chan_agent.c Fri Dec 16 09:20:20 2005
@@ -1417,7 +1417,7 @@
/* Set a default status. It 'should' get changed. */
status = "AGENT_UNKNOWN";
- if (!ast_strlen_zero(p->loginchan)) {
+ if (!ast_strlen_zero(p->loginchan) && !p->chan) {
loginChan = p->loginchan;
talkingtoChan = "n/a";
status = "AGENT_IDLE";
Modified: team/russell/make_menuconfig/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/russell/make_menuconfig/channels/chan_sip.c?rev=7501&r1=7500&r2=7501&view=diff
==============================================================================
--- team/russell/make_menuconfig/channels/chan_sip.c (original)
+++ team/russell/make_menuconfig/channels/chan_sip.c Fri Dec 16 09:20:20 2005
@@ -2279,6 +2279,7 @@
/* Possible values taken from causes.h */
switch(cause) {
+ case 603: /* Declined */
case 403: /* Not found */
return AST_CAUSE_CALL_REJECTED;
case 404: /* Not found */
@@ -2458,7 +2459,7 @@
if (ast->hangupcause && ((res = hangup_cause2sip(ast->hangupcause)))) {
transmit_response_reliable(p, res, &p->initreq, 1);
} else
- transmit_response_reliable(p, "403 Forbidden", &p->initreq, 1);
+ transmit_response_reliable(p, "603 Declined", &p->initreq, 1);
}
} else { /* Call is in UP state, send BYE */
if (!p->pendinginvite) {
Modified: team/russell/make_menuconfig/configs/misdn.conf.sample
URL: http://svn.digium.com/view/asterisk/team/russell/make_menuconfig/configs/misdn.conf.sample?rev=7501&r1=7500&r2=7501&view=diff
==============================================================================
--- team/russell/make_menuconfig/configs/misdn.conf.sample (original)
+++ team/russell/make_menuconfig/configs/misdn.conf.sample Fri Dec 16 09:20:20 2005
@@ -20,6 +20,7 @@
;
debug=0
+
; the big trace
;
; default value: [not set]
@@ -40,7 +41,7 @@
;
; default value: yes
;
-bridging=yes
+bridging=no
; stops dialtone after getting first digit on nt Port
;
@@ -67,15 +68,6 @@
; default value: no
;
clear_l3=no
-
-; set the method to use for channel selection:
-; standard - always choose the first free channel with the lowest number
-; round_robin - use the round robin algorithm to select a channel. use this
-; if you want to balance your load.
-;
-; default value: standard
-;
-method=standard
;;; CRYPTION STUFF
@@ -125,6 +117,16 @@
;
language=en
+;
+; sets the musiconhold class
+;
+musicclass=default
+
+;
+; Either if we should produce DTMF Tones ourselve
+;
+senddtmf=yes
+
; Prefixes for national and international, those are put before the
; oad if an according dialplan is set by the other end.
;
@@ -149,11 +151,23 @@
;
te_choose_channel=no
+; set the method to use for channel selection:
+; standard - always choose the first free channel with the lowest number
+; round_robin - use the round robin algorithm to select a channel. use this
+; if you want to balance your load.
+;
+; default value: standard
+;
+method=standard
+
+;
+; dialplan means Type Of Number in ISDN Terms (for outgoing calls)
+;
; dialplan options:
;
; 0 - unknown
-; 1 - National
-; 2 - International
+; 1 - International
+; 2 - National
; 4 - Subscriber
;
; This setting is used for outgoing calls
@@ -161,6 +175,7 @@
; default value: 0
;
dialplan=0
+localdialplan=0
; This is only for asterisk head and will result in only considering
; misdn.confs and misdn_set_opts callingpresentation informations if set to no.
@@ -169,6 +184,13 @@
; default value: yes
;
use_callingpres=yes
+
+
+
+;
+; turn this to no if you don't mind correct handling of Progress Indicators
+;
+early_bconnect=yes
; uncomment the following to get into s extension at extension conf
; there you can use DigitTimeout if you can't or don't want to use
@@ -235,6 +257,17 @@
; default value: yes
;
echotraining=yes
+
+;
+; chan_misdns jitterbuffer, default 1000
+;
+jitterbuffer=1000
+
+;
+; change this threshold to enable dejitter functionality
+;
+jitterbuffer_upper_threshold=0
+
[intern]
; define your ports, e.g. 1,2 (depends on mISDN-driver loading order)
Modified: team/russell/make_menuconfig/doc/README.misdn
URL: http://svn.digium.com/view/asterisk/team/russell/make_menuconfig/doc/README.misdn?rev=7501&r1=7500&r2=7501&view=diff
==============================================================================
--- team/russell/make_menuconfig/doc/README.misdn (original)
+++ team/russell/make_menuconfig/doc/README.misdn Fri Dec 16 09:20:20 2005
@@ -21,13 +21,13 @@
* Data (HDLC) callthrough
* Data Calling (with app_ptyfork +pppd)
* Echo cancellation
+* CallDeflection
* Some other
Supported Hardware:
-------------------
-chan_misdn supports any mISDN compatible Hardware. Especially the 1-8 Port
-BRI Cards available from http://shop.beronet.com
+chan_misdn supports any mISDN compatible Hardware.
Overview
--------
@@ -49,48 +49,28 @@
Fast Installation Guide
-----------------------
-You have two options on how to install chan_misdn.
-
-(1) Requirements:
- - mISDN and mISDNuser from jolly (see Pre-Requisites below)
- Installation:
- - cd <asterisk-src-dir>/channels/misdn
- - edit Makefile so that MISDNUSER points to your mISDNuser directory
- - run 'make'
- - cd <asterisk-src-dir>
- - compile and install asterisk via 'make install'
-
-(2) Requirements:
- - Asterisk headers and Kernel headers
- Description:
- The Makefile gets the newest mISDN and mISDNuser Sources from
- jollys webpage and the newest release of chan_misdn from beronets
- Servers. After that it compiles and installs everything (hopefully).
- Installation:
- - cd /usr/src
- - wget http://www.beronet.com/downloads/install-misdn.tar.gz
- - tar zxf install-misdn.tar.gz
- - cd install-misdn
- - make install
+It is easy to install mISDN and mISDNuser. Using the Makefile from
+channels/misdn. You just need to type:
+
+cd channels/misdn
+make misdn
+
+Then all the necessary files are fetched from isdn4linux.de.
Pre-Requisites
--------------
-To compile and install this driver, you'll need at least one mISDN Driver, the
-mISDNuser package and the Asterisk includes (which will be inside of the
-sources). Chan_misdn works with both, the current release version and the
-development (svn trunk) version of Asterisk.
-
-To get the mISDN stuff please follow the instructions at
-http://www.isdn4linux.de. Please Note that mISDN works good for the
-linux-2.6.x kernels. Some of the mISDN drivers do not compile against the
-2.4.x or older kernels, you can patch them, but than you'll get mysterious
-errors.
-
-I use Kernels > 2.6.9 and it works perfect. with kernels >= 2.6.10 there is a
-very litle bug in hfc_multi.c which causes the module not to compile, it can
-be easily fixed by changing pci_findsubsys to pci_getsubsys in code.
+To compile and install this driver, you'll need at least one mISDN Driver and
+the mISDNuser package. Chan_misdn works with both, the current release version
+and the development (svn trunk) version of Asterisk. mISDNuser and mISDN must
+be fetched from cvs.isdn4linux.de (mqueue branch).
+
+Please Note that mISDN works good for the linux-2.6.x kernels. Some of the
+mISDN drivers do not compile against the 2.4.x or older kernels, you can patch
+them, but than you'll get mysterious errors.
+
+Using Kernels > 2.6.9 works perfect.
Ok so far so good, now follow the compilation instructions.
@@ -99,44 +79,24 @@
Compilation
-----------
-!! Be aware, in the actual mISDNuser package theres a bug in the Makefile
-!! the compilation stops near iapplication.h, this isn't very important
-!! at this step you are ready.
-
-After you've successfully installed mISDN, mISDNuser and Asterisk, you should
-modify the Makefile in the chan_misdn source path. There you can tell the
-Makefile where to install the driver, sample-conf, and most important where it
-can find the linux kernel includes, the mISDNuser package and the Asterisk
-includes. If you use the development version of Asterisk (or at least a newer
-version than release) uncomment the CCFLAGS+=-DASTERISK_STABLE, the release
-version of Asterisk is at the moment v1-2 as subversion branch.
-
-Now you can type in:
-
-make
-
-This should compile chan_misdn.so, if there's an error check the paths in the
-Makefile again.
+The compilation of chan_misdn requires a library which will be generated under
+channels/misdn/.
+
+To compile this library you just need to go into this directory and type
+make. Now you can go back to the asterisk source root and type make install
+again, which now should compile and install chan_misdn.
+
Installation
------------
-After successful compilation of chan_misdn, you should simply type in:
-
-make install
-
-as privileged user to put chan_misdn.so in the Asterisk modules
-directory.
-
-You should see a message like: "Successfully installed chan_misdn".
-Congratulations.
-
-Theres a sample init.d script for loading the mISDN modules (mISDN.sample),
-simply copy it to /etc/init.d/ and modify it, there you can enter your cards.
+Chan_misdn is automatically installed by the asterisk installation process.
+
+There is a sample init.d script for loading the mISDN modules (mISDN.sample),
+5Asimply copy it to /etc/init.d/ and modify it, there you can enter your cards.
!! Forget to use capi together with chan_misdn.
-
Configuration
@@ -161,6 +121,11 @@
configuration file, bigger numbers will lead to more debug output. There's also a
tracefile option, which takes a path+filename where debug output is written
to.
+
+- misdn.conf: [default] section
+The default section is another special section which can contain all the
+options available int the usr/port sections. the user/port section inherit
+their parameters from the default section.
- misdn.conf: user/port sections
The user sections have names which are unequal to "general". Those sections
@@ -205,8 +170,8 @@
vt - txgain control
-chan_misdn registers a new dial plan application "misdn_set_opt" when loaded. This
-application takes the Optionsstring as argument. The Syntax is:
+chan_misdn registers a new dial plan application "misdn_set_opt" when
+loaded. This application takes the Optionsstring as argument. The Syntax is:
misdn_set_opt(<OPTIONSSTRING>)
@@ -343,6 +308,11 @@
* asterisk >= v1-0.2 , also CVS Head
* mISDN/mISDNuser (3.0-beta) from isdn.jolly.de
+- chan_misdn-0.2.1
+ * linux-kernel >= 2.6.8 (but at least 2.6)
+ * asterisk >= v1.2 , also CVS Head
+ * mISDN/mISDNuser (3.0) from isdn.jolly.de
+
Known Problems
--------------
Modified: team/russell/make_menuconfig/doc/README.variables
URL: http://svn.digium.com/view/asterisk/team/russell/make_menuconfig/doc/README.variables?rev=7501&r1=7500&r2=7501&view=diff
==============================================================================
--- team/russell/make_menuconfig/doc/README.variables (original)
+++ team/russell/make_menuconfig/doc/README.variables Fri Dec 16 09:20:20 2005
@@ -94,17 +94,17 @@
-_______________________________
-REMOVING CHARACTERS FROM STRING
--------------------------------
-
-The format for removing characters from a variable can be expressed as:
+___________________________________
+SELECTING CHARACTERS FROM VARIABLES
+-----------------------------------
+
+The format for selecting characters from a variable can be expressed as:
${variable_name[:offset[:length]]}
-If you want to remove the first N characters from the string assigned
+If you want to select the first N characters from the string assigned
to a variable, simply append a colon and the number of characters to
-remove from the beginning of the string to the variable name.
+skip from the beginning of the string to the variable name.
;Remove the first character of extension, save in "number" variable
exten => _9X.,1,Set(number=${EXTEN:1})
@@ -115,7 +115,7 @@
digit.
If you use a negative offset number, Asterisk starts counting from the end
-of the string and then removes everything before the new position. The following
+of the string and then selects everything after the new position. The following
example will save the numbers 1234 to the 'number' variable, still assuming
we've dialed 918005551234.
Modified: team/russell/make_menuconfig/pbx.c
URL: http://svn.digium.com/view/asterisk/team/russell/make_menuconfig/pbx.c?rev=7501&r1=7500&r2=7501&view=diff
==============================================================================
--- team/russell/make_menuconfig/pbx.c (original)
+++ team/russell/make_menuconfig/pbx.c Fri Dec 16 09:20:20 2005
@@ -5443,6 +5443,8 @@
static int pbx_builtin_hangup(struct ast_channel *chan, void *data)
{
/* Just return non-zero and it will hang up */
+ if (!chan->hangupcause)
+ chan->hangupcause = AST_CAUSE_NORMAL_CLEARING;
return -1;
}
Modified: team/russell/make_menuconfig/utils.c
URL: http://svn.digium.com/view/asterisk/team/russell/make_menuconfig/utils.c?rev=7501&r1=7500&r2=7501&view=diff
==============================================================================
--- team/russell/make_menuconfig/utils.c (original)
+++ team/russell/make_menuconfig/utils.c Fri Dec 16 09:20:20 2005
@@ -613,11 +613,11 @@
if (a.tv_usec >= ONE_MILLION) {
ast_log(LOG_WARNING, "warning too large timestamp %ld.%ld\n",
a.tv_sec, (long int) a.tv_usec);
- a.tv_sec += a.tv_usec % ONE_MILLION;
+ a.tv_sec += a.tv_usec / ONE_MILLION;
a.tv_usec %= ONE_MILLION;
} else if (a.tv_usec < 0) {
ast_log(LOG_WARNING, "warning negative timestamp %ld.%ld\n",
- a.tv_sec, (long int) a.tv_usec);
+ a.tv_sec, (long int) a.tv_usec);
a.tv_usec = 0;
}
return a;
More information about the asterisk-commits
mailing list