[asterisk-commits] may: branch may/ooh323_ipv6_direct_rtp r321503 - in /team/may/ooh323_ipv6_dir...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat May 28 03:50:44 CDT 2011
Author: may
Date: Sat May 28 03:50:36 2011
New Revision: 321503
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321503
Log:
Merged revisions 317337,317377,317382,317395,317426,317428,317430,317475,317477,317479,317481-317483,317485,317487,317531,317596,317671,317721-317723,317802-317803,317806-317807,317818,317833,317843,317860,317862,317866,317868,317915 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r317337 | russell | 2011-05-05 23:56:44 +0400 (Thu, 05 May 2011) | 14 lines
Merged revisions 317336 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317336 | russell | 2011-05-05 14:55:58 -0500 (Thu, 05 May 2011) | 7 lines
Increase buffer size to be PATH_MAX for a path.
(closes issue #19239)
Reported by: byronclark
Patches:
queue_announce_length.patch uploaded by byronclark (license 1200)
........
................
r317377 | seanbright | 2011-05-06 00:27:25 +0400 (Fri, 06 May 2011) | 17 lines
Merged revisions 317370 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317370 | seanbright | 2011-05-05 16:25:52 -0400 (Thu, 05 May 2011) | 10 lines
Don't duplicate our data on the stack and just use the MYSQL_ROW directly.
With large result sets we were blowing out the stack.
(closes issue #19090)
Reported by: mickecarlsson
Patches:
issue19090_trunk_svn.patch uploaded by seanbright (license 71)
Tested by: mickecarlsson
........
................
r317382 | wedhorn | 2011-05-06 00:46:49 +0400 (Fri, 06 May 2011) | 9 lines
Move hold stuff to the setsubstate arrangement.
skinny_hold moved to setsubstate_hold and skinny_unhold integrated into
setsubstate_connected. Removed sub->onhold and replaced with
SUBSTATE_HOLD.
Also fixed inbound call answering by queueing an AST_CONTROL_ANSWER on
answering a SUBSTATE_RINGIN sub (was a typo).
................
r317395 | seanbright | 2011-05-06 01:20:00 +0400 (Fri, 06 May 2011) | 16 lines
Add some new editline bindings by default, and allow for user specified configuration.
I excluded the part of this patch that used the HOME environment variable since
the built-in editline library goes to great lengths to disallow that. Instead
only settings the EDITRC environment variable will use a user specified file.
Also, the default environment variable use to determine the edit more is
AST_EDITMODE instead of AST_EDITOR (although the latter is still supported).
(closes issue #15929)
Reported by: kkm
Patches:
astcli-editrc-v2.diff uploaded by kkm (license 888)
015929-astcli-editrc-trunk.240324.diff uploaded by kkm (license 888)
Tested by: seanbright
................
r317426 | russell | 2011-05-06 01:54:17 +0400 (Fri, 06 May 2011) | 14 lines
Merged revisions 317425 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317425 | russell | 2011-05-05 16:53:13 -0500 (Thu, 05 May 2011) | 7 lines
Add missing ActioID handling to Events action.
(closes issue #18949)
Reported by: edersohe
Patches:
0018949.patch uploaded by edersohe (license 1228)
........
................
r317428 | russell | 2011-05-06 02:02:31 +0400 (Fri, 06 May 2011) | 14 lines
Merged revisions 317427 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317427 | russell | 2011-05-05 16:58:45 -0500 (Thu, 05 May 2011) | 7 lines
Fix potential memory leak, and use of uninitialized memory.
(closes issue #16476)
Reported by: junky
Patches:
M16476.diff uploaded by junky (license 177)
........
................
r317430 | russell | 2011-05-06 02:12:10 +0400 (Fri, 06 May 2011) | 12 lines
Merged revisions 317429 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317429 | russell | 2011-05-05 17:11:19 -0500 (Thu, 05 May 2011) | 5 lines
Only display inband DTMF warning if inband DTMF detection is enabled.
(closes issue #18901)
Reported by: irroot
........
................
r317475 | russell | 2011-05-06 02:44:52 +0400 (Fri, 06 May 2011) | 9 lines
Merged revisions 317474 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317474 | russell | 2011-05-05 17:36:33 -0500 (Thu, 05 May 2011) | 2 lines
Fix more "set but unused" warnings.
........
................
r317477 | russell | 2011-05-06 02:49:36 +0400 (Fri, 06 May 2011) | 15 lines
Merged revisions 317476 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317476 | russell | 2011-05-05 17:47:57 -0500 (Thu, 05 May 2011) | 8 lines
Add a datastore fixup to fix a pbx_lua crash.
(closes issue #19055)
Reported by: jamhed
Patches:
lua_datastore_fixup1.diff uploaded by mnicholson (license 96)
Tested by: mnicholson, jamhed
........
................
r317479 | russell | 2011-05-06 02:55:09 +0400 (Fri, 06 May 2011) | 19 lines
Merged revisions 317478 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317478 | russell | 2011-05-05 17:53:45 -0500 (Thu, 05 May 2011) | 12 lines
Fix some consistency issues with jitterbuffer config.
Store the defaults noted in the sample config files in the jitterbuffer config
data structure. This makes the CLI commands that output these settings show
the right thing. Also only show the settings that are relevant in the settings
CLI commands, based on which jitterbuffer is selected and whether it's enabled.
(closes issue #19083)
Reported by: rgagnon
Patches:
issue-19083-trunk-r313139.diff uploaded by rgagnon (license 1202)
........
................
r317481 | russell | 2011-05-06 03:02:11 +0400 (Fri, 06 May 2011) | 15 lines
Merged revisions 317480 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317480 | russell | 2011-05-05 18:00:55 -0500 (Thu, 05 May 2011) | 8 lines
Don't lose cdr_syslog config on a reload.
(closes issue #18679)
Reported by: enegaard
Patches:
issue18679_seanbright.patch uploaded by seanbright (license 71)
Tested by: enegaard
........
................
r317482 | russell | 2011-05-06 03:08:05 +0400 (Fri, 06 May 2011) | 8 lines
Add CEL extra field to cel_pgsql.
(closes issue #18462)
Reported by: joscas
Patches:
bug_18462.diff uploaded by snuffy (license 35)
cel_pgsql.conf.sample.issue18462.patch uploaded by joscas (license 1180)
................
r317483 | russell | 2011-05-06 03:10:27 +0400 (Fri, 06 May 2011) | 7 lines
Add "calendar show types" CLI command.
(closes issue #18246)
Reported by: junky
Patches:
calendar_types.diff uploaded by junky (license 177)
................
r317485 | russell | 2011-05-06 03:13:04 +0400 (Fri, 06 May 2011) | 15 lines
Merged revisions 317484 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317484 | russell | 2011-05-05 18:12:35 -0500 (Thu, 05 May 2011) | 8 lines
Fix some errors in sample MySQL realtime schema files.
(closes issue #18915)
Reported by: Dovid
Patches:
sipfriends.patch uploaded by Dovid (license 652)
meetme.patch uploaded by Dovid (license 652)
........
................
r317487 | russell | 2011-05-06 03:16:16 +0400 (Fri, 06 May 2011) | 16 lines
Merged revisions 317486 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317486 | russell | 2011-05-05 18:15:53 -0500 (Thu, 05 May 2011) | 9 lines
Fix some more realtime MySQL schema issues.
(closes issue #18537)
Reported by: denzs
Patches:
sipfriends.sql.svndiff uploaded by denzs (license 1182)
queue_log.sql.svndiff uploaded by denzs (license 1182)
meetme.sql.svndiff uploaded by denzs (license 1182)
........
................
r317531 | russell | 2011-05-06 03:47:23 +0400 (Fri, 06 May 2011) | 17 lines
Merged revisions 317530 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317530 | russell | 2011-05-05 18:46:54 -0500 (Thu, 05 May 2011) | 10 lines
If the configure script runs, force a rebuild of menuselect-tree.
Some contents in the menuselect tree are dependent on configure script
parameters, namely --enable-dev-mode.
(closes issue #17219)
Reported by: Nick_Lewis
Patches:
issue_17219.rev1.txt uploaded by russell (license 2)
........
................
r317596 | twilson | 2011-05-06 12:21:22 +0400 (Fri, 06 May 2011) | 27 lines
Merged revisions 317584 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r317584 | twilson | 2011-05-06 01:18:53 -0700 (Fri, 06 May 2011) | 20 lines
Merged revisions 317575 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r317575 | twilson | 2011-05-06 01:04:17 -0700 (Fri, 06 May 2011) | 13 lines
Merged revisions 317574 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r317574 | twilson | 2011-05-06 00:55:21 -0700 (Fri, 06 May 2011) | 6 lines
Re-fix queue round-robin
This part of the change for r315596 was incorrect. No bridge occurs
when doing a roundrobin dial and no one answers, so this code shouldn't
have been removed.
........
................
................
................
r317671 | rmudgett | 2011-05-06 20:23:14 +0400 (Fri, 06 May 2011) | 29 lines
Merged revisions 317670 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317670 | rmudgett | 2011-05-06 11:19:18 -0500 (Fri, 06 May 2011) | 22 lines
Fix SIP connected line updates.
This patch fixes a couple SIP connected line update problems:
1) The connected line needs to be updated when the initial INVITE is sent
if there is a peer callerid configured. Previously, the connected line
information did not get reported until the call was connected so SIP could
not report connected line information in ringing or progress messages.
2) The connected line should not be updated on initial connect if there is
no connected line information. Previously, all it did was wipe out any
default preset CONNECTEDLINE information set by the dialplan with empty
strings.
(closes issue #18367)
Reported by: GeorgeKonopacki
Patches:
issue18367_v1.8.patch uploaded by rmudgett (license 664)
Tested by: rmudgett
Review: https://reviewboard.asterisk.org/r/1199/
........
................
r317721 | mnicholson | 2011-05-06 22:04:23 +0400 (Fri, 06 May 2011) | 6 lines
Detect Goto in pbx_lua.
This code will actually detect any dialplan jump from any application that
calls ast_explicit_goto(). This change is only being done in trunk as it may
change the way some dialplans execute.
................
r317722 | mnicholson | 2011-05-06 22:05:52 +0400 (Fri, 06 May 2011) | 2 lines
Updated CHANGES for hints support in pbx_lua
................
r317723 | mnicholson | 2011-05-06 22:07:05 +0400 (Fri, 06 May 2011) | 2 lines
Use two spaces after periods for the recent pbx_lua change descriptions
................
r317802 | mnicholson | 2011-05-06 22:40:35 +0400 (Fri, 06 May 2011) | 2 lines
Added note about changes in pbx_lua's behavior when applications do dialplan jumps
................
r317803 | mnicholson | 2011-05-06 23:01:57 +0400 (Fri, 06 May 2011) | 7 lines
Make pbx_lua handle managing the autoservice better.
Make autoservice_start() and autoservice_stop() return nothing. Also check if
the autoservice flag is set before starting or stopping the autoservice and
stop and start the autoservice when returning control to and getting control
from the pbx engine.
................
r317806 | mnicholson | 2011-05-06 23:14:39 +0400 (Fri, 06 May 2011) | 4 lines
Default to starting an autoservice in pbx_lua. The autoservice is
automatically stopped when applications are executed, so this shouldn't cause
any problems.
................
r317807 | russell | 2011-05-06 23:15:45 +0400 (Fri, 06 May 2011) | 14 lines
Merged revisions 317805 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317805 | russell | 2011-05-06 14:14:39 -0500 (Fri, 06 May 2011) | 7 lines
Add a new sipfriends.sql for MySQL that has more fields in it.
(closes issue #16399)
Reported by: pabelanger
Patches:
sipfriends.sql.v3 uploaded by pabelanger (license 224)
........
................
r317818 | mnicholson | 2011-05-06 23:19:56 +0400 (Fri, 06 May 2011) | 2 lines
Updated the sample pbx_lua config file to reflect autoservice changes.
................
r317833 | mnicholson | 2011-05-06 23:23:23 +0400 (Fri, 06 May 2011) | 2 lines
Updated CHANGES to note the autoservice changes for pbx_lua
................
r317843 | russell | 2011-05-06 23:25:35 +0400 (Fri, 06 May 2011) | 18 lines
Merged revisions 317837 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317837 | russell | 2011-05-06 14:24:11 -0500 (Fri, 06 May 2011) | 11 lines
Fix a crash in the MySQL() application.
This code was not handling channel datastores safely. The channel
must be locked.
(closes issue #17964)
Reported by: wuwu
Patches:
issue17964_addon_1.6.2_svn.patch uploaded by seanbright (license 71)
Tested by: wuwu
........
................
r317860 | mnicholson | 2011-05-06 23:34:46 +0400 (Fri, 06 May 2011) | 14 lines
Blocked revisions 317858 via svnmerge
........
r317858 | mnicholson | 2011-05-06 14:31:50 -0500 (Fri, 06 May 2011) | 6 lines
pbx_lua autoservice fixes
Don't start an autoservice in pbx_lua if pbx_lua already started one and don't
stop one if we didn't start one. Also start and stop the autoservice when
transferring control from and to the pbx.
........
This change is already implemented in trunk.
................
r317862 | russell | 2011-05-06 23:35:30 +0400 (Fri, 06 May 2011) | 17 lines
Blocked revisions 317861 via svnmerge
........
r317861 | russell | 2011-05-06 14:35:00 -0500 (Fri, 06 May 2011) | 11 lines
URI encode less characters in the RPID and Contact headers.
If this change causes any problems, we will need to backport the more extensive
uri encoding and decoding handling changes that are in trunk/1.10.
(closes issue #18686)
Reported by: wolfgang
Patches:
quick-and-dirty.patch uploaded by wdoekes (license 717)
Tested by: wdoekes, devellow, wolfgang, mav3rick
........
................
r317866 | russell | 2011-05-06 23:48:06 +0400 (Fri, 06 May 2011) | 18 lines
Merged revisions 317865 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317865 | russell | 2011-05-06 14:46:49 -0500 (Fri, 06 May 2011) | 11 lines
chan_sip: fix a deadlock in check_rtp_timeout.
Don't block doing silly deadlock avoidance. Just return and try again later.
The funciton gets called often enough that it's fine. Also, this change was
already made in trunk.
(closes issue #18791)
Reported by: irroot
Patches:
chan_sip.rtptimeout.patch uploaded by irroot (license 52)
........
................
r317868 | russell | 2011-05-07 00:02:31 +0400 (Sat, 07 May 2011) | 17 lines
Merged revisions 317867 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317867 | russell | 2011-05-06 15:01:16 -0500 (Fri, 06 May 2011) | 10 lines
chan_sip: Destroy variables on a sip_pvt before copying vars from the sip_peer.
Don't duplicate variables on the sip_pvt. Just reset the variable list each
time.
(closes issue #19202)
Reported by: wdoekes
Patches:
issue19202_destroy_challenged_invite_chanvars.patch uploaded by wdoekes (license 717)
........
................
r317915 | russell | 2011-05-07 00:44:53 +0400 (Sat, 07 May 2011) | 7 lines
Add the Uniqueid header to Userevent.
(closes issue #16962)
Reported by: jlpedrosa
Patches:
patch.diff uploaded by jlpedrosa (license 1002)
................
Modified:
team/may/ooh323_ipv6_direct_rtp/ (props changed)
team/may/ooh323_ipv6_direct_rtp/CHANGES
team/may/ooh323_ipv6_direct_rtp/apps/app_queue.c
team/may/ooh323_ipv6_direct_rtp/channels/chan_skinny.c
Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
--- branch-1.8-blocked (original)
+++ branch-1.8-blocked Sat May 28 03:50:36 2011
@@ -1,1 +1,1 @@
-/branches/1.8:299531,313436
+/branches/1.8:299531,313436,317858,317861
Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat May 28 03:50:36 2011
@@ -1,1 +1,1 @@
-/trunk:1-313143,313191,313280,313367,313383-313481,313483-313744,313781-313906,313908-313943,313945-315447,315453-316213,316216-316520,316552-317334
+/trunk:1-313143,313191,313280,313367,313383-313481,313483-313744,313781-313906,313908-313943,313945-315447,315453-316213,316216-316520,316552-317915
Modified: team/may/ooh323_ipv6_direct_rtp/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/CHANGES?view=diff&rev=321503&r1=321502&r2=321503
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/CHANGES (original)
+++ team/may/ooh323_ipv6_direct_rtp/CHANGES Sat May 28 03:50:36 2011
@@ -26,6 +26,7 @@
* DAHDIShowChannels, SIPshowpeer, SIPpeers, and IAXpeers now contains a
Description field that is set by 'description' in the channel configuration
file.
+ * Added Uniqueid header to UserEvent.
Asterisk HTTP Server
--------------------------
@@ -93,6 +94,8 @@
--------------------------
* Added setvar option to calendar.conf to allow setting channel variables on
notification channels.
+ * Added "calendar show types" CLI command to list registered calendar
+ connectors.
MixMonitor
--------------------------
@@ -106,6 +109,24 @@
* Added a new option, l, which will disable local call optimization for
channels involved with the FollowMe thread. Use this option to improve
compatability for a FollowMe call with certain dialplan apps, options, and
+ functions.
+
+CEL
+--------------------------
+ * cel_pgsql now supports the 'extra' column for data added using the
+ CELGenUserEvent() application.
+
+pbx_lua
+--------------------------
+ * Support for defining hints has been added to pbx_lua. See the 'hints' table
+ in the sample extensions.lua file for syntax details.
+ * Applications that perform jumps in the dialplan such as Goto will now
+ execute properly. When pbx_lua detects that the context, extension, or
+ priority we are executing on has changed it will immediatly return control
+ to the asterisk PBX engine. Currently the engine cannot detect a Goto to
+ the priority after the currently executing priority.
+ * An autoservice is now started by default for pbx_lua channels. It can be
+ stopped and restarted using the autoservice_stop() and autoservice_start()
functions.
------------------------------------------------------------------------------
Modified: team/may/ooh323_ipv6_direct_rtp/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/apps/app_queue.c?view=diff&rev=321503&r1=321502&r2=321503
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/apps/app_queue.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/apps/app_queue.c Sat May 28 03:50:36 2011
@@ -4566,6 +4566,17 @@
if (need_weight)
ao2_unlock(queues);
lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies, ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT), forwardsallowed, update_connectedline);
+ /* The ast_channel_datastore_remove() function could fail here if the
+ * datastore was moved to another channel during a masquerade. If this is
+ * the case, don't free the datastore here because later, when the channel
+ * to which the datastore was moved hangs up, it will attempt to free this
+ * datastore again, causing a crash
+ */
+ ast_channel_lock(qe->chan);
+ if (datastore && !ast_channel_datastore_remove(qe->chan, datastore)) {
+ ast_datastore_free(datastore);
+ }
+ ast_channel_unlock(qe->chan);
ao2_lock(qe->parent);
if (qe->parent->strategy == QUEUE_STRATEGY_RRMEMORY || qe->parent->strategy == QUEUE_STRATEGY_RRORDERED) {
store_next_rr(qe, outgoing);
Modified: team/may/ooh323_ipv6_direct_rtp/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/channels/chan_skinny.c?view=diff&rev=321503&r1=321502&r2=321503
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/channels/chan_skinny.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/channels/chan_skinny.c Sat May 28 03:50:36 2011
@@ -226,14 +226,15 @@
#endif
#endif
-/*! Global jitterbuffer configuration - by default, jb is disabled */
+/*! Global jitterbuffer configuration - by default, jb is disabled
+ * \note Values shown here match the defaults shown in skinny.conf.sample */
static struct ast_jb_conf default_jbconf =
{
.flags = 0,
- .max_size = -1,
- .resync_threshold = -1,
- .impl = "",
- .target_extra = -1,
+ .max_size = 200,
+ .resync_threshold = 1000,
+ .impl = "fixed",
+ .target_extra = 40,
};
static struct ast_jb_conf global_jbconf;
@@ -1191,6 +1192,7 @@
#define SUBSTATE_CONNECTED 5
#define SUBSTATE_BUSY 6
#define SUBSTATE_CONGESTION 7
+#define SUBSTATE_HOLD 8
#define SUBSTATE_PROGRESS 12
#define SUBSTATE_DIALING 101
@@ -1203,7 +1205,6 @@
/* time_t lastouttime; */ /* Unused */
int progress;
int ringing;
- int onhold;
/* int lastout; */ /* Unused */
int cxmode;
int nat;
@@ -1377,15 +1378,6 @@
static AST_LIST_HEAD_STATIC(devices, skinny_device);
-/*static struct ast_jb_conf default_jbconf =
-{
- .flags = 0,
- .max_size = -1,
- .resync_threshold = -1,
- .impl = ""
-};
-static struct ast_jb_conf global_jbconf;*/
-
struct skinnysession {
pthread_t t;
ast_mutex_t lock;
@@ -1421,6 +1413,7 @@
static void setsubstate_busy(struct skinny_subchannel *sub);
static void setsubstate_congestion(struct skinny_subchannel *sub);
static void setsubstate_progress(struct skinny_subchannel *sub);
+static void setsubstate_hold(struct skinny_subchannel *sub);
static struct ast_channel_tech skinny_tech = {
.type = "Skinny",
@@ -3842,12 +3835,17 @@
ast_cli(a->fd, " Date Format: %s\n", date_format);
ast_cli(a->fd, " Voice Mail Extension: %s\n", S_OR(global_vmexten, "(not set)"));
ast_cli(a->fd, " Reg. context: %s\n", S_OR(regcontext, "(not set)"));
- ast_cli(a->fd, " Jitterbuffer enabled: %s\n", (ast_test_flag(&global_jbconf, AST_JB_ENABLED) ? "Yes" : "No"));
- ast_cli(a->fd, " Jitterbuffer forced: %s\n", (ast_test_flag(&global_jbconf, AST_JB_FORCED) ? "Yes" : "No"));
- ast_cli(a->fd, " Jitterbuffer max size: %ld\n", global_jbconf.max_size);
- ast_cli(a->fd, " Jitterbuffer resync: %ld\n", global_jbconf.resync_threshold);
- ast_cli(a->fd, " Jitterbuffer impl: %s\n", global_jbconf.impl);
- ast_cli(a->fd, " Jitterbuffer log: %s\n", (ast_test_flag(&global_jbconf, AST_JB_LOG) ? "Yes" : "No"));
+ ast_cli(a->fd, " Jitterbuffer enabled: %s\n", AST_CLI_YESNO(ast_test_flag(&global_jbconf, AST_JB_ENABLED)));
+ if (ast_test_flag(&global_jbconf, AST_JB_ENABLED)) {
+ ast_cli(a->fd, " Jitterbuffer forced: %s\n", AST_CLI_YESNO(ast_test_flag(&global_jbconf, AST_JB_FORCED)));
+ ast_cli(a->fd, " Jitterbuffer max size: %ld\n", global_jbconf.max_size);
+ ast_cli(a->fd, " Jitterbuffer resync: %ld\n", global_jbconf.resync_threshold);
+ ast_cli(a->fd, " Jitterbuffer impl: %s\n", global_jbconf.impl);
+ if (!strcasecmp(global_jbconf.impl, "adaptive")) {
+ ast_cli(a->fd, " Jitterbuffer tgt extra: %ld\n", global_jbconf.target_extra);
+ }
+ ast_cli(a->fd, " Jitterbuffer log: %s\n", AST_CLI_YESNO(ast_test_flag(&global_jbconf, AST_JB_LOG)));
+ }
return CLI_SUCCESS;
}
@@ -4341,7 +4339,7 @@
}
AST_LIST_TRAVERSE(&l->sub, sub, list) {
- if (sub->onhold) {
+ if (sub->substate == SUBSTATE_HOLD) {
res = AST_DEVICE_ONHOLD;
break;
}
@@ -4573,7 +4571,6 @@
sub->cxmode = SKINNY_CX_INACTIVE;
sub->nat = l->nat;
sub->parent = l;
- sub->onhold = 0;
sub->blindxfer = 0;
sub->xferor = 0;
sub->related = NULL;
@@ -4679,6 +4676,8 @@
return "SUBSTATE_CONGESTION";
case SUBSTATE_PROGRESS:
return "SUBSTATE_PROGRESS";
+ case SUBSTATE_HOLD:
+ return "SUBSTATE_HOLD";
case SUBSTATE_DIALING:
return "SUBSTATE_DIALING";
default:
@@ -4794,7 +4793,11 @@
{
struct skinny_line *l = sub->parent;
struct skinny_device *d = l->device;
-
+
+ if (sub->substate == SUBSTATE_HOLD) {
+ ast_queue_control(sub->owner, AST_CONTROL_UNHOLD);
+ transmit_connect(d, sub);
+ }
transmit_activatecallplane(d, l);
transmit_stop_tone(d, l->instance, sub->callid);
transmit_callinfo(sub);
@@ -4804,7 +4807,7 @@
if (!sub->rtp) {
start_rtp(sub);
}
- if (sub->substate != SUBSTATE_RINGIN) {
+ if (sub->substate == SUBSTATE_RINGIN) {
ast_queue_control(sub->owner, AST_CONTROL_ANSWER);
}
if (sub->substate == SUBSTATE_DIALING || sub->substate == SUBSTATE_RINGOUT) {
@@ -4874,19 +4877,16 @@
sub->substate = SUBSTATE_PROGRESS;
}
-static int skinny_hold(struct skinny_subchannel *sub)
+static void setsubstate_hold(struct skinny_subchannel *sub)
{
struct skinny_line *l = sub->parent;
struct skinny_device *d = l->device;
- /* Don't try to hold a channel that doesn't exist */
- if (!sub || !sub->owner)
- return 0;
-
- /* Channel needs to be put on hold */
- if (skinnydebug)
- ast_verb(1, "Putting on Hold(%d)\n", l->instance);
-
+ if (sub->substate != SUBSTATE_CONNECTED) {
+ ast_log(LOG_WARNING, "Cannot set substate to SUBSTATE_HOLD from %s (on call-%d)\n", substate2str(sub->substate), sub->callid);
+ return;
+ }
+
ast_queue_control_data(sub->owner, AST_CONTROL_HOLD,
S_OR(l->mohsuggest, NULL),
!ast_strlen_zero(l->mohsuggest) ? strlen(l->mohsuggest) + 1 : 0);
@@ -4897,33 +4897,8 @@
transmit_callstate(d, sub->parent->instance, sub->callid, SKINNY_HOLD);
transmit_lamp_indication(d, STIMULUS_LINE, l->instance, SKINNY_LAMP_WINK);
- sub->onhold = 1;
- return 1;
-}
-
-static int skinny_unhold(struct skinny_subchannel *sub)
-{
- struct skinny_line *l = sub->parent;
- struct skinny_device *d = l->device;
-
- /* Don't try to unhold a channel that doesn't exist */
- if (!sub || !sub->owner)
- return 0;
-
- /* Channel is on hold, so we will unhold */
- if (skinnydebug)
- ast_verb(1, "Taking off Hold(%d)\n", l->instance);
-
- ast_queue_control(sub->owner, AST_CONTROL_UNHOLD);
-
- transmit_activatecallplane(d, l);
-
- transmit_connect(d, sub);
- transmit_callstate(d, sub->parent->instance, sub->callid, SKINNY_CONNECTED);
- transmit_lamp_indication(d, STIMULUS_LINE, l->instance, SKINNY_LAMP_ON);
- l->hookstate = SKINNY_OFFHOOK;
- sub->onhold = 0;
- return 1;
+ transmit_selectsoftkeys(sub->parent->device, sub->parent->instance, sub->callid, KEYDEF_ONHOLD);
+ sub->substate = SUBSTATE_HOLD;
}
static int handle_hold_button(struct skinny_subchannel *sub)
@@ -4931,16 +4906,13 @@
if (!sub)
return -1;
if (sub->related) {
- skinny_hold(sub);
- skinny_unhold(sub->related);
- sub->parent->activesub = sub->related;
+ setsubstate_hold(sub);
+ setsubstate_connected(sub->related);
} else {
- if (sub->onhold) {
- skinny_unhold(sub);
- transmit_selectsoftkeys(sub->parent->device, sub->parent->instance, sub->callid, KEYDEF_CONNECTED);
+ if (sub->substate == SUBSTATE_HOLD) {
+ setsubstate_connected(sub->related);
} else {
- skinny_hold(sub);
- transmit_selectsoftkeys(sub->parent->device, sub->parent->instance, sub->callid, KEYDEF_ONHOLD);
+ setsubstate_hold(sub);
}
}
return 1;
@@ -4963,8 +4935,8 @@
if (!sub->related) {
/* Another sub has not been created so this must be first XFER press */
- if (!sub->onhold) {
- skinny_hold(sub);
+ if (!(sub->substate == SUBSTATE_HOLD)) {
+ setsubstate_hold(sub);
}
c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
if (c) {
@@ -5416,7 +5388,7 @@
ast_devstate_changed(AST_DEVICE_INUSE, "Skinny/%s@%s", l->name, d->name);
- if (sub && sub->onhold) {
+ if (sub && sub->substate == SUBSTATE_HOLD) {
return 1;
}
@@ -5477,7 +5449,7 @@
ast_devstate_changed(AST_DEVICE_NOT_INUSE, "Skinny/%s@%s", l->name, d->name);
- if (sub->onhold) {
+ if (sub->substate == SUBSTATE_HOLD) {
return 0;
}
@@ -5900,7 +5872,7 @@
case SOFTKEY_HOLD:
if (skinnydebug)
ast_verb(1, "Received Softkey Event: Hold(%d/%d)\n", instance, callreference);
- handle_hold_button(sub);
+ setsubstate_hold(sub);
break;
case SOFTKEY_TRNSFER:
if (skinnydebug)
@@ -6059,16 +6031,7 @@
if (skinnydebug)
ast_verb(1, "Received Softkey Event: Resume(%d/%d)\n", instance, callreference);
- if (sub) {
- if (sub->onhold) {
- skinny_unhold(sub);
- transmit_selectsoftkeys(d, l->instance, sub->callid, KEYDEF_CONNECTED);
- } else {
- skinny_hold(sub);
- transmit_selectsoftkeys(d, l->instance, sub->callid, KEYDEF_ONHOLD);
- }
- }
-
+ setsubstate_connected(sub);
break;
case SOFTKEY_ANSWER:
if (skinnydebug)
@@ -6197,7 +6160,7 @@
sub = d->activeline->activesub;
}
- if (sub && ((sub->owner && sub->owner->_state < AST_STATE_UP) || sub->onhold)) {
+ if (sub && ((sub->owner && sub->owner->_state < AST_STATE_UP) || sub->substate == SUBSTATE_HOLD)) {
char dgt;
int digit = letohl(req->data.keypad.button);
More information about the asterisk-commits
mailing list