Commit Graph

325 Commits

Author SHA1 Message Date
Matthew Jordan 901221ffae res/res_agi: Make Verbose message for 'stream file' match other playbacks
The Verbose message displayed when a file is played back via 'stream file'
was formatted differently than other playbacks:
* It didn't include the channel name
* It didn't include the channel language
It does, however, include the playback offset as well as any escape digits.
That information was kept; however, this patch updates the formatting to more
closely match the Verbose messages displayed when a file is played back by
'control stream file', Playback, ControlPlayback, or any other file playback
operation.
........

Merged revisions 429519 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12 22:54:02 +00:00
Malcolm Davenport 68d9872f58 ASTERISK-24323, fix bug in documentation of AGI STREAM FILE CONTROL
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-28 14:57:01 +00:00
Mark Michelson dcf1ad14da Add module support level to ast_module_info structure. Print it in CLI "module show" .
ASTERISK-23919 #close
Reported by Malcolm Davenport

Review: https://reviewboard.asterisk.org/r/3802



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-25 16:47:17 +00:00
Matthew Jordan a2c912e997 media formats: re-architect handling of media for performance improvements
In the old times media formats were represented using a bit field. This was
fast but had a few limitations.
 1. Asterisk was limited in how many formats it could handle.
 2. Formats, being a bit field, could not include any attribute information.
    A format was strictly its type, e.g., "this is ulaw".
This was changed in Asterisk 10 (see
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal for
notes on that work) which led to the creation of the ast_format structure.
This structure allowed Asterisk to handle attributes and bundle information
with a format.

Additionally, ast_format_cap was created to act as a container for multiple
formats that, together, formed the capability of some entity. Another
mechanism was added to allow logic to be registered which performed format
attribute negotiation. Everywhere throughout the codebase Asterisk was
changed to use this strategy.

Unfortunately, in software, there is no free lunch. These new capabilities
came at a cost.

Performance analysis and profiling showed that we spend an inordinate
amount of time comparing, copying, and generally manipulating formats and
their related structures. Basic prototyping has shown that a reasonably
large performance improvement could be made in this area. This patch is the
result of that project, which overhauled the media format architecture
and its usage in Asterisk to improve performance.

Generally, the new philosophy for handling formats is as follows:
 * The ast_format structure is reference counted. This removed a large amount
   of the memory allocations and copying that was done in prior versions.
 * In order to prevent race conditions while keeping things performant, the
   ast_format structure is immutable by convention and lock-free. Violate this
   tenet at your peril!
 * Because formats are reference counted, codecs are also reference counted.
   The Asterisk core generally provides built-in codecs and caches the
   ast_format structures created to represent them. Generally, to prevent
   inordinate amounts of module reference bumping, codecs and formats can be
   added at run-time but cannot be removed.
 * All compatibility with the bit field representation of codecs/formats has
   been moved to a compatibility API. The primary user of this representation
   is chan_iax2, which must continue to maintain its bit-field usage of formats
   for interoperability concerns.
 * When a format is negotiated with attributes, or when a format cannot be
   represented by one of the cached formats, a new format object is created or
   cloned from an existing format. That format may have the same codec
   underlying it, but is a different format than a version of the format with
   different attributes or without attributes.
 * While formats are reference counted objects, the reference count maintained
   on the format should be manipulated with care. Formats are generally cached
   and will persist for the lifetime of Asterisk and do not explicitly need
   to have their lifetime modified. An exception to this is when the user of a
   format does not know where the format came from *and* the user may outlive
   the provider of the format. This occurs, for example, when a format is read
   from a channel: the channel may have a format with attributes (hence,
   non-cached) and the user of the format may last longer than the channel (if
   the reference to the channel is released prior to the format's reference).

For more information on this work, see the API design notes:
  https://wiki.asterisk.org/wiki/display/AST/Media+Format+Rewrite

Finally, this work was the culmination of a large number of developer's
efforts. Extra thanks goes to Corey Farrell, who took on a large amount of the
work in the Asterisk core, chan_sip, and was an invaluable resource in peer
reviews throughout this project.

There were a substantial number of patches contributed during this work; the
following issues/patch names simply reflect some of the work (and will cause
the release scripts to give attribution to the individuals who work on them).

Reviews:
 https://reviewboard.asterisk.org/r/3814
 https://reviewboard.asterisk.org/r/3808
 https://reviewboard.asterisk.org/r/3805
 https://reviewboard.asterisk.org/r/3803
 https://reviewboard.asterisk.org/r/3801
 https://reviewboard.asterisk.org/r/3798
 https://reviewboard.asterisk.org/r/3800
 https://reviewboard.asterisk.org/r/3794
 https://reviewboard.asterisk.org/r/3793
 https://reviewboard.asterisk.org/r/3792
 https://reviewboard.asterisk.org/r/3791
 https://reviewboard.asterisk.org/r/3790
 https://reviewboard.asterisk.org/r/3789
 https://reviewboard.asterisk.org/r/3788
 https://reviewboard.asterisk.org/r/3787
 https://reviewboard.asterisk.org/r/3786
 https://reviewboard.asterisk.org/r/3784
 https://reviewboard.asterisk.org/r/3783
 https://reviewboard.asterisk.org/r/3778
 https://reviewboard.asterisk.org/r/3774
 https://reviewboard.asterisk.org/r/3775
 https://reviewboard.asterisk.org/r/3772
 https://reviewboard.asterisk.org/r/3761
 https://reviewboard.asterisk.org/r/3754
 https://reviewboard.asterisk.org/r/3753
 https://reviewboard.asterisk.org/r/3751
 https://reviewboard.asterisk.org/r/3750
 https://reviewboard.asterisk.org/r/3748
 https://reviewboard.asterisk.org/r/3747
 https://reviewboard.asterisk.org/r/3746
 https://reviewboard.asterisk.org/r/3742
 https://reviewboard.asterisk.org/r/3740
 https://reviewboard.asterisk.org/r/3739
 https://reviewboard.asterisk.org/r/3738
 https://reviewboard.asterisk.org/r/3737
 https://reviewboard.asterisk.org/r/3736
 https://reviewboard.asterisk.org/r/3734
 https://reviewboard.asterisk.org/r/3722
 https://reviewboard.asterisk.org/r/3713
 https://reviewboard.asterisk.org/r/3703
 https://reviewboard.asterisk.org/r/3689
 https://reviewboard.asterisk.org/r/3687
 https://reviewboard.asterisk.org/r/3674
 https://reviewboard.asterisk.org/r/3671
 https://reviewboard.asterisk.org/r/3667
 https://reviewboard.asterisk.org/r/3665
 https://reviewboard.asterisk.org/r/3625
 https://reviewboard.asterisk.org/r/3602
 https://reviewboard.asterisk.org/r/3519
 https://reviewboard.asterisk.org/r/3518
 https://reviewboard.asterisk.org/r/3516
 https://reviewboard.asterisk.org/r/3515
 https://reviewboard.asterisk.org/r/3512
 https://reviewboard.asterisk.org/r/3506
 https://reviewboard.asterisk.org/r/3413
 https://reviewboard.asterisk.org/r/3410
 https://reviewboard.asterisk.org/r/3387
 https://reviewboard.asterisk.org/r/3388
 https://reviewboard.asterisk.org/r/3389
 https://reviewboard.asterisk.org/r/3390
 https://reviewboard.asterisk.org/r/3321
 https://reviewboard.asterisk.org/r/3320
 https://reviewboard.asterisk.org/r/3319
 https://reviewboard.asterisk.org/r/3318
 https://reviewboard.asterisk.org/r/3266
 https://reviewboard.asterisk.org/r/3265
 https://reviewboard.asterisk.org/r/3234
 https://reviewboard.asterisk.org/r/3178

ASTERISK-23114 #close
Reported by: mjordan
  media_formats_translation_core.diff uploaded by kharwell (License 6464)
  rb3506.diff uploaded by mjordan (License 6283)
  media_format_app_file.diff uploaded by kharwell (License 6464) 
  misc-2.diff uploaded by file (License 5000)
  chan_mild-3.diff uploaded by file (License 5000) 
  chan_obscure.diff uploaded by file (License 5000) 
  jingle.diff uploaded by file (License 5000) 
  funcs.diff uploaded by file (License 5000) 
  formats.diff uploaded by file (License 5000) 
  core.diff uploaded by file (License 5000) 
  bridges.diff uploaded by file (License 5000) 
  mf-codecs-2.diff uploaded by file (License 5000) 
  mf-app_fax.diff uploaded by file (License 5000) 
  mf-apps-3.diff uploaded by file (License 5000) 
  media-formats-3.diff uploaded by file (License 5000) 

ASTERISK-23715
  rb3713.patch uploaded by coreyfarrell (License 5909)
  rb3689.patch uploaded by mjordan (License 6283)
  
ASTERISK-23957
  rb3722.patch uploaded by mjordan (License 6283) 
  mf-attributes-3.diff uploaded by file (License 5000) 

ASTERISK-23958
Tested by: jrose
  rb3822.patch uploaded by coreyfarrell (License 5909) 
  rb3800.patch uploaded by jrose (License 6182)
  chan_sip.diff uploaded by mjordan (License 6283) 
  rb3747.patch uploaded by jrose (License 6182)

ASTERISK-23959 #close
Tested by: sgriepentrog, mjordan, coreyfarrell
  sip_cleanup.diff uploaded by opticron (License 6273)
  chan_sip_caps.diff uploaded by mjordan (License 6283) 
  rb3751.patch uploaded by coreyfarrell (License 5909) 
  chan_sip-3.diff uploaded by file (License 5000) 

ASTERISK-23960 #close
Tested by: opticron
  direct_media.diff uploaded by opticron (License 6273) 
  pjsip-direct-media.diff uploaded by file (License 5000) 
  format_cap_remove.diff uploaded by opticron (License 6273) 
  media_format_fixes.diff uploaded by opticron (License 6273) 
  chan_pjsip-2.diff uploaded by file (License 5000) 

ASTERISK-23966 #close
Tested by: rmudgett
  rb3803.patch uploaded by rmudgetti (License 5621)
  chan_dahdi.diff uploaded by file (License 5000) 
  
ASTERISK-24064 #close
Tested by: coreyfarrell, mjordan, opticron, file, rmudgett, sgriepentrog, jrose
  rb3814.patch uploaded by rmudgett (License 5621) 
  moh_cleanup.diff uploaded by opticron (License 6273) 
  bridge_leak.diff uploaded by opticron (License 6273) 
  translate.diff uploaded by file (License 5000) 
  rb3795.patch uploaded by rmudgett (License 5621) 
  tls_fix.diff uploaded by mjordan (License 6283) 
  fax-mf-fix-2.diff uploaded by file (License 5000) 
  rtp_transfer_stuff uploaded by mjordan (License 6283) 
  rb3787.patch uploaded by rmudgett (License 5621) 
  media-formats-explicit-translate-format-3.diff uploaded by file (License 5000) 
  format_cache_case_fix.diff uploaded by opticron (License 6273) 
  rb3774.patch uploaded by rmudgett (License 5621) 
  rb3775.patch uploaded by rmudgett (License 5621) 
  rtp_engine_fix.diff uploaded by opticron (License 6273) 
  rtp_crash_fix.diff uploaded by opticron (License 6273) 
  rb3753.patch uploaded by mjordan (License 6283) 
  rb3750.patch uploaded by mjordan (License 6283) 
  rb3748.patch uploaded by rmudgett (License 5621) 
  media_format_fixes.diff uploaded by opticron (License 6273) 
  rb3740.patch uploaded by mjordan (License 6283) 
  rb3739.patch uploaded by mjordan (License 6283) 
  rb3734.patch uploaded by mjordan (License 6283) 
  rb3689.patch uploaded by mjordan (License 6283) 
  rb3674.patch uploaded by coreyfarrell (License 5909) 
  rb3671.patch uploaded by coreyfarrell (License 5909) 
  rb3667.patch uploaded by coreyfarrell (License 5909) 
  rb3665.patch uploaded by mjordan (License 6283) 
  rb3625.patch uploaded by coreyfarrell (License 5909) 
  rb3602.patch uploaded by coreyfarrell (License 5909) 
  format_compatibility-2.diff uploaded by file (License 5000) 
  core.diff uploaded by file (License 5000) 
  


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-20 22:06:33 +00:00
Matthew Jordan 97834718c2 Remove many deprecated modules
Billing records are fair,
To get paid is quite bright,
You should really use ODBC;
Good-bye cdr_sqlite.

Microsoft did once push H.323,
Hell, we all remember NetMeeting.
But try to compile chan_h323 now
And you will take quite a beating.

The XMPP and SIP war was fierce,
And in the distant fray
Was birthed res_jabber/chan_jingle;
But neither to stay.

For everyone did care and chase what Google professed.
"Free Internet Calling" was what devotees cried,
But Google did change the specs so often
That the developers were happy the day chan_gtalk died.

And then there was that odd application
Dedicated to the Polish tongue.
app_saycountpl was subsumed by Say;
One could say its bell was rung.

To read and parse a file from the dialplan
You could (I guess) use an application.
app_readfile did fill that purpose, but I think
A function is perhaps better in its creation.

Barging is rude, I'm not sure why we do it.
Inwardly, the caller will probably sigh.
But if you really must do it,
Don't use app_dahdibarge, use ChanSpy.

We all despise the sound of tinny robots
It makes our queues so cold.
To control such an abomination
It's better to not use Wait/SetMusicOnHold.

It's often nice to know properties of a channel
It makes our calls right
We have a nice function called CHANNEL
And so SIPCHANINFO is sent off into the night.

And now things get odd;
Apparently one could delimit with a colon
Properties from the SIPPEER function!
Commas are in; all others are done.

Finally, a word on pipes and commas.
We're sorry. We can't say it enough.
But those compatibility options in asterisk.conf;
To maintain them forever was just too tough.

This patch removes:

* cdr_sqlite
* chan_gtalk
* chan_jingle
* chan_h323
* res_jabber
* app_saycountpl
* app_readfile
* app_dahdibarge

It removes the following applications/functions:

* WaitMusicOnHold
* SetMusicOnHold
* SIPCHANINFO

It removes the colon delimiter from the SIPPEER function.

Finally, it also removes all compatibility options that were configurable from
asterisk.conf, as these all applied to compatibility with Asterisk 1.4 systems.

Review: https://reviewboard.asterisk.org/r/3698/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-04 13:26:37 +00:00
Matthew Jordan 9cc1a8e893 stasis: Reduce creation of channel snapshots to improve performance
During some performance testing of Asterisk with AGI, ARI, and lots of Local
channels, we noticed that there's quite a hit in performance during channel
creation and releasing to the dialplan (ARI continue). After investigating
the performance spike that occurs during channel creation, we discovered
that we create a lot of channel snapshots that are technically unnecessary.
This includes creating snapshots during:
 * AGI execution
 * Returning objects for ARI commands
 * During some Local channel operations
 * During some dialling operations
 * During variable setting
 * During some bridging operations
And more.

This patch does the following:
 - It removes a number of fields from channel snapshots. These fields were
   rarely used, were expensive to have on the snapshot, and hurt performance.
   This included formats, translation paths, Log Call ID, callgroup, pickup
   group, and all channel variables. As a result, AMI Status,
   "core show channel", "core show channelvar", and "pjsip show channel" were
   modified to either hit the live channel or not show certain pieces of data.
   While this is unfortunate, the performance gain from this patch is worth
   the loss in behaviour.
 - It adds a mechanism to publish a cached snapshot + blob. A large number of
   publications were changed to use this, including:
   - During Dial begin
   - During Variable assignment (if no AMI variables are emitted - if AMI
     variables are set, we have to make snapshots when a variable is changed)
   - During channel pickup
   - When a channel is put on hold/unhold
   - When a DTMF digit is begun/ended
   - When creating a bridge snapshot
   - When an AOC event is raised
   - During Local channel optimization/Local bridging
   - When endpoint snapshots are generated
   - All AGI events
   - All ARI responses that return a channel
   - Events in the AgentPool, MeetMe, and some in Queue
 - Additionally, some extraneous channel snapshots were being made that were
   unnecessary. These were removed.
 - The result of ast_hashtab_hash_string is now cached in stasis_cache. This
   reduces a large number of calls to ast_hashtab_hash_string, which reduced
   the amount of time spent in this function in gprof by around 50%.

#ASTERISK-23811 #close
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/3568/
........

Merged revisions 416211 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-13 18:24:49 +00:00
Kinsey Moore abd3e4040b Allow Asterisk to compile under GCC 4.10
This resolves a large number of compiler warnings from GCC 4.10 which
cause the build to fail under dev mode. The vast majority are
signed/unsigned mismatches in printf-style format strings.
........

Merged revisions 413586 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413587 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 413588 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09 22:49:26 +00:00
Kevin Harwell 28c0cb28d0 channel locking: Add locking for channel snapshot creation
Original commit message by mmichelson (asterisk 12 r403311):

"This adds channel locks around calls to create channel snapshots as well
as other functions which operate on a channel and then end up
creating a channel snapshot. Functions that expect the channel to be
locked prior to being called have had their documentation updated to
indicate such."

The above was initially committed and then reverted at r403398.  The problem
was found to be in core_local.c in the publish_local_bridge_message function.
The ast_unreal_lock_all function locks and adds a reference to the returned
channels and while they were being unlocked they were not being unreffed when
no longer needed.  Fixed by unreffing the channels.

Also in bridge.c a lock was obtained on "other->chan", but then an attempt was
made to unlock "other" and not the previously locked channel.  Fixed by
unlocking "other->chan"

(closes issue ASTERISK-22709)
Reported by: John Bigelow
........

Merged revisions 404237 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-18 20:33:37 +00:00
David M. Lee 1212906351 Reverting r403311. It's causing ARI tests to hang.
........

Merged revisions 403398 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-05 22:10:20 +00:00
Mark Michelson 8e8b329e14 Add channel locking for channel snapshot creation.
This adds channel locks around calls to create channel snapshots as well
as other functions which operate on a channel and then end up
creating a channel snapshot. Functions that expect the channel to be
locked prior to being called have had their documentation updated to
indicate such.
........

Merged revisions 403311 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-03 17:07:29 +00:00
Richard Mudgett 8eec8fbf83 Make app_queue and res_agi independent of AMI being enabled.
The https://reviewboard.asterisk.org/r/2888/ review changes manager to not
subscribe to stasis when it is disabled for performance reasons.  When
manager is disabled app_queue and res_agi decline to load and fail to
clean up what they have already allocated.

* Made app_queue and res_agi clean up allocated resources when they
decline to load.

* Made app_queue and res_agi use their own subscriptions to the stasis
topics instead of borrowing manager's message router structure
inappropriately.

(closes issue ASTERISK-22604)
Reported by: rmudgett

Review: https://reviewboard.asterisk.org/r/2902/
........

Merged revisions 400671 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-08 15:12:46 +00:00
Mark Michelson ee21eee7e0 Cache string values of formats on ast_format_cap() to save processing.
Channel snapshots have string representations of the channel's native formats.
Prior to this change, the format strings were re-created on ever channel snapshot
creation. Since channel native formats rarely change, this was very wasteful.
Now, string representations of formats may optionally be stored on the ast_format_cap
for cases where string representations may be requested frequently. When formats
are altered, the string cache is marked as invalid. When strings are requested, the
cache validity is checked. If the cache is valid, then the cached strings are copied.
If the cache is invalid, then the string cache is rebuilt and copied, and the cache
is marked as being valid again.

Review: https://reviewboard.asterisk.org/r/2879
........

Merged revisions 400356 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-03 14:58:16 +00:00
David M. Lee 2de42c2a25 Multiple revisions 399887,400138,400178,400180-400181
........
  r399887 | dlee | 2013-09-26 10:41:47 -0500 (Thu, 26 Sep 2013) | 1 line
  
  Minor performance bump by not allocate manager variable struct if we don't need it
........
  r400138 | dlee | 2013-09-30 10:24:00 -0500 (Mon, 30 Sep 2013) | 23 lines
  
  Stasis performance improvements
  
  This patch addresses several performance problems that were found in
  the initial performance testing of Asterisk 12.
  
  The Stasis dispatch object was allocated as an AO2 object, even though
  it has a very confined lifecycle. This was replaced with a straight
  ast_malloc().
  
  The Stasis message router was spending an inordinate amount of time
  searching hash tables. In this case, most of our routers had 6 or
  fewer routes in them to begin with. This was replaced with an array
  that's searched linearly for the route.
  
  We more heavily rely on AO2 objects in Asterisk 12, and the memset()
  in ao2_ref() actually became noticeable on the profile. This was
  #ifdef'ed to only run when AO2_DEBUG was enabled.
  
  After being misled by an erroneous comment in taskprocessor.c during
  profiling, the wrong comment was removed.
  
  Review: https://reviewboard.asterisk.org/r/2873/
........
  r400178 | dlee | 2013-09-30 13:26:27 -0500 (Mon, 30 Sep 2013) | 24 lines
  
  Taskprocessor optimization; switch Stasis to use taskprocessors
  
  This patch optimizes taskprocessor to use a semaphore for signaling,
  which the OS can do a better job at managing contention and waiting
  that we can with a mutex and condition.
  
  The taskprocessor execution was also slightly optimized to reduce the
  number of locks taken.
  
  The only observable difference in the taskprocessor implementation is
  that when the final reference to the taskprocessor goes away, it will
  execute all tasks to completion instead of discarding the unexecuted
  tasks.
  
  For systems where unnamed semaphores are not supported, a really
  simple semaphore implementation is provided. (Which gives identical
  performance as the original taskprocessor implementation).
  
  The way we ended up implementing Stasis caused the threadpool to be a
  burden instead of a boost to performance. This was switched to just
  use taskprocessors directly for subscriptions.
  
  Review: https://reviewboard.asterisk.org/r/2881/
........
  r400180 | dlee | 2013-09-30 13:39:34 -0500 (Mon, 30 Sep 2013) | 28 lines
  
  Optimize how Stasis forwards are dispatched
  
  This patch optimizes how forwards are dispatched in Stasis.
  
  Originally, forwards were dispatched as subscriptions that are invoked
  on the publishing thread. This did not account for the vast number of
  forwards we would end up having in the system, and the amount of work it
  would take to walk though the forward subscriptions.
  
  This patch modifies Stasis so that rather than walking the tree of
  forwards on every dispatch, when forwards and subscriptions are changed,
  the subscriber list for every topic in the tree is changed.
  
  This has a couple of benefits. First, this reduces the workload of
  dispatching messages. It also reduces contention when dispatching to
  different topics that happen to forward to the same aggregation topic
  (as happens with all of the channel, bridge and endpoint topics).
  
  Since forwards are no longer subscriptions, the bulk of this patch is
  simply changing stasis_subscription objects to stasis_forward objects
  (which, admittedly, I should have done in the first place.)
  
  Since this required me to yet again put in a growing array, I finally
  abstracted that out into a set of ast_vector macros in
  asterisk/vector.h.
  
  Review: https://reviewboard.asterisk.org/r/2883/
........
  r400181 | dlee | 2013-09-30 13:48:57 -0500 (Mon, 30 Sep 2013) | 28 lines
  
  Remove dispatch object allocation from Stasis publishing
  
  While looking for areas for performance improvement, I realized that an
  unused feature in Stasis was negatively impacting performance.
  
  When a message is sent to a subscriber, a dispatch object is allocated
  for the dispatch, containing the topic the message was published to, the
  subscriber the message is being sent to, and the message itself.
  
  The topic is actually unused by any subscriber in Asterisk today. And
  the subscriber is associated with the taskprocessor the message is being
  dispatched to.
  
  First, this patch removes the unused topic parameter from Stasis
  subscription callbacks.
  
  Second, this patch introduces the concept of taskprocessor local data,
  data that may be set on a taskprocessor and provided along with the data
  pointer when a task is pushed using the ast_taskprocessor_push_local()
  call. This allows the task to have both data specific to that
  taskprocessor, in addition to data specific to that invocation.
  
  With those two changes, the dispatch object can be removed completely,
  and the message is simply refcounted and sent directly to the
  taskprocessor.
  
  Review: https://reviewboard.asterisk.org/r/2884/
........

Merged revisions 399887,400138,400178,400180-400181 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-30 18:55:27 +00:00
Kevin Harwell af1747ee6c Memory leak fix
ast_xmldoc_printable returns an allocated block that must be freed by the
caller.  Fixed manager.c and res_agi.c to stop leaking these results.

(closes issue ASTERISK-22395)
Reported by: Corey Farrell
Patches:
     manager-leaks-12.patch uploaded by coreyfarrell (license 5909)
     res_agi-xmldoc-leaks.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 398060 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 398061 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398062 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 17:59:06 +00:00
Kinsey Moore 7b032c1adb Add SayAlphaCase and similar functionality for AGI
This adds a new dialplan application, SayAlphaCase, that performs much
the same function as SayAlpha except that it takes additional options
which allow the user to specify whether the case of each letter should
be announced for uppercase, lowercase, or all letters. Similar
functionality has been added to the SAY ALPHA AGI command via an
optional parameter.

Original Patch by: Kevin Scott Adams
Reported by: Kevin Scott Adams
Review: https://reviewboard.asterisk.org/r/2725/
(closes issue ASTERISK-20782)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-22 22:33:48 +00:00
Kinsey Moore 03090a88ba Fix documentation replication issues
This prevents XML documentation duplication by expanding channel and
bridge snapshot tags into channel and bridge snapshot parameter sets
with a given prefix or defaulting to no prefix. This also prevents
documentation from becoming fractured and out of date by keeping all
variations of the documentation in template form such that it only
needs to be updated once and keeps maintenance to a minimum.

Review: https://reviewboard.asterisk.org/r/2708/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01 17:07:52 +00:00
David M. Lee e1b959ccbb Split caching out from the stasis_caching_topic.
In working with res_stasis, I discovered a significant limitation to
the current structure of stasis_caching_topics: you cannot subscribe
to cache updates for a single channel/bridge/endpoint/etc.

To address this, this patch splits the cache away from the
stasis_caching_topic, making it a first class object. The stasis_cache
object is shared amongst individual stasis_caching_topics that are
created per channel/endpoint/etc. These are still forwarded to global
whatever_all_cached topics, so their use from most of the code does
not change.

In making these changes, I noticed that we frequently used a similar
pattern for bridges, endpoints and channels:

     single_topic  ---------------->  all_topic
           ^
           |
     single_topic_cached  ----+---->  all_topic_cached
                              |
                              +---->  cache

This pattern was extracted as the 'Stasis Caching Pattern', defined in
stasis_caching_pattern.h. This avoids a lot of duplicate code between
the different domain objects.

Since the cache is now disassociated from its upstream caching topics,
this also necessitated a change to how the 'guaranteed' flag worked
for retrieving from a cache. The code for handling the caching
guarantee was extracted into a 'stasis_topic_wait' function, which
works for any stasis_topic.

(closes issue ASTERISK-22002)
Review: https://reviewboard.asterisk.org/r/2672/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01 13:49:34 +00:00
Matthew Jordan 9ea74182ef Update CONTROL STREAM FILE to accept an 'offsetms' parameter
This patch allows starting playback of audio through the CONTROL STREAM FILE
AGI command to start at a particular offset. It will also return the final
position of the file in the 'endpos' attribute.

(closes issue ASTERISK-17803)
Reported by: Murray Melvin
patches:
  res_agi.c.r316293.diff uploaded by murraytm (license 6221)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-31 23:48:35 +00:00
Michael L. Young 6d9909887e Properly indicate failure to open an audio stream in res_agi
If there is an error streaming an audio file, the current return status makes it
difficult for an AGI script to determine that there was an error with the audio
file.

This patches changes the result to return -1 and the function returns
RESULT_FAILURE instead of RESULT_SUCCESS.  From looking at other parts of
res_agi, this would appear to be the proper way to handle an error.

(closes issue ASTERISK-21903)
Reported by: Ariel Wainer
Tested by: Ariel Wainer
Patches:
	asterisk-21903-return-stream-res_1.8.diff
					by Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/2625/
........

Merged revisions 394640 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 394641 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-18 12:54:50 +00:00
Joshua Colp 7c044acbd9 Refactor operations to access the stasis cache instead of objects directly when retrieving information.
(closes issue ASTERISK-21883)

Review: https://reviewboard.asterisk.org/r/2645/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-08 19:19:55 +00:00
Kinsey Moore 909ee4bfb9 Refactor extraneous channel events
This change removes JitterBufStats, ChannelReload, and ChannelUpdate
and refactors the following events to travel over Stasis-Core:
* LocalBridge
* DAHDIChannel
* AlarmClear
* SpanAlarmClear
* Alarm
* SpanAlarm
* DNDState
* MCID
* SIPQualifyPeerDone
* SessionTimeout

Review: https://reviewboard.asterisk.org/r/2627/
(closes issue ASTERISK-21476)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-01 13:16:09 +00:00
Matthew Jordan 6258bbe7bd Update Asterisk's CDRs for the new bridging framework
This patch is the initial push to update Asterisk's CDR engine for the new
bridging framework. This patch guts the existing CDR engine and builds the new
on top of messages coming across Stasis. As changes in channel state and bridge
state are detected, CDRs are built and dispatched accordingly. This
fundamentally changes CDRs in a few ways.
(1) CDRs are now *very* reflective of the actual state of channels and bridges.
    This means CDRs track well with what an actual channel is doing - which
    is useful in transfer scenarios (which were previously difficult to pin
    down). It does, however, mean that CDRs cannot be 'fooled'. Previous
    behavior in Asterisk allowed for CDR applications, channels, and other
    properties to be spoofed in parts of the code - this no longer works.
(2) CDRs have defined behavior in multi-party scenarios. This behavior will not
    be what everyone wants, but it is a defined behavior and as such, it is
    predictable.
(3) The CDR manipulation functions and applications have been overhauled. Major
    changes have been made to ResetCDR and ForkCDR in particular. Many of the
    options for these two applications no longer made any sense with the new
    framework and the (slightly) more immutable nature of CDRs.

There are a plethora of other changes. For a full description of CDR behavior,
see the CDR specification on the Asterisk wiki.

(closes issue ASTERISK-21196)

Review: https://reviewboard.asterisk.org/r/2486/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17 03:00:38 +00:00
Kinsey Moore 8cb0c33e48 Add AGI command arguments to AsyncAGI event
This makes the AGI AsyncAGI event put provided AGI command arguments in
the event's environment.

(closes issue ASTERISK-21304)
Patch-By: Dirk Wendland


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10 16:03:51 +00:00
Kinsey Moore e36c6f714f Fix documentation generation
Regression from r390701


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 20:37:48 +00:00
Jason Parker 0613100e63 Split AGI manager events, to remove SubEvent field.
This moves them to stasis, in the process.

(closes issue ASTERISK-21470)
Review: https://reviewboard.asterisk.org/r/2587/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 19:51:12 +00:00
Michael L. Young e9bcf9826a Fix FastAGI To Properly Check For A Connection
When IPv6 support was added to FastAGI, the intent was to have the ability to
check all addresses resolved for a host since we might receive an IPv4 address
and an IPv6 address.  The problem with the current code, is that, since we are
doing O_NONBLOCK, we get EINPROGRESS when calling ast_connect() but are ignoring
this instead of handling it.  We break out of the loop and continue on.  When we
later call ast_poll(), it succeeds but we never check if we have a connection or
not on the socket level.  We then attempt to send data to the host address that
we think is setup and it fails.  We then check the errno and see that we have
"connection refused" and then return with agi failed.

This patch does the following:

* Handles EINPROGRESS by creating the function handle_connection()
  - ast_poll() was moved into this function
  - This function checks the results of the connection on the socket level after
    calling ast_poll()
* Continues to the next address if the above fails to create a connection
* Once all addresses resolved are tried and we still are unable to establish a
  connection, then we return that the FastAGI call failed

(closes issue ASTERISK-21065)
Reported by: Jeremy Kister
Tested by: Jeremy Kister, Michael L. Young
Patches:
  asterisk-21065_poll_correctly_v4.diff Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/2330/
........

Merged revisions 381893 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-22 19:40:02 +00:00
Matthew Jordan 7d9871b394 Add ControlPlayback manager action
This patch adds the capability for asynchronous manipulation of audio being
played back to a channel though a new AMI action "ControlPlayback". The
ControlPlayback action supports a number of operations, the availability of
which depend on the application being used to send audio to the channel.
When the audio playback was initiated using the ControlPlayback application
or CONTROL STREAM FILE AGI command, the audio can be paused, stopped,
restarted, reversed, or skipped forward. When initiated by other mechanisms
(such as the Playback application), the audio can be stopped, reversed, or
skipped forward.

Review: https://reviewboard.asterisk.org/r/2265/

(closes issue ASTERISK-20882)
Reported by: mjordan



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-22 15:16:20 +00:00
David M. Lee c5acf22cec Fix DBDelTree error codes for AMI, CLI and AGI
The AMI DBDelTree command will return Success/Key tree deleted successfully even
if the given key does not exist. The CLI command 'database deltree' had a
similar problem, but was saved because it actually responded with '0 database
entries removed'. AGI had a slightly different error, where it would return
success if the database was unavailable.

This came from confusion about the ast_db_deltree retval, which is -1 in the
event of a database error, or number of entries deleted (including 0 for
deleting nothing).

* Changed some poorly named res variables to num_deleted
* Specified specific errors when calling ast_db_deltree (database unavailable
  vs. entry not found vs. success)
* Fixed similar bug in AGI database deltree, where 'Database unavailable'
  results in successful result

(closes issue AST-967)
Reported by: John Bigelow
Review: https://reviewboard.asterisk.org/r/2138/
........

Merged revisions 374426 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374427 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 374428 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-04 15:48:24 +00:00
Richard Mudgett 1f9d7090df Include channel uniqueid in "AsyncAGI" and "AGIExec" events.
* Added AMI event documentation for AsyncAGI and AGIExec events.

(closes issue ASTERISK-20318)
Reported by: Dan Cropp
Patches:
      res_agi_patch.txt (license #6422) patch uploaded by Dan Cropp
      modified for trunk.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-28 22:11:19 +00:00
Joshua Colp b6a00a1d97 Update documentation to make it explicit that "stream file" will not restart musiconhold.
(issue ASTERISK-17367)
Reported by: oej
........

Merged revisions 373989 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373990 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 373991 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-28 12:17:41 +00:00
Jonathan Rose 39b78f6250 res_agi: async_agi responsiveness improvement on datastore problems
This patch changes get_agi_cmd so that the return can be checked
to differentiate between an empty list success and something that
triggered an error. This in turn allows launch_asyncagi to detect
these errors and break free from the command processing loop so
that the async agi can be ended more cleanly

(closes issue ASTERISK-20109)
Reported by: Jeremiah Gowdy
Patches: jgowdy-7-9-2012.diff uploaded by Jeremiah Gowdy (license 6358)
           (Modified by me to fix some logical issues and apply to trunk)
Review: https://reviewboard.asterisk.org/r/2117/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 14:53:42 +00:00
Kinsey Moore 9b16c8b0f6 Clean up and ensure proper usage of alloca()
This replaces all calls to alloca() with ast_alloca() which calls gcc's
__builtin_alloca() to avoid BSD semantics and removes all NULL checks
on memory allocated via ast_alloca() and ast_strdupa().

(closes issue ASTERISK-20125)
Review: https://reviewboard.asterisk.org/r/2032/
Patch-by: Walter Doekes (wdoekes)
........

Merged revisions 370642 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 370643 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31 20:21:43 +00:00
Jonathan Rose 79de3f7fe8 res_agi: Add message indicating need for \n character in verbose message
The while loop responsible for reading AGI messages from a fastAGI service
can end up looping indefinitely when an AGI script fails to indicate the end
of a message with a \n character. This patch adds an indication that we are
expecting a \n character to end the message to make it more clear to users
that this is necessary if they are receiving this warning over and over.

(issue ASTERISK-20061)
Reported by: Eike Kuiper
........

Merged revisions 370494 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 370495 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-25 21:22:34 +00:00
Matthew Jordan 016dfa01f1 Fix places in resources where a negative return value could impact execution
This patch addresses a number of modules in resources that did not handle the
negative return value from function calls adequately.  This includes:

* res_agi.c: if the result of the read function is a negative number,
indicating some failure, the result would instead be treated as the number
of bytes read.  This patch now treats negative results in the same manner
as an end of file condition, with the exception that it also logs the
error code indicated by the return.

* res_musiconhold.c: if spawn_mp3 fails to assign a file descriptor to srcfd,
and instead assigns a negative value, that file descriptor could later be
passed to functions that require a valid file descriptor.  If spawn_mp3 fails,
we now immediately retry instead of continuing in the logic.

* res_rtp_asterisk.c: if no codec can be matched between two RTP instances
in a peer to peer bridge, we immediately return instead of attempting to
use the codec payload type as an index to determine the appropriate negotiated
codec.

(issue ASTERISK-19655)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/1863/
........

Merged revisions 362362 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 362364 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-17 21:14:49 +00:00
Terry Wilson 786f5898d1 Finalize ast_channel opaquification
Review: https://reviewboard.asterisk.org/r/1786/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13 18:20:34 +00:00
Sean Bright 62aae50142 Add IPv6 support to FastAGI.
Review: https://reviewboard.asterisk.org/r/1774/
Reviewed by: Simon Perreault, Mark Michelson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29 20:31:48 +00:00
Terry Wilson a9d607a357 Opaquify ast_channel structs and lists
Review: https://reviewboard.asterisk.org/r/1773/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29 16:52:47 +00:00
Terry Wilson ebaf59a656 Opaquification for ast_format structs in struct ast_channel
Review: https://reviewboard.asterisk.org/r/1770/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24 00:32:20 +00:00
Terry Wilson 57f42bd74f ast_channel opaquification of pointers and integral types
Review: https://reviewboard.asterisk.org/r/1753/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20 23:43:27 +00:00
Russell Bryant 33322e38f0 res_agi: Add AGIEXITONHANGUP variable.
This patch adds a variable AGIEXITONHANGUP for res_agi.  If this variable is
set to "yes" on a channel, AGI() will exit immediately once a channel hangup
has been detected.  This was the behavior of AGI() in Asterisk 1.4 and earlier
and is still desired by some people.

Review: https://reviewboard.asterisk.org/r/1734/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 00:43:50 +00:00
Terry Wilson 34c55e8e7c Opaquify char * and char[] in ast_channel
Review: https://reviewboard.asterisk.org/r/1733/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13 17:27:06 +00:00
Terry Wilson 99cae5b750 Opaquify channel stringfields
Continue channel opaque-ification by wrapping all of the stringfields.
Eventually, we will restrict what can actually set these variables, but
the purpose for now is to hide the implementation and keep people from
adding code that directly accesses the channel structure. Semantic
changes will follow afterward.

Review: https://reviewboard.asterisk.org/r/1661/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24 20:12:09 +00:00
Terry Wilson 04da92c379 Replace direct access to channel name with accessor functions
There are many benefits to making the ast_channel an opaque handle, from
increasing maintainability to presenting ways to kill masquerades. This patch
kicks things off by taking things a field at a time, renaming the field to
'__do_not_use_${fieldname}' and then writing setters/getters and converting the
existing code to using them. When all fields are done, we can move ast_channel
to a C file from channel.h and lop off the '__do_not_use_'.

This patch sets up main/channel_interal_api.c to be the only file that actually
accesses the ast_channel's fields directly. The intent would be for any API
functions in channel.c to use the accessor functions. No more monkeying around
with channel internals. We should use our own APIs.

The interesting changes in this patch are the addition of
channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to
channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to
use accessor functions when ast_channel is really opaque), and some re-working
of the way channel iterators/callbacks are handled so as to avoid creating fake
ast_channels on the stack to pass in matching data by directly accessing fields
(since "name" is a stringfield and the fake channel doesn't init the
stringfields, you can't use the ast_channel_name_set() function). I went with
ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a
setter.

The majority of the grunt-work for this change was done by writing a semantic
patch using Coccinelle ( http://coccinelle.lip6.fr/ ).

Review: https://reviewboard.asterisk.org/r/1655/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09 22:15:50 +00:00
Richard Mudgett a86037d959 Make FastAGI HANGUP show up in AGI debug output.
* Change from using send() to ast_agi_send() so the HANGUP shows up in the
AGI debug output.

(closes issue ASTERISK-18723)
Reported by: James Van Vleet
Patches:
      jira_asterisk_18723_v1.8.patch (license #5621) patch uploaded by rmudgett
........

Merged revisions 345431 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 345432 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-15 20:11:06 +00:00
Richard Mudgett b961d57c4c Fix AGI exec Park to honor the Park application parameters.
The fix for ASTERISK-12715 and ASTERISK-12685 added a check for the Park
application because the channel needed to be masqueraded to prevent a
crash.  Since the Park application now always masquerades the channel into
the parking lot, the special check is no longer needed.  The fix also
resulted in AGI exec Park attempting to double park the call and not honor
the Park application parameters.

* Removed no longer necessary call to ast_masq_park_call() by AGI exec for
the Park application.  (Reverts -r146923)

* Fix Park application to only return 0 or -1.  The AGI exec Park was
causing broken pipe error messages because the Park application returned 1
on successful park.

(closes issue ASTERISK-18737)
........

Merged revisions 341717 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 341718 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-20 22:03:35 +00:00
Matthew Nicholson bb07ca66a1 Merged revisions 340109 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r340109 | mnicholson | 2011-10-10 09:15:41 -0500 (Mon, 10 Oct 2011) | 18 lines
  
  Merged revisions 340108 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r340108 | mnicholson | 2011-10-10 09:14:48 -0500 (Mon, 10 Oct 2011) | 11 lines
    
    Load the proper XML documentation when multiple modules document the same application.
    
    This patch adds an optional "module" attribute to the XML documentation spec
    that allows the documentation processor to match apps with identical names from
    different modules to their documentation. This patch also fixes a number of
    bugs with the documentation processor and should make it a little more
    efficient. Support for multiple languages has also been properly implemented.
    
    ASTERISK-18130
    Review: https://reviewboard.asterisk.org/r/1485/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-10 14:16:27 +00:00
Olle Johansson c04ab6b35c Just formatting.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-29 09:32:34 +00:00
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:28:54 +00:00
Leif Madsen e42402ba2c Merged revisions 323154 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r323154 | lmadsen | 2011-06-13 15:00:41 -0400 (Mon, 13 Jun 2011) | 6 lines
  
  Tweak documentation for AGI Hangup command.
  
  (closes issue ASTERISK-17999)
  Reported by: Ben Klang
  Patches:
       hangup-doc.diff - uploaded by Ben Klang (License #5876)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-13 19:03:46 +00:00
Richard Mudgett 5da4161283 Merged revisions 321436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321436 | rmudgett | 2011-05-27 19:27:52 -0500 (Fri, 27 May 2011) | 4 lines
  
  Some hagi launch cleanup.
  
  Inspired by issue 19256.  This patch would also fix the crash.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-28 00:29:48 +00:00