[asterisk-commits] file: branch file/bridging r114712 - in /team/file/bridging: ./ apps/ channel...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 28 08:35:22 CDT 2008


Author: file
Date: Mon Apr 28 08:35:19 2008
New Revision: 114712

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114712
Log:
Merged revisions 114520,114523,114527,114529,114533,114538,114540,114543,114546,114548,114551,114553,114559,114572,114575,114577,114580,114585,114588,114592,114595,114598,114601,114604,114606,114609,114612,114617,114622,114625,114629,114633,114635,114637,114644,114650-114651,114655-114656,114660,114663,114665,114667,114674,114676,114678,114683,114690,114692,114696,114700,114703,114706,114709 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r114520 | murf | 2008-04-22 11:38:46 -0300 (Tue, 22 Apr 2008) | 15 lines


Hopefully, this will resolve the issues that russellb had with this log_show_lock().
I gathered the code that filled the string, and put it in a different func which
I cryptically call "append_lock_information()".
Now, both log_show_lock(), and handle_show_locks() both call this code to do
the work. Tested, seems to work fine. 
Also, log_show_lock was modified to use the ast_str stuff, along with checking
for successful ast_str creation, and freeing the ast_str obj when finished.
A break was inserted to terminate the search for the lock; we should never
see it twice.

An example usage in chan_sip.c was created as a comment, for instructional
purposes.


................
r114523 | russell | 2008-04-22 12:20:53 -0300 (Tue, 22 Apr 2008) | 20 lines

Blocked revisions 114522 via svnmerge

........
r114522 | russell | 2008-04-22 10:20:37 -0500 (Tue, 22 Apr 2008) | 13 lines

Merge changes from team/russell/issue_9520

These changes make sure that the reference count for sip_peer objects properly
reflects the fact that the peer is sitting in the scheduler for a scheduled
callback for qualifying peers or for expiring registrations.  Without this, it
was possible for these callbacks to happen at the same time that the peer was
being destroyed.  This was especially likely to happen with realtime peers, and
for people making use of the realtime prune CLI command.

(closes issue #9520)
Reported by: kryptolus
Committed patch by me

........

................
r114527 | russell | 2008-04-22 12:46:01 -0300 (Tue, 22 Apr 2008) | 8 lines

Correct action_ping() and action_events() with regards to Manager 1.1
documentation.  Also, fix a bug in xml_translate().

(closes issue #11649)
Reported by: ys
Patches:
      trunk_manager.c.diff uploaded by ys (license 281)

................
r114529 | file | 2008-04-22 12:54:06 -0300 (Tue, 22 Apr 2008) | 6 lines

Add support for authenticating on a NOTIFY request. This is useful for phones that require it when sending them a special packet to get them to do something (such as reload their configuration).
(closes issue #9896)
Reported by: IgorG
Patches:
      sipnotify-113980-v14.patch uploaded by IgorG (license 20)

................
r114533 | russell | 2008-04-22 13:47:00 -0300 (Tue, 22 Apr 2008) | 4 lines

Add a c() option for the Jack() application and JACK_HOOK() funciton for supplying
a custom client name.  Using the channel name is still the default.  This was done
at the request of Jared Smith.

................
r114538 | russell | 2008-04-22 15:04:39 -0300 (Tue, 22 Apr 2008) | 17 lines

Merged revisions 114537 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114537 | russell | 2008-04-22 13:03:33 -0500 (Tue, 22 Apr 2008) | 9 lines

If the dial string passed to the call channel callback does not indicate an
extension, then consider the extension on the channel before falling back
to the default.

(closes issue #12479)
Reported by: darren1713
Patches:
      exten_dial_fix_chan_iax2.c.patch uploaded by darren1713 (license 116)

........

................
r114540 | qwell | 2008-04-22 15:14:09 -0300 (Tue, 22 Apr 2008) | 8 lines

Allow setqueuevar=yes (et al) to work, after changes to pbx_builtin_setvar()

(closes issue #12490)
Reported by: bcnit
Patches:
      12490-queuevars-3.diff uploaded by qwell (license 4)
Tested by: qwell

................
r114543 | russell | 2008-04-22 15:30:47 -0300 (Tue, 22 Apr 2008) | 10 lines

Blocked revisions 114542 via svnmerge

........
r114542 | russell | 2008-04-22 13:29:56 -0500 (Tue, 22 Apr 2008) | 3 lines

After a parked call times out, allow the call back to the parker to time out.
(closes issue #10890)

........

................
r114546 | russell | 2008-04-22 16:45:12 -0300 (Tue, 22 Apr 2008) | 9 lines

Blocked revisions 114545 via svnmerge

........
r114545 | russell | 2008-04-22 14:45:00 -0500 (Tue, 22 Apr 2008) | 2 lines

Trivial change to read the number of samples from a frame before calling ast_write()

........

................
r114548 | russell | 2008-04-22 17:25:56 -0300 (Tue, 22 Apr 2008) | 2 lines

re-add a fix that got lost with a recent change

................
r114551 | russell | 2008-04-22 18:15:41 -0300 (Tue, 22 Apr 2008) | 11 lines

Blocked revisions 114550 via svnmerge

........
r114550 | russell | 2008-04-22 16:14:55 -0500 (Tue, 22 Apr 2008) | 4 lines

I thought I was going to be able to leave 1.4 alone, but that was not the case.
I ran into some problems with G.722 in 1.4, so I have merged in all of the fixes
in this area that I have made in trunk/1.6.0, and things are happy again.

........

................
r114553 | murf | 2008-04-22 18:57:57 -0300 (Tue, 22 Apr 2008) | 14 lines


(closes issue #12469)
Reported by: triccyx

I had a bit a problem reproducing this in my setup (trying not to disturb my other stuff)
but finally, I got it. The problem appears to be that the extension is being added in
replace mode, which kinda assumes that the pattern trie has been formed, when in fact,
in this case, it was not. The checks being done are not nec. when the tree is not yet
formed, as changes like this will be summarized when the trie is formed in the future.

I tested the fix, and the crash no longer happens. Feel free to open the bug again if
this fix doesn't cure the problem.


................
r114559 | russell | 2008-04-22 19:17:31 -0300 (Tue, 22 Apr 2008) | 13 lines

Merged revisions 114558 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114558 | russell | 2008-04-22 17:15:36 -0500 (Tue, 22 Apr 2008) | 5 lines

When we receive a full frame that is supposed to contain our call number,
ensure that it has the correct one.
(closes issue #10078)
(AST-2008-006)

........

................
r114572 | tilghman | 2008-04-22 20:58:19 -0300 (Tue, 22 Apr 2008) | 10 lines

Merged revisions 114571 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114571 | tilghman | 2008-04-22 18:51:44 -0500 (Tue, 22 Apr 2008) | 2 lines

Treat a 502 just like a 503, when it comes to processing a response code

........

................
r114575 | mmichelson | 2008-04-22 21:40:30 -0300 (Tue, 22 Apr 2008) | 10 lines

Round 1 of IMAP_STORAGE-related app_voicemail changes

This makes IMAP_STORAGE include the proper headers if you
have specified the "system" option for --with-imap when running
the configure script and your IMAP-related headers exist in 
/usr/include/c-client.

This change is due to a hasty merge of a 1.4 change I made.


................
r114577 | mmichelson | 2008-04-22 21:58:49 -0300 (Tue, 22 Apr 2008) | 23 lines

Round 2 of IMAP_STORAGE app_voicemail.c fixes:

This fixes a bug that was thought to be fixed already.

app_voicemail, if using IMAP_STORAGE, has a problem because
the IMAP header files include syslog.h, which define LOG_WARNING
and LOG_DEBUG to be different than what Asterisk uses for those
same macros. This was "fixed" in the past by including all the 
IMAP header files prior to including asterisk.h. This fix worked...
unless you were to try to compile with MALLOC_DEBUG. MALLOC_DEBUG
prepends the inclusion of astmm.h to every file, which means that no
matter what order the includes are in in app_voicemail, the unexpected
values for LOG_WARNING and LOG_DEBUG will be in place.

The action taken for this fix was to define AST_LOG_* macros in addition
to the LOG_* macros already defined. These new macros are used in app_voicemail.c,
logger.h, and astobj.h right now, and their use will be encouraged in the future.

In consideration of those who have written third-party modules which use 
the LOG_* macros, these will NOT be removed from the source, however future use
of these macros is discouraged.


................
r114580 | file | 2008-04-23 11:55:03 -0300 (Wed, 23 Apr 2008) | 12 lines

Merged revisions 114579 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114579 | file | 2008-04-23 11:54:11 -0300 (Wed, 23 Apr 2008) | 4 lines

Instead of stopping dialplan execution when SayNumber attempts to say a large number that it can not print out a message informing the user and continue on.
(closes issue #12502)
Reported by: bcnit

........

................
r114585 | oej | 2008-04-23 13:53:34 -0300 (Wed, 23 Apr 2008) | 10 lines

Merged revisions 114584 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114584 | oej | 2008-04-23 18:51:41 +0200 (Ons, 23 Apr 2008) | 2 lines

Add 502 support for both directions, not only one...  (see r114571)

........

................
r114588 | russell | 2008-04-23 14:18:29 -0300 (Wed, 23 Apr 2008) | 10 lines

Merged revisions 114587 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114587 | russell | 2008-04-23 12:16:32 -0500 (Wed, 23 Apr 2008) | 2 lines

Fix find_callno_locked() to actually return the callno locked in some more cases.

........

................
r114592 | russell | 2008-04-23 15:01:00 -0300 (Wed, 23 Apr 2008) | 13 lines

Merged revisions 114591 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114591 | russell | 2008-04-23 12:55:31 -0500 (Wed, 23 Apr 2008) | 5 lines

Store the manager session ID explicitly as 4 byte ID instead of a ulong.  The
mansession_id cookie is coded to be limited to 8 characters of hex, and this
could break logins from 64-bit machines in some cases.
(inspired by AST-20)

........

................
r114595 | qwell | 2008-04-23 15:33:28 -0300 (Wed, 23 Apr 2008) | 16 lines

Merged revisions 114594 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114594 | qwell | 2008-04-23 13:28:44 -0500 (Wed, 23 Apr 2008) | 8 lines

Fix reload/unload for res_musiconhold module.

(closes issue #11575)
Reported by: sunder
Patches:
      M11575_14_rev3.diff uploaded by junky (license 177)
      bug11575_trunk.diff.txt uploaded by jamesgolovich (license 176)

........

................
r114598 | russell | 2008-04-23 17:53:05 -0300 (Wed, 23 Apr 2008) | 18 lines

Merged revisions 114597 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114597 | russell | 2008-04-23 15:49:18 -0500 (Wed, 23 Apr 2008) | 10 lines

Fix an issue that caused getting the correct next channel to not always work.
Also, remove setting the amount of time to wait for a digit from 5 seconds back
down to 1/10 of a second.  I believe this was so the beep didn't get played over
and over really fast, but a while back I put in another fix for that issue.

(closes issue #12498)
Reported by: jsmith
Patches:
      app_chanspy_channel_walk.trunk.patch uploaded by jsmith (license 15)

........

................
r114601 | russell | 2008-04-23 19:53:20 -0300 (Wed, 23 Apr 2008) | 14 lines

Merged revisions 114600 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114600 | russell | 2008-04-23 17:18:12 -0500 (Wed, 23 Apr 2008) | 6 lines

Improve some broken cookie parsing code.  Previously, manager login over HTTP
would only work if the mansession_id cookie was first.  Now, the code builds
a list of all of the cookies in the Cookie header.  This fixes a problem
observed by users of the Asterisk GUI.
(closes AST-20)

........

................
r114604 | russell | 2008-04-24 11:55:21 -0300 (Thu, 24 Apr 2008) | 3 lines

Change a verbose message to debug.
(closes issue #12514)

................
r114606 | oej | 2008-04-24 11:59:05 -0300 (Thu, 24 Apr 2008) | 11 lines

Merged revisions 114603 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114603 | oej | 2008-04-24 16:55:18 +0200 (Tor, 24 Apr 2008) | 3 lines

Only have one max-forwards header in outbound REFERs.
Discovered in the Asterisk SIP Masterclass in Orlando. Thanks Joe!

........

................
r114609 | russell | 2008-04-24 12:56:55 -0300 (Thu, 24 Apr 2008) | 12 lines

Merged revisions 114608 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114608 | russell | 2008-04-24 10:55:21 -0500 (Thu, 24 Apr 2008) | 4 lines

Fix a silly mistake in a change I made yesterday that caused chan_iax2 to blow
up very quickly.
(issue #12515)

........

................
r114612 | qwell | 2008-04-24 13:47:01 -0300 (Thu, 24 Apr 2008) | 17 lines

Merged revisions 51989 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #12496)
Reported by: daniele
Patches:
      misdn-moh-1.6.0-beta7.1.patch uploaded by daniele (license 471)
Tested by: daniele

Technically, I didn't use the patch above except to find out what revision to merge - but it's the same thing as this revision.

........
r51989 | crichter | 2007-01-24 06:57:22 -0600 (Wed, 24 Jan 2007) | 1 line

added fix from #8899
........

................
r114617 | tilghman | 2008-04-24 16:24:31 -0300 (Thu, 24 Apr 2008) | 6 lines

Fix DST calculation, and fix bug in calculation of whether conf has started yet or not
(Closes issue #12292)
 Reported by: DEA
 Patches: 
       app_meetme-rt-dst-sched-fix.txt uploaded by DEA (license 3)

................
r114622 | tilghman | 2008-04-24 16:54:57 -0300 (Thu, 24 Apr 2008) | 12 lines

Merged revisions 114621 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114621 | tilghman | 2008-04-24 14:53:36 -0500 (Thu, 24 Apr 2008) | 4 lines

Ensure that when we set the accountcode, it actually shows up in the CDR.
(Fix for AMI Originate)
(Closes issue #12007)

........

................
r114625 | mmichelson | 2008-04-24 17:06:06 -0300 (Thu, 24 Apr 2008) | 18 lines

Merged revisions 114624 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114624 | mmichelson | 2008-04-24 15:04:24 -0500 (Thu, 24 Apr 2008) | 10 lines

Resolve a deadlock in chan_local by releasing the channel lock
temporarily.

(closes issue #11712)
Reported by: callguy
Patches:
      11712.patch uploaded by putnopvut (license 60)
Tested by: acunningham


........

................
r114629 | mmichelson | 2008-04-24 17:43:52 -0300 (Thu, 24 Apr 2008) | 16 lines

Merged revisions 114628 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114628 | mmichelson | 2008-04-24 15:43:03 -0500 (Thu, 24 Apr 2008) | 8 lines

Output of channel variables when eventwhencalled=vars was set
was being truncated two characters. This patch corrects the
problem.

(closes issue #12493)
Reported by: davidw


........

................
r114633 | mmichelson | 2008-04-24 18:35:39 -0300 (Thu, 24 Apr 2008) | 19 lines

Merged revisions 114632 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114632 | mmichelson | 2008-04-24 16:35:08 -0500 (Thu, 24 Apr 2008) | 11 lines

Re-invite RTP during a masquerade so that, for instance, an AMI
redirect of two channels which are natively bridged will preserve audio
on both channels. This prevents a problem with Asterisk not re-inviting
due to one of the channels having being a zombie.

(closes issue #12513)
Reported by: mneuhauser
Patches:
      asterisk-1.4-114602_restore-RTP-on-fixup.patch uploaded by mneuhauser (license 425)


........

................
r114635 | file | 2008-04-24 19:11:46 -0300 (Thu, 24 Apr 2008) | 4 lines

Hey look, it builds.
(closes issue #12519)
Reported by: falves11

................
r114637 | mvanbaak | 2008-04-24 19:16:48 -0300 (Thu, 24 Apr 2008) | 8 lines

Pass the hangup cause all the way to the calling app/channel.

(closes issue #11328)
Reported by: rain
Patches:
      20071207__pass_cause_in_hangup_control_frame.diff.txt uploaded by Corydon76 (license 14)
brought up-to-date to trunk by me

................
r114644 | seanbright | 2008-04-25 10:56:05 -0300 (Fri, 25 Apr 2008) | 1 line

Speaking of building...
................
r114650 | tilghman | 2008-04-25 12:58:36 -0300 (Fri, 25 Apr 2008) | 13 lines

Blocked revisions 114649 via svnmerge

........
r114649 | tilghman | 2008-04-25 10:53:52 -0500 (Fri, 25 Apr 2008) | 6 lines

Reference documentation files that actually exist.
(closes issue #12516)
 Reported by: linuxmaniac
 Patches: 
       diff_rev114611.patch uploaded by linuxmaniac (license 472)

........

................
r114651 | mmichelson | 2008-04-25 13:25:17 -0300 (Fri, 25 Apr 2008) | 4 lines

Fix a memory leak and protect against potential dereferences of a NULL
pointer.


................
r114655 | russell | 2008-04-25 15:18:27 -0300 (Fri, 25 Apr 2008) | 10 lines

Merge code from team/russell/parking_updates

Add some additional features to the core park_call_full() function, and expose
them as options to the Park() application.  The functionality being added is the
ability to specify a custom return extension/context/priority, a custom timeout,
and a couple of options.  The options are to play ringing instead of MOH to the
parked caller, and to randomize parking spot selection.

(code inspired by the patch in AST-17, code from switchvox)

................
r114656 | mmichelson | 2008-04-25 15:18:30 -0300 (Fri, 25 Apr 2008) | 13 lines

This patch allows for forwarding a message with a "comment" attachment
if using IMAP storage for voicemail. The comment will be recorded and attached
as a second attachment in addition to the original message. This will be invoked
if you choose to prepend a message the way you would with file or ODBC storage


(closes issue #12028)
Reported by: jaroth
Patches:
      forward_with_comment_v2.patch uploaded by jaroth (license 50)
Tested by: jaroth


................
r114660 | qwell | 2008-04-25 15:32:22 -0300 (Fri, 25 Apr 2008) | 12 lines

Merge app_pickupchan with app_directed_pickup, for AST-27.

Initially, this was to be a new feature, with a patch from Switchvox,
 but after discussions, it was noted that this feature already existed in trunk.

The resulting discussions ended in a comment that was along the lines of
 "the patch provided here is a lot smaller than what is already in trunk,
 because it doesn't create a new application and duplicate existing code"

It was decided that these two applications could be easily merged to reduce
 code duplication.  SO, that's what this does.

................
r114663 | mmichelson | 2008-04-25 16:33:27 -0300 (Fri, 25 Apr 2008) | 12 lines

Merged revisions 114662 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114662 | mmichelson | 2008-04-25 14:32:02 -0500 (Fri, 25 Apr 2008) | 4 lines

Move the unlock of the spyee channel to outside the start_spying() function so that
the channel is not unlocked twice when using whisper mode.


........

................
r114665 | tilghman | 2008-04-25 16:39:26 -0300 (Fri, 25 Apr 2008) | 2 lines

Oops, this isn't necessarily AGI that is forking anymore

................
r114667 | tilghman | 2008-04-25 17:20:10 -0300 (Fri, 25 Apr 2008) | 2 lines

Whitespace changes only

................
r114674 | russell | 2008-04-25 19:00:35 -0300 (Fri, 25 Apr 2008) | 11 lines

Merged revisions 114673 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114673 | russell | 2008-04-25 16:54:40 -0500 (Fri, 25 Apr 2008) | 3 lines

Use consistent logic for checking to see if a call number has been chosen yet.
Also, remove some redundant logic I recently added in a fix.

........

................
r114676 | russell | 2008-04-25 19:04:46 -0300 (Fri, 25 Apr 2008) | 7 lines

Lock the channel around datastore access

(closes issue #12527)
Reported by: mnicholson
Patches:
      pbx_lua4.diff uploaded by mnicholson (license 96)

................
r114678 | mmichelson | 2008-04-25 19:24:32 -0300 (Fri, 25 Apr 2008) | 11 lines

Adding a new option, 'B' to app_chanspy. This option allows the spy to
barge on the call. It is like the existing whisper option, except that
it allows the spy to talk to both sides of the conversation on which
he is spying.

This feature has existed in Switchvox, and this merges the functionality
into Asterisk.

(AST-32)


................
r114683 | tilghman | 2008-04-25 23:48:56 -0300 (Fri, 25 Apr 2008) | 8 lines

Add 'sip qualify peer <peer>' command (with AMI SIPqualifypeer)
(closes issue #12524)
 Reported by: ctooley
 Patches: 
       sip_qualify_peer.diff.2 uploaded by ctooley (license 136)
       some modifications for trunk by Corydon76
 Tested by: Corydon76

................
r114690 | tilghman | 2008-04-26 10:17:19 -0300 (Sat, 26 Apr 2008) | 14 lines

Merged revisions 114689 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114689 | tilghman | 2008-04-26 08:15:21 -0500 (Sat, 26 Apr 2008) | 6 lines

Clicking forward without selecting a message leaves an errant .lock file.
(closes issue #12528)
 Reported by: pukepail
 Patches: 
       patch.diff uploaded by pukepail (license 431)

........

................
r114692 | tilghman | 2008-04-26 12:08:51 -0300 (Sat, 26 Apr 2008) | 2 lines

Unleak reference

................
r114696 | seanbright | 2008-04-26 22:28:32 -0300 (Sat, 26 Apr 2008) | 13 lines

Merged revisions 114695 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114695 | seanbright | 2008-04-26 21:26:15 -0400 (Sat, 26 Apr 2008) | 5 lines

When we don't explicitly pass a path to the --with-tds configure option, we
may end up finding tds.h in /usr/local/include instead of /usr/include.  If
this happens, the grep that looks for the version (from tdsver.h) will fail
and we'll have some problems during the build.

........

................
r114700 | mvanbaak | 2008-04-27 12:17:18 -0300 (Sun, 27 Apr 2008) | 8 lines

Make MWI in chan_skinny event based modeled after chan_zap and chan_mgcp.

(closes issue #12214)
Reported by: DEA
Patches:
      chan_skinny-vm-events-v3.txt uploaded by DEA (license 3)
	  Tested by: DEA and me

................
r114703 | russell | 2008-04-27 19:54:33 -0300 (Sun, 27 Apr 2008) | 2 lines

s/chan_zap/chan_skinny/

................
r114706 | tilghman | 2008-04-28 01:30:02 -0300 (Mon, 28 Apr 2008) | 2 lines

Fix breakage caused by #12028.  (Closes issue #12535)

................
r114709 | tilghman | 2008-04-28 01:53:20 -0300 (Mon, 28 Apr 2008) | 13 lines

Merged revisions 114708 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114708 | tilghman | 2008-04-27 23:47:39 -0500 (Sun, 27 Apr 2008) | 5 lines

When modules are embedded, they take on a different name, without the ".so"
extension.  Specifically check for this name, when we're checking if a module
is loaded.
(Closes issue #12534)

........

................

Removed:
    team/file/bridging/apps/app_pickupchan.c
Modified:
    team/file/bridging/   (props changed)
    team/file/bridging/CHANGES
    team/file/bridging/apps/app_alarmreceiver.c
    team/file/bridging/apps/app_chanspy.c
    team/file/bridging/apps/app_dial.c
    team/file/bridging/apps/app_directed_pickup.c
    team/file/bridging/apps/app_disa.c
    team/file/bridging/apps/app_externalivr.c
    team/file/bridging/apps/app_followme.c
    team/file/bridging/apps/app_jack.c
    team/file/bridging/apps/app_meetme.c
    team/file/bridging/apps/app_minivm.c
    team/file/bridging/apps/app_parkandannounce.c
    team/file/bridging/apps/app_playback.c
    team/file/bridging/apps/app_queue.c
    team/file/bridging/apps/app_rpt.c
    team/file/bridging/apps/app_sms.c
    team/file/bridging/apps/app_speech_utils.c
    team/file/bridging/apps/app_voicemail.c
    team/file/bridging/apps/app_waitforring.c
    team/file/bridging/apps/app_zapscan.c
    team/file/bridging/channels/chan_alsa.c
    team/file/bridging/channels/chan_bridge.c
    team/file/bridging/channels/chan_console.c
    team/file/bridging/channels/chan_gtalk.c
    team/file/bridging/channels/chan_h323.c
    team/file/bridging/channels/chan_iax2.c
    team/file/bridging/channels/chan_jingle.c
    team/file/bridging/channels/chan_local.c
    team/file/bridging/channels/chan_mgcp.c
    team/file/bridging/channels/chan_misdn.c
    team/file/bridging/channels/chan_oss.c
    team/file/bridging/channels/chan_sip.c
    team/file/bridging/channels/chan_skinny.c
    team/file/bridging/channels/chan_unistim.c
    team/file/bridging/channels/chan_zap.c
    team/file/bridging/configs/sip_notify.conf.sample
    team/file/bridging/configure
    team/file/bridging/configure.ac
    team/file/bridging/contrib/scripts/vmail.cgi
    team/file/bridging/include/asterisk/astobj.h
    team/file/bridging/include/asterisk/channel.h
    team/file/bridging/include/asterisk/logger.h
    team/file/bridging/include/asterisk/manager.h
    team/file/bridging/include/asterisk/pbx.h
    team/file/bridging/main/app.c
    team/file/bridging/main/channel.c
    team/file/bridging/main/features.c
    team/file/bridging/main/http.c
    team/file/bridging/main/manager.c
    team/file/bridging/main/pbx.c
    team/file/bridging/main/utils.c
    team/file/bridging/pbx/pbx_lua.c
    team/file/bridging/res/res_musiconhold.c

Propchange: team/file/bridging/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/file/bridging/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/file/bridging/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Apr 28 08:35:19 2008
@@ -1,1 +1,1 @@
-/trunk:1-114488
+/trunk:1-114711

Modified: team/file/bridging/CHANGES
URL: http://svn.digium.com/view/asterisk/team/file/bridging/CHANGES?view=diff&rev=114712&r1=114711&r2=114712
==============================================================================
--- team/file/bridging/CHANGES (original)
+++ team/file/bridging/CHANGES Mon Apr 28 08:35:19 2008
@@ -6,6 +6,7 @@
 ------------------
  * Added a new dialplan function, AST_CONFIG(), which allows you to access
    variables from an Asterisk configuration file.
+ * The JACK_HOOK function now has a c() option to supply a custom client name.
 
 Zaptel channel driver (chan_zap) Changes
 ----------------------------------------
@@ -31,6 +32,10 @@
    continue in the dialplan, at the specified label, if the caller hangs up.
  * ChanSpy and ExtenSpy have a new option, 's' which suppresses speaking the
    technology name (e.g. SIP, IAX, etc) of the channel being spied on.
+ * The Jack application now has a c() option to supply a custom client name.
+ * Chanspy has a new option, 'B', which can be used to "barge" on a call. This is
+   like the pre-existing whisper mode, except that the spy can also talk to the
+   participant on the bridged channel as well.
 
 SIP Changes
 -----------

Modified: team/file/bridging/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_alarmreceiver.c?view=diff&rev=114712&r1=114711&r2=114712
==============================================================================
--- team/file/bridging/apps/app_alarmreceiver.c (original)
+++ team/file/bridging/apps/app_alarmreceiver.c Mon Apr 28 08:35:19 2008
@@ -252,6 +252,9 @@
 
 		/* If they hung up, leave */
 		if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP)) {
+			if (f->seqno) {
+				chan->hangupcause = f->seqno;
+			}
 			ast_frfree(f);
 			res = -1;
 			break;

Modified: team/file/bridging/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_chanspy.c?view=diff&rev=114712&r1=114711&r2=114712
==============================================================================
--- team/file/bridging/apps/app_chanspy.c (original)
+++ team/file/bridging/apps/app_chanspy.c Mon Apr 28 08:35:19 2008
@@ -148,6 +148,7 @@
 	OPTION_EXIT      = (1 << 8),    /* Exit to a valid single digit extension */
 	OPTION_ENFORCED  = (1 << 9),    /* Enforced mode */
 	OPTION_NOTECH    = (1 << 10),   /* Skip technology name playback */
+	OPTION_BARGE     = (1 << 11),   /* Barge mode (whisper to both channels) */
 } chanspy_opt_flags;
 
 enum {
@@ -161,6 +162,7 @@
 AST_APP_OPTIONS(spy_opts, {
 	AST_APP_OPTION('q', OPTION_QUIET),
 	AST_APP_OPTION('b', OPTION_BRIDGED),
+	AST_APP_OPTION('B', OPTION_BARGE),
 	AST_APP_OPTION('w', OPTION_WHISPER),
 	AST_APP_OPTION('W', OPTION_PRIVATE),
 	AST_APP_OPTION_ARG('v', OPTION_VOLUME, OPT_ARG_VOLUME),
@@ -177,6 +179,7 @@
 	/* spy data */
 	struct ast_audiohook spy_audiohook;
 	struct ast_audiohook whisper_audiohook;
+	struct ast_audiohook bridge_whisper_audiohook;
 	int fd;
 	int volfactor;
 };
@@ -230,7 +233,7 @@
 	.generate = spy_generate,
 };
 
-static int start_spying(struct ast_channel *chan, const char *spychan_name, struct ast_audiohook *audiohook) 
+static int start_spying(struct ast_channel *chan, const char *spychan_name, struct ast_audiohook *audiohook)
 {
 	int res = 0;
 	struct ast_channel *peer = NULL;
@@ -239,12 +242,9 @@
 
 	res = ast_audiohook_attach(chan, audiohook);
 
-	if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan))) {
-		ast_channel_unlock(chan);
+	if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan))) { 
 		ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE);
-	} else
-		ast_channel_unlock(chan);
-
+	}
 	return res;
 }
 
@@ -293,16 +293,23 @@
 
 	ast_audiohook_init(&csth.spy_audiohook, AST_AUDIOHOOK_TYPE_SPY, "ChanSpy");
 
-	if (start_spying(spyee, spyer_name, &csth.spy_audiohook)) { /* Unlocks spyee */
+	if (start_spying(spyee, spyer_name, &csth.spy_audiohook)) {
 		ast_audiohook_destroy(&csth.spy_audiohook);
+		ast_channel_unlock(spyee);
 		return 0;
 	}
 
-	if (ast_test_flag(flags, OPTION_WHISPER)) {
+	if (ast_test_flag(flags, OPTION_BARGE)) {
+  		ast_audiohook_init(&csth.whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "ChanSpy");
+		ast_audiohook_init(&csth.bridge_whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "Chanspy");
+  		start_spying(spyee, spyer_name, &csth.whisper_audiohook); /* Unlocks spyee */
+		start_spying(ast_bridged_channel(spyee), spyer_name, &csth.bridge_whisper_audiohook);
+	} else if (ast_test_flag(flags, OPTION_WHISPER)) {
 		ast_audiohook_init(&csth.whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "ChanSpy");
 		start_spying(spyee, spyer_name, &csth.whisper_audiohook); /* Unlocks spyee */
-	}
-
+  	}
+
+	ast_channel_unlock(spyee);
 	spyee = NULL;
 
 	csth.volfactor = *volfactor;
@@ -339,7 +346,16 @@
 			break;
 		}
 
-		if (ast_test_flag(flags, OPTION_WHISPER) && f->frametype == AST_FRAME_VOICE) {
+		if (ast_test_flag(flags, OPTION_BARGE) && f->frametype == AST_FRAME_VOICE) {
+			ast_audiohook_lock(&csth.whisper_audiohook);
+			ast_audiohook_lock(&csth.bridge_whisper_audiohook);
+			ast_audiohook_write_frame(&csth.whisper_audiohook, AST_AUDIOHOOK_DIRECTION_WRITE, f);
+			ast_audiohook_write_frame(&csth.bridge_whisper_audiohook, AST_AUDIOHOOK_DIRECTION_WRITE, f);
+			ast_audiohook_unlock(&csth.whisper_audiohook);
+			ast_audiohook_unlock(&csth.bridge_whisper_audiohook);
+			ast_frfree(f);
+			continue;
+		} else if (ast_test_flag(flags, OPTION_WHISPER) && f->frametype == AST_FRAME_VOICE) {
 			ast_audiohook_lock(&csth.whisper_audiohook);
 			ast_audiohook_write_frame(&csth.whisper_audiohook, AST_AUDIOHOOK_DIRECTION_WRITE, f);
 			ast_audiohook_unlock(&csth.whisper_audiohook);
@@ -401,7 +417,16 @@
 	else
 		ast_deactivate_generator(chan);
 
-	if (ast_test_flag(flags, OPTION_WHISPER)) {
+	if (ast_test_flag(flags, OPTION_BARGE)) {
+		ast_audiohook_lock(&csth.whisper_audiohook);
+		ast_audiohook_detach(&csth.whisper_audiohook);
+		ast_audiohook_unlock(&csth.whisper_audiohook);
+		ast_audiohook_destroy(&csth.whisper_audiohook);
+		ast_audiohook_lock(&csth.bridge_whisper_audiohook);
+		ast_audiohook_detach(&csth.bridge_whisper_audiohook);
+		ast_audiohook_unlock(&csth.bridge_whisper_audiohook);
+		ast_audiohook_destroy(&csth.bridge_whisper_audiohook);
+	} else if (ast_test_flag(flags, OPTION_WHISPER)) {
 		ast_audiohook_lock(&csth.whisper_audiohook);
 		ast_audiohook_detach(&csth.whisper_audiohook);
 		ast_audiohook_unlock(&csth.whisper_audiohook);
@@ -705,12 +730,11 @@
 
 			for (s = peer_name; s < ptr; s++)
 				*s = tolower(*s);
-		
 			/* We have to unlock the peer channel here to avoid a deadlock.
-			 * So, when we need it again, we have to lock the datastore and get
-			 * the pointer from there to see if the channel is still valid. */
+			 * So, when we need to dereference it again, we have to lock the 
+			 * datastore and get the pointer from there to see if the channel 
+			 * is still valid. */
 			ast_channel_unlock(peer);
-			peer = NULL;
 
 			if (!ast_test_flag(flags, OPTION_QUIET)) {
 				if (!ast_test_flag(flags, OPTION_NOTECH)) {
@@ -731,7 +755,6 @@
 					ast_say_digits(chan, atoi(ptr), "", chan->language);
 			}
 
-			waitms = 5000;
 			res = channel_spy(chan, peer_chanspy_ds, &volfactor, fd, flags, exitcontext);
 			num_spyed_upon++;	
 

Modified: team/file/bridging/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_dial.c?view=diff&rev=114712&r1=114711&r2=114712
==============================================================================
--- team/file/bridging/apps/app_dial.c (original)
+++ team/file/bridging/apps/app_dial.c Mon Apr 28 08:35:19 2008
@@ -26,7 +26,7 @@
  */
 
 /*** MODULEINFO
-        <depend>chan_local</depend>
+	<depend>chan_local</depend>
  ***/
 
 
@@ -788,8 +788,11 @@
 				*to = -1;
 				strcpy(pa->status, "CANCEL");
 				ast_cdr_noanswer(in->cdr);
-				if (f)
+				if (f) {
+					if (f->seqno)
+						in->hangupcause = f->seqno;
 					ast_frfree(f);
+				}
 				return NULL;
 			}
 
@@ -1931,9 +1934,9 @@
 		}
 		if (res != AST_PBX_NO_HANGUP_PEER) {
 			if (!ast_check_hangup(peer) && ast_test_flag64(&opts, OPT_CALLEE_GO_ON) && !ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {		
-                        	replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
-                        	ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
-	                        ast_pbx_start(peer);
+				replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
+				ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
+				ast_pbx_start(peer);
 			} else {
 				if (!ast_check_hangup(chan))
 					chan->hangupcause = peer->hangupcause;

Modified: team/file/bridging/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_directed_pickup.c?view=diff&rev=114712&r1=114711&r2=114712
==============================================================================
--- team/file/bridging/apps/app_directed_pickup.c (original)
+++ team/file/bridging/apps/app_directed_pickup.c Mon Apr 28 08:35:19 2008
@@ -4,6 +4,9 @@
  * Copyright (C) 2005, Joshua Colp
  *
  * Joshua Colp <jcolp at digium.com>
+ *
+ * Portions merged from app_pickupchan, which was
+ * Copyright (C) 2008, Gary Cook
  *
  * See http://www.asterisk.org for more information about
  * the Asterisk project. Please do not directly contact
@@ -21,6 +24,7 @@
  * \brief Directed Call Pickup Support
  *
  * \author Joshua Colp <jcolp at digium.com>
+ * \author Gary Cook
  *
  * \ingroup applications
  */
@@ -51,6 +55,13 @@
 "When no parameter is specified, the application will pickup a channel matching\n"
 "the pickup group of the active channel.";
 
+static const char *app2 = "PickupChan";
+static const char *synopsis2 = "Pickup a ringing channel";
+static const char *descrip2 =
+"  PickupChan(channel[&channel...]): This application can pickup any ringing channel\n";
+
+/*! \todo This application should return a result code, like PICKUPRESULT */
+
 /* Perform actual pickup between two channels */
 static int pickup_do(struct ast_channel *chan, struct ast_channel *target)
 {
@@ -83,6 +94,47 @@
 		return 1;
 	else
 		return 0;
+}
+
+/*! \brief Helper Function to walk through ALL channels checking NAME and STATE */
+static struct ast_channel *my_ast_get_channel_by_name_locked(char *channame)
+{
+	struct ast_channel *chan;
+	char *chkchan = alloca(strlen(channame) + 2);
+
+	/* need to append a '-' for the comparison so we check full channel name,
+	 * i.e SIP/hgc- , use a temporary variable so original stays the same for
+	 * debugging.
+	 */
+	strcpy(chkchan, channame);
+	strcat(chkchan, "-");
+
+	for (chan = ast_walk_channel_by_name_prefix_locked(NULL, channame, strlen(channame));
+		 chan;
+		 chan = ast_walk_channel_by_name_prefix_locked(chan, channame, strlen(channame))) {
+		if (!strncasecmp(chan->name, chkchan, strlen(chkchan)) && can_pickup(chan))
+			return chan;
+		ast_channel_unlock(chan);
+	}
+	return NULL;
+}
+
+/*! \brief Attempt to pick up specified channel named , does not use context */
+static int pickup_by_channel(struct ast_channel *chan, char *pickup)
+{
+	int res = 0;
+	struct ast_channel *target;
+
+	if (!(target = my_ast_get_channel_by_name_locked(pickup)))
+		return -1;
+
+	/* Just check that we are not picking up the SAME as target */
+	if (chan->name != target->name && chan != target) {
+		res = pickup_do(chan, target);
+		ast_channel_unlock(target);
+	}
+
+	return res;
 }
 
 /* Attempt to pick up specified extension with context */
@@ -126,7 +178,7 @@
 	return res;
 }
 
-/* Main application entry point */
+/* application entry point for Pickup() */
 static int pickup_exec(struct ast_channel *chan, void *data)
 {
 	int res = 0;
@@ -155,18 +207,51 @@
 	return res;
 }
 
+/* application entry point for PickupChan() */
+static int pickupchan_exec(struct ast_channel *chan, void *data)
+{
+	int res = 0;
+	char *tmp = ast_strdupa(data);
+	char *pickup = NULL;
+
+	if (ast_strlen_zero(data)) {
+		ast_log(LOG_WARNING, "PickupChan requires an argument (channel)!\n");
+		return -1;	
+	}
+
+	/* Parse channel */
+	while (!ast_strlen_zero(tmp) && (pickup = strsep(&tmp, "&"))) {
+		if (!strncasecmp(chan->name, pickup, strlen(pickup))) {
+			ast_log(LOG_NOTICE, "Cannot pickup your own channel %s.\n", pickup);
+		} else {
+			if (!pickup_by_channel(chan, pickup)) {
+				break;
+			}
+			ast_log(LOG_NOTICE, "No target channel found for %s.\n", pickup);
+		}
+	}
+
+	return res;
+}
+
 static int unload_module(void)
 {
 	int res;
 
 	res = ast_unregister_application(app);
+	res |= ast_unregister_application(app2);
 
 	return res;
 }
 
 static int load_module(void)
 {
-	return ast_register_application(app, pickup_exec, synopsis, descrip);
+	int res;
+
+	res = ast_register_application(app, pickup_exec, synopsis, descrip);
+	res |= ast_register_application(app2, pickupchan_exec, synopsis2, descrip2);
+
+	return res;
 }
 
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Directed Call Pickup Application");

Modified: team/file/bridging/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_disa.c?view=diff&rev=114712&r1=114711&r2=114712
==============================================================================
--- team/file/bridging/apps/app_disa.c (original)
+++ team/file/bridging/apps/app_disa.c Mon Apr 28 08:35:19 2008
@@ -195,6 +195,8 @@
 		}
 
 		if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP)) {
+			if (f->seqno)
+				chan->hangupcause = f->seqno;
 			ast_frfree(f);
 			ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
 			return -1;

Modified: team/file/bridging/apps/app_externalivr.c

[... 6570 lines stripped ...]



More information about the asterisk-commits mailing list