[asterisk-commits] file: branch file/audiohook-chains r114670 - in /team/file/audiohook-chains: ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 25 15:53:07 CDT 2008


Author: file
Date: Fri Apr 25 15:53:06 2008
New Revision: 114670

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114670
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 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

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

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

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

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

Propchange: team/file/audiohook-chains/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Apr 25 15:53:06 2008
@@ -1,1 +1,1 @@
-/trunk:1-114487
+/trunk:1-114669

Modified: team/file/audiohook-chains/CHANGES
URL: http://svn.digium.com/view/asterisk/team/file/audiohook-chains/CHANGES?view=diff&rev=114670&r1=114669&r2=114670
==============================================================================
--- team/file/audiohook-chains/CHANGES (original)
+++ team/file/audiohook-chains/CHANGES Fri Apr 25 15:53:06 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,7 @@
    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.
 
 SIP Changes
 -----------

Modified: team/file/audiohook-chains/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/file/audiohook-chains/apps/app_alarmreceiver.c?view=diff&rev=114670&r1=114669&r2=114670
==============================================================================
--- team/file/audiohook-chains/apps/app_alarmreceiver.c (original)
+++ team/file/audiohook-chains/apps/app_alarmreceiver.c Fri Apr 25 15:53:06 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/audiohook-chains/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/file/audiohook-chains/apps/app_chanspy.c?view=diff&rev=114670&r1=114669&r2=114670
==============================================================================
--- team/file/audiohook-chains/apps/app_chanspy.c (original)
+++ team/file/audiohook-chains/apps/app_chanspy.c Fri Apr 25 15:53:06 2008
@@ -239,12 +239,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 +290,18 @@
 
 	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)) {
 		ast_audiohook_init(&csth.whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "ChanSpy");
-		start_spying(spyee, spyer_name, &csth.whisper_audiohook); /* Unlocks spyee */
-	}
-
+		start_spying(spyee, spyer_name, &csth.whisper_audiohook);
+	}
+
+	ast_channel_unlock(spyee);
 	spyee = NULL;
 
 	csth.volfactor = *volfactor;
@@ -705,12 +704,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 +729,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/audiohook-chains/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/file/audiohook-chains/apps/app_dial.c?view=diff&rev=114670&r1=114669&r2=114670
==============================================================================
--- team/file/audiohook-chains/apps/app_dial.c (original)
+++ team/file/audiohook-chains/apps/app_dial.c Fri Apr 25 15:53:06 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/audiohook-chains/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/file/audiohook-chains/apps/app_directed_pickup.c?view=diff&rev=114670&r1=114669&r2=114670
==============================================================================
--- team/file/audiohook-chains/apps/app_directed_pickup.c (original)
+++ team/file/audiohook-chains/apps/app_directed_pickup.c Fri Apr 25 15:53:06 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/audiohook-chains/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/file/audiohook-chains/apps/app_disa.c?view=diff&rev=114670&r1=114669&r2=114670
==============================================================================
--- team/file/audiohook-chains/apps/app_disa.c (original)
+++ team/file/audiohook-chains/apps/app_disa.c Fri Apr 25 15:53:06 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/audiohook-chains/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/file/audiohook-chains/apps/app_externalivr.c?view=diff&rev=114670&r1=114669&r2=114670
==============================================================================
--- team/file/audiohook-chains/apps/app_externalivr.c (original)
+++ team/file/audiohook-chains/apps/app_externalivr.c Fri Apr 25 15:53:06 2008
@@ -87,8 +87,8 @@
 };
 
 static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u, 
-              int eivr_events_fd, int eivr_commands_fd, int eivr_errors_fd, 
-              const char *args);
+	int eivr_events_fd, int eivr_commands_fd, int eivr_errors_fd, 
+	const char *args);
 
 int eivr_connect_socket(struct ast_channel *chan, const char *host, int port);
 
@@ -560,6 +560,9 @@
  			} else if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP)) {
  				ast_chan_log(LOG_NOTICE, chan, "Got AST_CONTROL_HANGUP\n");
  				send_eivr_event(eivr_events, 'H', NULL, chan);
+				if (f->seqno) {
+					chan->hangupcause = f->seqno;
+				}
  				ast_frfree(f);
  				res = -1;
  				break;

Modified: team/file/audiohook-chains/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/team/file/audiohook-chains/apps/app_followme.c?view=diff&rev=114670&r1=114669&r2=114670
==============================================================================
--- team/file/audiohook-chains/apps/app_followme.c (original)
+++ team/file/audiohook-chains/apps/app_followme.c Fri Apr 25 15:53:06 2008
@@ -29,7 +29,7 @@
  */
 
 /*** MODULEINFO
-        <depend>chan_local</depend>
+	<depend>chan_local</depend>
  ***/
 
 #include "asterisk.h"
@@ -607,6 +607,9 @@
 					switch(f->subclass) {
 					case AST_CONTROL_HANGUP:
 						ast_verb(3, "%s received a hangup frame.\n", winner->name);
+						if (f->seqno) {
+							winner->hangupcause = f->seqno;
+						}
 						if (dg == 0) {
 							ast_verb(3, "The calling channel hungup. Need to drop everyone else.\n");
 							clear_calling_tree(findme_user_list);

Modified: team/file/audiohook-chains/apps/app_jack.c
URL: http://svn.digium.com/view/asterisk/team/file/audiohook-chains/apps/app_jack.c?view=diff&rev=114670&r1=114669&r2=114670
==============================================================================
--- team/file/audiohook-chains/apps/app_jack.c (original)
+++ team/file/audiohook-chains/apps/app_jack.c Fri Apr 25 15:53:06 2008
@@ -65,7 +65,9 @@
 "    o(<name>) - Connect the input port that gets created to the specified\n" \
 "                jack output port.\n" \
 "    n         - Do not automatically start the JACK server if it is not already\n" \
-"                running.\n"
+"                running.\n" \
+"    c(<name>) - By default, Asterisk will use the channel name for the jack client\n" \
+"                name.  Use this option to specify a custom client name.\n"
 
 static char *jack_app = "JACK";
 static char *jack_synopsis = 
@@ -82,6 +84,7 @@
 struct jack_data {
 	AST_DECLARE_STRING_FIELDS(
 		AST_STRING_FIELD(server_name);
+		AST_STRING_FIELD(client_name);
 		AST_STRING_FIELD(connect_input_port);
 		AST_STRING_FIELD(connect_output_port);
 	);
@@ -350,13 +353,17 @@
 
 static int init_jack_data(struct ast_channel *chan, struct jack_data *jack_data)
 {
-	const char *chan_name;
+	const char *client_name;
 	jack_status_t status = 0;
 	jack_options_t jack_options = JackNullOption;
 
-	ast_channel_lock(chan);
-	chan_name = ast_strdupa(chan->name);
-	ast_channel_unlock(chan);
+	if (!ast_strlen_zero(jack_data->client_name)) {
+		client_name = jack_data->client_name;
+	} else {
+		ast_channel_lock(chan);
+		client_name = ast_strdupa(chan->name);
+		ast_channel_unlock(chan);
+	}
 
 	if (!(jack_data->output_rb = jack_ringbuffer_create(RINGBUFFER_SIZE)))
 		return -1;
@@ -369,10 +376,10 @@
 
 	if (!ast_strlen_zero(jack_data->server_name)) {
 		jack_options |= JackServerName;
-		jack_data->client = jack_client_open(chan_name, jack_options, &status,
+		jack_data->client = jack_client_open(client_name, jack_options, &status,
 			jack_data->server_name);
 	} else {
-		jack_data->client = jack_client_open(chan_name, jack_options, &status);
+		jack_data->client = jack_client_open(client_name, jack_options, &status);
 	}
 
 	if (status)
@@ -610,12 +617,15 @@
 	OPT_INPUT_PORT =     (1 << 1),
 	OPT_OUTPUT_PORT =    (1 << 2),
 	OPT_NOSTART_SERVER = (1 << 3),
+	OPT_CLIENT_NAME =    (1 << 4),
 };
 
 enum {
 	OPT_ARG_SERVER_NAME,
 	OPT_ARG_INPUT_PORT,
 	OPT_ARG_OUTPUT_PORT,
+	OPT_ARG_CLIENT_NAME,
+
 	/* Must be the last element */
 	OPT_ARG_ARRAY_SIZE,
 };
@@ -625,6 +635,7 @@
 	AST_APP_OPTION_ARG('i', OPT_INPUT_PORT, OPT_ARG_INPUT_PORT),
 	AST_APP_OPTION_ARG('o', OPT_OUTPUT_PORT, OPT_ARG_OUTPUT_PORT),
 	AST_APP_OPTION('n', OPT_NOSTART_SERVER),
+	AST_APP_OPTION_ARG('c', OPT_CLIENT_NAME, OPT_ARG_CLIENT_NAME),
 END_OPTIONS );
 
 static struct jack_data *jack_data_alloc(void)
@@ -660,6 +671,15 @@
 			ast_string_field_set(jack_data, server_name, option_args[OPT_ARG_SERVER_NAME]);
 		else {
 			ast_log(LOG_ERROR, "A server name must be provided with the s() option\n");
+			return -1;
+		}
+	}
+
+	if (ast_test_flag(&options, OPT_CLIENT_NAME)) {
+		if (!ast_strlen_zero(option_args[OPT_ARG_CLIENT_NAME]))
+			ast_string_field_set(jack_data, client_name, option_args[OPT_ARG_CLIENT_NAME]);
+		else {
+			ast_log(LOG_ERROR, "A client name must be provided with the c() option\n");
 			return -1;
 		}
 	}

Modified: team/file/audiohook-chains/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/file/audiohook-chains/apps/app_meetme.c?view=diff&rev=114670&r1=114669&r2=114670
==============================================================================
--- team/file/audiohook-chains/apps/app_meetme.c (original)
+++ team/file/audiohook-chains/apps/app_meetme.c Fri Apr 25 15:53:06 2008
@@ -2706,35 +2706,56 @@
 		char useropts[32] = "";
 		char adminopts[32] = "";
 		struct ast_tm tm, etm;
-		struct timeval starttime = { .tv_sec = 0 }, endtime = { .tv_sec = 0 };
+		struct timeval endtime = { .tv_sec = 0 };
 
 		if (rt_schedule) {
 			now = ast_tvnow();
 
-			if (fuzzystart)
-				now.tv_sec += fuzzystart;
-
 			ast_localtime(&now, &tm, NULL);
 			ast_strftime(currenttime, sizeof(currenttime), DATE_FORMAT, &tm);
 
-			if (earlyalert) {
+			ast_debug(1, "Looking for conference %s that starts after %s\n", confno, eatime);
+
+			var = ast_load_realtime("meetme", "confno",
+				confno, "starttime <= ", currenttime, "endtime >= ",
+				currenttime, NULL);
+
+			if (!var && fuzzystart) {
+				now = ast_tvnow();
+				now.tv_sec += fuzzystart;
+
+				ast_localtime(&now, &tm, NULL);
+				ast_strftime(currenttime, sizeof(currenttime), DATE_FORMAT, &tm);
+				var = ast_load_realtime("meetme", "confno",
+					confno, "starttime <= ", currenttime, "endtime >= ",
+					currenttime, NULL);
+			}
+
+			if (!var && earlyalert) {
+				now = ast_tvnow();

[... 5532 lines stripped ...]



More information about the asterisk-commits mailing list