Commit Graph

325 Commits

Author SHA1 Message Date
Russell Bryant 37aa52fd78 Merged revisions 316265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines
  
  Fix a bunch of compiler warnings generated by gcc 4.6.0.
  
  Most of these are -Wunused-but-set-variable, but there were a few others
  mixed in here, as well.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 20:45:32 +00:00
Russell Bryant 4881d65481 Merged revisions 314780 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r314780 | russell | 2011-04-22 09:02:23 -0500 (Fri, 22 Apr 2011) | 18 lines
  
  Merged revisions 314778 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r314778 | russell | 2011-04-22 08:58:03 -0500 (Fri, 22 Apr 2011) | 11 lines
    
    Initialize buffers in getvar and getvarfull.
    
    Initialize the buffers used to hold the result from GET VARIABLE or
    GET VARIABLE FULL.  The bug report shows func_read returning garbage in
    the result.  It assumed that the buffer passed in was initialized, like many
    other functions do.  In the more common code path (through the dialplan), it
    is initialized, so just initialize it here too.
    
    (closes issue #19050)
    Reported by: johnz
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-22 14:08:02 +00:00
Richard Mudgett 0a5c2d8391 Merged revisions 314069 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r314069 | rmudgett | 2011-04-18 11:10:10 -0500 (Mon, 18 Apr 2011) | 22 lines
  
  The AsyncAGI command loop is lax in the value it returns for the return status.
  
  * Return correct status: SUCCESS/FAILED/HANGUP.  Previously, abnormal
  exits from the command loop such as hangup would return SUCCESS.
  
  * The "asyncagi break" command now returns SUCCESS and is now the only way
  to break the command loop with that status.  Previously, it returned
  FAILED.
  
  * The AMI event AsyncAGI End is no longer sent if the AsyncAGI Start event
  is not sent.  Previously, this happened because of an error setting up the
  AGI pipes.
  
  * All executed AGI commands now get an AsyncAGI Exec result event.
  Previously, if the command returned failure (because of hangup), the
  command loop just exited with FAILURE and did not send the AsyncAGI Exec
  result event.
  
  * Makes sure that the channel frame queue is empty on hangup.
  
  Review: https://reviewboard.asterisk.org/r/1183/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-18 16:27:14 +00:00
Richard Mudgett b26a16dbcf Merged revisions 313700 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r313700 | rmudgett | 2011-04-13 17:52:47 -0500 (Wed, 13 Apr 2011) | 5 lines
  
  Revert flushing stale AsyncAGI commands from -r313615.
  
  It looks like it was intentional to leave any commands or in-flight
  commands in the queue in case Async AGI is run again on the call.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-13 22:54:08 +00:00
Richard Mudgett a1b3e6b167 Merged revisions 313658 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r313658 | rmudgett | 2011-04-13 12:47:43 -0500 (Wed, 13 Apr 2011) | 2 lines
  
  Miscellaneous AGI diagnostic message cleanup and code optimization.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-13 17:51:14 +00:00
Richard Mudgett 9b559e5984 Merged revisions 313615 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r313615 | rmudgett | 2011-04-13 12:18:49 -0500 (Wed, 13 Apr 2011) | 5 lines
  
  * Add missing channel lock to handle_cli_agi_add_cmd().
  
  * Flush any Async AGI commands left over from earlier Async AGI control of
  the call.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-13 17:21:50 +00:00
Richard Mudgett c16d39ea83 Merged revisions 313588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r313588 | rmudgett | 2011-04-13 11:31:50 -0500 (Wed, 13 Apr 2011) | 55 lines
  
  Merged revisions 313579 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r313579 | rmudgett | 2011-04-13 11:29:49 -0500 (Wed, 13 Apr 2011) | 48 lines
    
    Merged revisions 313545 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r313545 | rmudgett | 2011-04-13 11:21:24 -0500 (Wed, 13 Apr 2011) | 41 lines
      
      Asterisk does not hangup a channel after endpoint hangs up.
      
      If the call that the dialplan started an AGI script for is hungup while
      the AGI script is in the middle of a command then the AGI script is not
      notified of the hangup.  There are many AGI Exec commands that this can
      happen with.  The reported applications have been: Background, Wait, Read,
      and Dial.  Also the AGI Get Data command.
      
      * Don't wait on the Asterisk channel after it has hung up.  The channel is
      likely to never need servicing again.
      
      * Restored the AGI script's ability to return the AGI_RESULT_HANGUP value
      in run_agi().  It previously only could return AGI_RESULT_SUCCESS or
      AGI_RESULT_FAILURE after the DeadAGI and AGI applications were merged.
      
      (closes issue #17954)
      Reported by: mn3250
      Patches:
            issue17954_v1.8.patch uploaded by rmudgett (license 664)
            issue17954_v1.6.2.patch uploaded by rmudgett (license 664)
            issue17954_v1.4.patch uploaded by rmudgett (license 664)
      Tested by: rmudgett
      JIRA SWP-2171
      
      (closes issue #18492)
      Reported by: devmod
      Tested by: rmudgett
      JIRA SWP-2761
      
      (closes issue #18935)
      Reported by: nvitaly
      Tested by: astmiv, rmudgett
      JIRA SWP-3216
      
      (closes issue #17393)
      Reported by: siby
      Tested by: rmudgett
      JIRA SWP-2727
      
      Review: https://reviewboard.asterisk.org/r/1165/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-13 16:37:06 +00:00
Paul Belanger 3556e4c2d4 Replace ast_log(LOG_DEBUG, ...) with ast_debug()
(closes issue #18556)
Reported by: kkm

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04 16:55:39 +00:00
David Vossel c26c190711 Asterisk media architecture conversion - no more format bitfields
This patch is the foundation of an entire new way of looking at media in Asterisk.
The code present in this patch is everything required to complete phase1 of my
Media Architecture proposal.  For more information about this project visit the link below.
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal

The primary function of this patch is to convert all the usages of format
bitfields in Asterisk to use the new format and format_cap APIs.  Functionally
no change in behavior should be present in this patch.  Thanks to twilson
and russell for all the time they spent reviewing these changes.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 16:22:10 +00:00
Matthew Nicholson e706b5706e According to section 19.1.2 of RFC 3261:
For each component, the set of valid BNF expansions defines exactly
  which characters may appear unescaped.  All other characters MUST be
  escaped.

This patch modifies ast_uri_encode() to encode strings in line with this recommendation.  This patch also adds an ast_escape_quoted() function which escapes '"' and '\' characters in quoted strings in accordance with section 25.1 of RFC 3261.  The ast_uri_encode() function has also been modified to take an ast_flags struct describing the set of rules it should use when escaping characters to allow for it to escape SIP URIs in addition to HTTP URIs and other types of URIs or variations of those two URI types in the future.

The ast_uri_decode() function has also been modified to accept an ast_flags struct describing the set of rules to use when decoding to enable decoding '+' as ' ' in legacy http URLs.

The unit tests for these functions have also been updated.

ABE-2705

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@303509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-24 18:59:22 +00:00
Sean Bright bc9bb55fb2 Merged revisions 302549 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r302549 | seanbright | 2011-01-19 13:43:11 -0500 (Wed, 19 Jan 2011) | 17 lines
  
  Merged revisions 302548 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r302548 | seanbright | 2011-01-19 13:37:09 -0500 (Wed, 19 Jan 2011) | 10 lines
    
    Properly handle partial reads from fgets() when handling AGIs.
    
    When fgets() failed with EAGAIN, we were continually decrementing the available
    space left in our buffer, resulting in botched command handling.
    
    (closes issue #16032)
    Reported by: notahat
    Patches:
          agi_buffer_patch2.diff uploaded by fnordian (license 110)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 18:45:44 +00:00
Erin Spiceland 7bd56615b2 Revert to the previous behavior of AGI command WAIT FOR DIGIT, since the
behavior of the command with this patch is almost exactly like that of GET DATA.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@295789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-22 18:43:31 +00:00
Erin Spiceland 79c18d7105 Add extra functionality to AGI command WAIT FOR DIGIT.
Add the ability to play a sound file, listen for more than just one digit,
specify
escape characters. Backwards compatible (to work with only timeout specified).

(closes issue #15531)
Reported by: diLLec
Patches:
      asterisk-res_agi-203638-patched.patch uploaded by diLLec (license 839)
Tested by: diLLec, espiceland



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@295554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-19 19:32:56 +00:00
Tilghman Lesher 6d0e383321 Merged revisions 289543,289581 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r289543 | tilghman | 2010-09-30 12:50:52 -0500 (Thu, 30 Sep 2010) | 2 lines
  
  More Solaris compatibility fixes
........
  r289581 | tilghman | 2010-09-30 15:23:10 -0500 (Thu, 30 Sep 2010) | 2 lines
  
  Solaris fixes.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@289588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-30 20:40:08 +00:00
Russell Bryant fd58e5036f Merged revisions 288927 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r288927 | russell | 2010-09-27 08:03:43 -0500 (Mon, 27 Sep 2010) | 2 lines
  
  Fix some documentation typos and spelling errors.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@288928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-27 13:04:23 +00:00
Russell Bryant a095791d7d Merged revisions 288925 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r288925 | russell | 2010-09-27 07:42:10 -0500 (Mon, 27 Sep 2010) | 2 lines
  
  Fix a documentation spelling error.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@288926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-27 12:42:30 +00:00
Tilghman Lesher b4e18d5660 Add load priority order, such that preload becomes unnecessary in most cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 19:35:02 +00:00
Richard Mudgett ec37ffbdaf ast_callerid restructuring
The purpose of this patch is to eliminate struct ast_callerid since it has
turned into a miscellaneous collection of various party information.

Eliminate struct ast_callerid and replace it with the following struct
organization:

struct ast_party_name {
	char *str;
	int char_set;
	int presentation;
	unsigned char valid;
};
struct ast_party_number {
	char *str;
	int plan;
	int presentation;
	unsigned char valid;
};
struct ast_party_subaddress {
	char *str;
	int type;
	unsigned char odd_even_indicator;
	unsigned char valid;
};
struct ast_party_id {
	struct ast_party_name name;
	struct ast_party_number number;
	struct ast_party_subaddress subaddress;
	char *tag;
};
struct ast_party_dialed {
	struct {
		char *str;
		int plan;
	} number;
	struct ast_party_subaddress subaddress;
	int transit_network_select;
};
struct ast_party_caller {
	struct ast_party_id id;
	char *ani;
	int ani2;
};

The new organization adds some new information as well.

* The party name and number now have their own presentation value that can
be manipulated independently.  ISDN supplies the presentation value for
the name and number at different times with the possibility that they
could be different.

* The party name and number now have a valid flag.  Before this change the
name or number string could be empty if the presentation were restricted.
Most channel drivers assume that the name or number is then simply not
available instead of indicating that the name or number was restricted.

* The party name now has a character set value.  SIP and Q.SIG have the
ability to indicate what character set a name string is using so it could
be presented properly.

* The dialed party now has a numbering plan value that could be useful to
have available.

The various channel drivers will need to be updated to support the new
core features as needed.  They have simply been converted to supply
current functionality at this time.


The following items of note were either corrected or enhanced:

* The CONNECTEDLINE() and REDIRECTING() dialplan functions were
consolidated into func_callerid.c to share party id handling code.

* CALLERPRES() is now deprecated because the name and number have their
own presentation values.

* Fixed app_alarmreceiver.c write_metadata().  The workstring[] could
contain garbage.  It also can only contain the caller id number so using
ast_callerid_parse() on it is silly.  There was also a typo in the
CALLERNAME if test.

* Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id
number string.  ast_callerid_parse() alters the given buffer which in this
case is the channel's caller id number string.  Then using
ast_shrink_phone_number() could alter it even more.

* Fixed caller ID name and number memory leak in chan_usbradio.c.

* Fixed uninitialized char arrays cid_num[] and cid_name[] in
sig_analog.c.

* Protected access to a caller channel with lock in chan_sip.c.

* Clarified intent of code in app_meetme.c sla_ring_station() and
dial_trunk().  Also made save all caller ID data instead of just the name
and number strings.

* Simplified cdr.c set_one_cid().  It hand coded the ast_callerid_merge()
function.

* Corrected some weirdness with app_privacy.c's use of caller
presentation.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14 15:48:36 +00:00
Tilghman Lesher da8450323f Kill some startup warnings and errors and make some messages more helpful in tracking down the source.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-09 17:00:22 +00:00
Tzafrir Cohen c613897d1c Fix various typos reported by Lintian
(Also fix the typos in the comments)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-02 15:57:02 +00:00
Paul Belanger 0bf94685fd MSG_OOB flag on HANGUP packet removed.
Per Tilghman's request on IRC (#asterisk-bugs).

(closes issue #17506)
Reported by: brycebaril
Tested by: pabelanger, tilghman


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-16 18:43:22 +00:00
Jason Parker 7f5a3370ad Fix compile on systems without HAVE_NULLSAFE_PRINTF defined.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@259617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-27 22:47:36 +00:00
Richard Mudgett a5a0a5f867 Consolidate ast_channel.cid.cid_rdnis into ast_channel.redirecting.from.number.
SWP-1229
ABE-2161

* Ensure chan_local.c:local_call() will not leak cid.cid_dnid when
copying.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-03 02:12:33 +00:00
Leif Madsen 0eb71bccf1 handle_speechset has 4 arguments.
Update code to reflect that handle_speechset has 4 arguments.

(closes issue #17093)
Reported by: gpatri
Patches: 
      res_agi.patch uploaded by gpatri (license 1014)
Tested by: pabelanger, mmichelson

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@254446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-25 15:21:26 +00:00
Tilghman Lesher c8abb42e6a Solaris doesn't like outputting a NULL to a %s in format strings.
Detect all platforms that don't like that, either, and ensure that when documentation is
missing, we pass a non-NULL pointer when outputting the corresponding documentation.

(closes issue #16689)
 Reported by: bklang
 Patches: 
       20100209__issue16689__with_tests.diff.txt uploaded by tilghman (license 14)
 
Review: https://reviewboard.asterisk.org/r/497/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-10 16:01:28 +00:00
Tilghman Lesher 49bf540c71 Create iterative method for querying SRV results, and use that for finding AGI servers.
(closes issue #14775)
 Reported by: _brent_
 Patches: 
       20091215__issue14775.diff.txt uploaded by tilghman (license 14)
       hagi-5.patch uploaded by brent (license 388)
 Tested by: _brent_
 Reviewboard: https://reviewboard.asterisk.org/r/378/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@241188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-19 00:28:49 +00:00
Tilghman Lesher 963319d807 Initialize variables that we attempt to free later.
(closes issue #16302)
 Reported by: yahsyn
 Patches: 
       20091124__issue16302.diff.txt uploaded by tilghman (license 14)
 Tested by: yahsyn


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@238754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-08 22:17:03 +00:00
Tilghman Lesher 386b847075 Merged revisions 237405 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r237405 | tilghman | 2010-01-04 12:19:00 -0600 (Mon, 04 Jan 2010) | 16 lines
  
  Add a flag to disable the Background behavior, for AGI users.
  This is in a section of code that relates to two other issues, namely
  issue #14011 and issue #14940), one of which was the behavior of
  Background when called with a context argument that matched the current
  context.  This fix broke FreePBX, however, in a post-Dial situation.
  Needless to say, this is an extremely difficult collision of several
  different issues.  While the use of an exception flag is ugly, fixing all
  of the issues linked is rather difficult (although if someone would like
  to propose a better solution, we're happy to entertain that suggestion).
  (closes issue #16434)
   Reported by: rickead2000
   Patches: 
         20091217__issue16434.diff.txt uploaded by tilghman (license 14)
         20091222__issue16434__1.6.1.diff.txt uploaded by tilghman (license 14)
   Tested by: rickead2000
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@237406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-04 18:28:28 +00:00
Jeff Peeler fb6606dc4a Fix timeout for AGI command speech recognize.
(closes issue #16297)
Reported by: semond


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@237323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-04 16:24:51 +00:00
Tilghman Lesher 24107651e7 Merged revisions 236184 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r236184 | tilghman | 2009-12-22 20:55:24 -0600 (Tue, 22 Dec 2009) | 4 lines
  
  If EXEC only gets a single argument, don't crash when the second is used.
  (closes issue #16504)
   Reported by: bklang
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@236186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-23 03:07:48 +00:00
Tilghman Lesher 2204f89a1d Merged revisions 235052 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r235052 | tilghman | 2009-12-15 09:29:24 -0600 (Tue, 15 Dec 2009) | 4 lines
  
  Mandatory argument checking
  (closes issue #16446)
   Reported by: nicchap
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@235053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-15 15:33:49 +00:00
Tilghman Lesher d8e0c58437 Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 14:05:12 +00:00
Tilghman Lesher 642bec4d6f AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:20:57 +00:00
Russell Bryant 0264eef115 Merge the new Channel Event Logging (CEL) subsystem.
CEL is the new system for logging channel events.  This was inspired after
facing many problems trying to represent what is possible to happen to a call
in Asterisk using CDR records.  For more information on CEL, see the built in
HTML or PDF documentation generated from the files in doc/tex/.

Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard
work developing this code.  Also, thanks to Matt Nicholson (mnicholson) and
Sean Bright (seanbright) for their assistance in the final push to get this
code ready for Asterisk trunk.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 15:28:53 +00:00
Kevin P. Fleming 6c5987811c Redesigned 'optional API' support.
This patch provides a new implementation of the optional API support defined
in asterisk/optional_api.h; this new version provides solves compatibility
issues with the use of linker version scripts for suppressing global symbols.
In addition, there is now a functional (and tested!) implementation for Mac OS/X,
so module writers no longer need to use special tests before calling optional
API functions. All future implementations must provide these same semantics,
so that module writers can rely on them.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15 16:07:23 +00:00
Eliel C. Sardanons 1b59a1cd7d Move static documentation of E|Dead|AGI() application and manager action to XML.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-01 15:38:48 +00:00
Eliel C. Sardanons 5518c1b171 Move AGI static documentation to the new AstXML form.
Move AGI commands documentation to XML docs:
'set priority'
'set variable'
'stream file'
'control stream file'
'tdd mode'
'verbose'
'wait for digit'
'speech create'
'speech set'
'speech destroy'
'speech load grammar'
'speech unload grammar'
'speech activate grammar'
'speech deactivate grammar'
'speech recognize'



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-24 16:17:31 +00:00
Eliel C. Sardanons be4798f0b3 Move static AGI commands documentation to XML.
Move AGI commands ('say datetime', 'send image', 'send text', 'set autohangup',
'set callerid', 'set context', 'set extension') documentation to the AstXML
form.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-23 21:11:31 +00:00
Eliel C. Sardanons ad08eeaabf Moved static documentation to the AstXML form.
Moved AGI commands static documentation to XML docs ('say alpha', 'say digits',
'say number', 'say phonetic', 'say date' and 'say time').



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 19:11:44 +00:00
Eliel C. Sardanons 2c882626a0 Implement a new element in AstXML for AMI actions documentation.
A new xml element was created to manage the AMI actions documentation,
using AstXML.
To register a manager action using XML documentation it is now possible
using ast_manager_register_xml().
The CLI command 'manager show command' can be used to show the parsed
documentation.

Example manager xml documentation:
<manager name="ami action name" language="en_US">
    <synopsis>
        AMI action synopsis.
    </synopsis>
    <syntax>
        <xi:include xpointer="xpointer(...)" /> <-- for ActionID
        <parameter name="header1" required="true">
	    <para>Description</para>
	</parameter>
	...
    </syntax>
    <description>
        <para>AMI action description</para>
    </description>
    <see-also>
    	...
    </see-also>
</manager>



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 17:52:35 +00:00
Sean Bright fb39d11e6f Fix res_agi compilation after the const-ify the world merge.
Since we are dealing with a 'const char * const' now, we have to create a
temporary copy of the string to work on rather than the original.  Fix inspired
by reporter.  Reviewed by everyone-and-their-mother in #asterisk-dev.

(closes issue #15184)
Reported by: andrew


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 16:51:22 +00:00
Kevin P. Fleming e6b2e9a750 Const-ify the world (or at least a good part of it)
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:

- CLI command handlers
- CLI command handler arguments
- AGI command handlers
- AGI command handler arguments
- Dialplan application handler arguments
- Speech engine API function arguments

In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 21:13:09 +00:00
Eliel C. Sardanons 75cd3f4918 Move AGI documentation from static to the XML form.
Move the AGI commands 'receive text', 'receive char' and 'record'
static documentation to XML docs.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 20:18:43 +00:00
Tilghman Lesher e0aba74fa9 Restore 'asyncagi break' command to 1.6.1 and higher.
(closes issue #14985)
 Reported by: nikkk
 Patches: 
       20090428__bug14985.diff.txt uploaded by tilghman (license 14)
       20090429__bug14985__1.6.1.diff.txt uploaded by tilghman (license 14)
 Tested by: nikkk


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-04 19:29:13 +00:00
Tilghman Lesher a866a75900 Merge str_substitution branch.
This branch adds additional methods to dialplan functions, whereby the result
buffers are now dynamic buffers, which can be expanded to the size of any
result.  No longer are variable substitutions limited to 4095 bytes of data.
In addition, the common case of needing buffers much smaller than that will
enable substitution to only take up the amount of memory actually needed.
The existing variable substitution routines are still available, but users
of those API calls should transition to using the dynamic-buffer APIs.
Reviewboard: http://reviewboard.digium.com/r/174/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29 18:53:01 +00:00
Russell Bryant cba19c8a67 Convert the ast_channel data structure over to the astobj2 framework.
There is a lot that could be said about this, but the patch is a big 
improvement for performance, stability, code maintainability, 
and ease of future code development.

The channel list is no longer an unsorted linked list.  The main container 
for channels is an astobj2 hash table.  All of the code related to searching 
for channels or iterating active channels has been rewritten.  Let n be 
the number of active channels.  Iterating the channel list has gone from 
O(n^2) to O(n).  Searching for a channel by name went from O(n) to O(1).  
Searching for a channel by extension is still O(n), but uses a new method 
for doing so, which is more efficient.

The ast_channel object is now a reference counted object.  The benefits 
here are plentiful.  Some benefits directly related to issues in the 
previous code include:

1) When threads other than the channel thread owning a channel wanted 
   access to a channel, it had to hold the lock on it to ensure that it didn't 
   go away.  This is no longer a requirement.  Holding a reference is 
   sufficient.

2) There are places that now require less dealing with channel locks.

3) There are places where channel locks are held for much shorter periods 
   of time.

4) There are places where dealing with more than one channel at a time becomes 
   _MUCH_ easier.  ChanSpy is a great example of this.  Writing code in the 
   future that deals with multiple channels will be much easier.

Some additional information regarding channel locking and reference count 
handling can be found in channel.h, where a new section has been added that 
discusses some of the rules associated with it.

Mark Michelson also assisted with the development of this patch.  He did the 
conversion of ChanSpy and introduced a new API, ast_autochan, which makes it 
much easier to deal with holding on to a channel pointer for an extended period 
of time and having it get automatically updated if the channel gets masqueraded.
Mark was also a huge help in the code review process.

Thanks to David Vossel for his assistance with this branch, as well.  David 
did the conversion of the DAHDIScan application by making it become a wrapper 
for ChanSpy internally.

The changes come from the svn/asterisk/team/russell/ast_channel_ao2 branch.

Review: http://reviewboard.digium.com/r/203/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-24 14:04:26 +00:00
Joshua Colp 9ff9df1369 Fix speech structure leak in the AGI speech recognition integration.
The AGI dialplan applications did not destroy the speech structure automatically
if it was not destroyed by the running AGI script. They will now do this.

(issue LUMENVOX-15) 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 15:46:46 +00:00
Russell Bryant 0bdd99ad64 Merged revisions 182810 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r182810 | russell | 2009-03-17 21:09:13 -0500 (Tue, 17 Mar 2009) | 44 lines

Fix cases where the internal poll() was not being used when it needed to be.

We have seen a number of problems caused by poll() not working properly on 
Mac OSX.  If you search around, you'll find a number of references to using 
select() instead of poll() to work around these issues.  In Asterisk, we've 
had poll.c which implements poll() using select() internally.  However, we 
were still getting reports of problems.

vadim investigated a bit and realized that at least on his system, even 
though we were compiling in poll.o, the system poll() was still being used.  
So, the primary purpose of this patch is to ensure that we're using the 
internal poll() when we want it to be used.

The changes are:

1) Remove logic for when internal poll should be used from the Makefile.  
   Instead, put it in the configure script.  The logic in the configure 
   script is the same as it was in the Makefile.  Ideally, we would have 
   a functionality test for the problem, but that's not actually possible, 
   since we would have to be able to run an application on the _target_ 
   system to test poll() behavior.

2) Always include poll.o in the build, but it will be empty if AST_POLL_COMPAT
   is not defined.

3) Change uses of poll() throughout the source tree to ast_poll().  I feel 
   that it is good practice to give the API call a new name when we are 
   changing its behavior and not using the system version directly in all cases.
   So, normally, ast_poll() is just redefined to poll().  On systems where 
   AST_POLL_COMPAT is defined, ast_poll() is redefined to ast_internal_poll().

4) Change poll() in main/poll.c to be ast_internal_poll().

It's worth noting that any code that still uses poll() directly will work fine 
(if they worked fine before).  So, for example, out of tree modules that are 
using poll() will not stop working or anything.  However, for modules to work 
properly on Mac OSX, ast_poll() needs to be used.

(closes issue #13404)
Reported by: agalbraith
Tested by: russell, vadim

http://reviewboard.digium.com/r/198/

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 02:28:55 +00:00
Russell Bryant 1c9d5caaef Add a todo to finish the XML docs in this module
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-24 19:33:15 +00:00
Jeff Peeler a8930194f4 Merged revisions 168516 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r168516 | jpeeler | 2009-01-12 15:42:34 -0600 (Mon, 12 Jan 2009) | 5 lines
  
  (closes issue #13881)
  Reported by: hoowa
  
  Update the app CDR field for AGI commands that are not executing an application via "exec".
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-12 21:51:46 +00:00
Tilghman Lesher 4a9e8078b9 When using ast_str with a non-ast_str-enabled API, we need to update the buffer
or otherwise, we cannot use ast_str_strlen().


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-09 18:30:55 +00:00
Tilghman Lesher 8c9b951974 Merged revisions 167840 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r167840 | tilghman | 2009-01-08 16:08:56 -0600 (Thu, 08 Jan 2009) | 6 lines
  
  Don't truncate database results at 255 chars.
  (closes issue #14069)
   Reported by: evandro
   Patches: 
         20081214__bug14069.diff.txt uploaded by Corydon76 (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 22:37:20 +00:00
Mark Michelson 5f95c7adae Always use the value of the AGISIGHUP when running an AGI.
Prior to this patch, the value of AGISIGUP was not always
honored when set on a channel.

(closes issue #13711)
Reported by: fmueller
Patches:
      13711.patch uploaded by putnopvut (license 60)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 23:25:34 +00:00
Russell Bryant 7e72821959 Remove AST_PBX_KEEPALIVE usage from res_agi.
This patch removes the usage of AST_PBX_KEEPALIVE from res_agi.  The only usage
was for the AGI command, "asyncagi break".  This patch removes this feature.
Normally, a feature would not be removed like this.  However, this code is
broken and usage of it will result in a memory leak.

Usage of this feature will make the AGI code return a result of 
AST_PBX_KEEPALIVE.  The PBX handler assumes that another thread has assumed
ownership of the channel.  The channel thread will exit without destroying the
channel.  Unfortunately, _no_ thread has ownership of the channel at this
point.  There are a couple of serious problems here:

1) The only way to recover the caller is to issue a channel redirect.  This
   will work, but this will be done with a masquerade, and the old ast_channel
   structure will be lost.

2) Until the channel redirect happens, there is no code servicing the channel.
   That means nothing is reading audio or handling events coming from the
   channel.  This is very bad.

The recommended way to get this same "break" functionality is to issue the
redirect while the channel is still being handled by the AGI code.  That way,
there will be no memory leak, and there will be no period of time that the
channel is not being serviced.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 14:16:54 +00:00
Tilghman Lesher c8223fc957 Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 08:36:35 +00:00
Tilghman Lesher d254de9194 Merged revisions 163088 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r163088 | tilghman | 2008-12-11 10:51:27 -0600 (Thu, 11 Dec 2008) | 6 lines
  
  Don't wait forever, if there's a specified recording timeout.
  (closes issue #13885)
   Reported by: bamby
   Patches: 
         res_agi.c.patch uploaded by bamby (license 430)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11 16:52:24 +00:00
Eliel C. Sardanons 1e8e12efcf Janitor, use ARRAY_LEN() when possible.
(closes issue #13990)
Reported by: eliel
Patches:
      array_len.diff uploaded by eliel (license 64)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 10:31:25 +00:00
Eliel C. Sardanons 8192031e83 Added XML documentation for the following AGI commands:
- get option
        - get variable
        - hangup
        - noop



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-04 13:45:32 +00:00
Kevin P. Fleming e14dfcbedc improve handling of API calls provided by loaded modules through use of some GCC features; this makes app_stack's usage of AGI APIs even cleaner, and will allow it to work 'as expected' either with or without res_agi being loaded
reviewed at http://reviewboard.digium.com/r/62



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-26 21:20:50 +00:00
Matthew Nicholson f3d086256c Added EVENT_FLAG_AGI and used it for manager calls in res_agi.c
(closes issue #13873)
Reported by: fnordian
Patches:
      ami_agievent.patch uploaded by fnordian (license 110)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-24 21:56:22 +00:00
Kevin P. Fleming 438e410c4f correct small bug introduced during API conversion
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-19 13:45:48 +00:00
Kevin P. Fleming 81a16aa982 make some corrections to the ast_agi_register_multiple(), ast_agi_unregister_multiple() and ast_agi_fdprintf() API calls to be consistent with API guidelines
also, move UPGRADE.txt to UPGRADE-1.6.txt and make the new UPGRADE.txt contain information about upgrading between Asterisk 1.6 releases



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-19 12:42:19 +00:00
Eliel C. Sardanons 336d576168 Add XML documentation for AGI commands:
- database deltree
   - database get
   - exec
   - get data
   - get full variable



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 13:43:46 +00:00
Michiel van Baak 86f900b201 This commit does two things:
- Add CLI aliases module to asterisk.
- Remove all deprecated CLI commands from the code

Initial work done by file.
Junk-Y and lmadsen did a lot of work and testing to
get the list of deprecated commands into the configuration file.

Deprecated CLI commands are now handled by this new module,
see cli_aliases.conf for more info about that.

ok russellb@ via reviewboard

(closes issue #13735)
Reported by: mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 06:46:04 +00:00
Eliel C. Sardanons 5b25c26318 - Add 'database del', 'database put' and 'set music' AGI commands XML documentation.
- Add to the DTD the possibility to put a parameter inside an <enum>.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 02:20:05 +00:00
Eliel C. Sardanons 6f31fed83f Implement AGI XML documentation parsing functions.
A new <agi> element is used to describe the XML documentation.
We have the usual synopsis,syntax,description and seealso for AGI commands.
The CLI 'agi show commands' command was changed to show all the documentation se
ctions.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 00:17:43 +00:00
Kevin P. Fleming bd4eb070f3 bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02 18:52:13 +00:00
Michiel van Baak 1097de1382 fix the 'agi show commands' CLI function.
(closes issue #13666)
Reported by: eliel
Patches: 
      res_agi.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-12 09:19:23 +00:00
Jeff Peeler 2ec290b09d Similar to r143204, masquerade the channel in the case of Park being called from AGI.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 23:08:21 +00:00
Michiel van Baak 90751b16ca Merge the cli_cleanup branch.
This work is done by lmadsen, junky and mvanbaak
during AstriDevCon.

This is the second audit the CLI got, and
this time lmadsen made sure he had _ALL_ modules
loaded that have CLI commands in them.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-28 23:32:14 +00:00
Tilghman Lesher 900b7d75da Merged revisions 141503 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r141503 | tilghman | 2008-09-06 10:23:42 -0500 (Sat, 06 Sep 2008) | 4 lines

Reverting behavior change (AGI should not exit non-zero on SUCCESS)
(closes issue #13434)
 Reported by: francesco_r

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-06 15:26:45 +00:00
Jeff Peeler f7efe4a1f7 Merged revisions 141028 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r141028 | jpeeler | 2008-09-04 12:00:29 -0500 (Thu, 04 Sep 2008) | 7 lines

(closes issue #11979)
Fixes multiple parking problems:
Crash when executing a park on an extension dialed by AGI due to not returning the proper return code.
Crash when using a builtin feature that was a subset of a enabled dynamic feature.
Crash due to always hanging up the peer despite the fact that the peer was supposed to be parked.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-04 17:27:56 +00:00
Sean Bright 357bf3e90b All of the res/ stuff (other than res_jabber) from the RSW branch.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-10 00:47:56 +00:00
Tilghman Lesher c5a119d86d Update documentation as to the behavior of AGI in 1.6.0 and higher. Also, add
an OOB message that answers the question of, if AGI no longer shuts down the
connection on hangup, how will FastAGI know when to stop processing the call?


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-09 01:15:38 +00:00
Kevin P. Fleming 7df8b8b848 make datastore creation and destruction a generic API since it is not really channel related, and add the ability to add/find/remove datastores to manager sessions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@135680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-05 16:56:11 +00:00
Tilghman Lesher b6de2967df Merged revisions 134480 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r134480 | tilghman | 2008-07-30 14:03:44 -0500 (Wed, 30 Jul 2008) | 5 lines

launch_netscript sometimes returns -1, which fails to set AGISTATUS.  Map
failure to -1, so that AGISTATUS is always set.
(closes issue #13199)
 Reported by: smw1218

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@134481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-30 19:05:35 +00:00
Russell Bryant 5ac03d340f Fix a couple of places in res_agi where the agi_commands lock would not be
released, causing a deadlock.  (Reported by mvanbaak in #asterisk-dev,
discovered by bbryant's change to the lock tracking code to yell at you
if a thread exits with a lock still held)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-15 18:46:40 +00:00
Tilghman Lesher 4ff527903e Code wasn't ready to be merged - see -dev list discussion
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-09 03:39:59 +00:00
Olle Johansson 45e79490ba Implement flags for AGI in the channel structure so taht "show channels" and
AMI commands can display that a channel is under control of an AGI.

Work inspired by work at customer site, but paid for by Edvina AB


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-05 20:54:30 +00:00
Sean Bright 9c62626a52 Whitespace only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-18 00:33:31 +00:00
Tilghman Lesher 90d75af346 Conditionally load the AGI command gosub, depending on whether or not res_agi
has been loaded, fix a return value in the loader, and ensure that the help
workhorse header does not print on load.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-05 15:58:11 +00:00
Tilghman Lesher 76506b7baa Move compatibility options into asterisk.conf, default them to on for upgrades,
and off for new installations.  This includes the translation from pipes to commas
for pbx_realtime and the EXEC command for AGI, as well as the change to the Set
application not to support multiple variables at once.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-03 22:05:16 +00:00
Michiel van Baak f1e9371da8 - revert change to ast_queue_hangup and create ast_queue_hangup_with_cause
- make data member of the ast_frame struct a named union instead of a void

Recently the ast_queue_hangup function got a new parameter, the hangupcause
Feedback came in that this is no good and that instead a new function should be created.
This I did.

The hangupcause was stored in the seqno member of the ast_frame struct. This is not very
elegant, and since there's already a data member that one should be used.
Problem is, this member was a void *.
Now it's a named union so it can hold a pointer, an uint32 and there's a padding in case someone
wants to store another type in there in the future.

This commit is so massive, because all ast_frame.data uses have to be
altered to ast_frame.data.data

Thanks russellb and kpfleming for the feedback.

(closes issue #12674)
Reported by: mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22 16:29:54 +00:00
Tilghman Lesher c51989a309 Merged revisions 116466 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r116466 | tilghman | 2008-05-14 16:38:09 -0500 (Wed, 14 May 2008) | 7 lines

Avoid zombies when the channel exits before the AGI.
(closes issue #12648)
 Reported by: gkloepfer
 Patches: 
       20080514__bug12648.diff.txt uploaded by Corydon76 (license 14)
 Tested by: gkloepfer

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 21:39:06 +00:00
Olle Johansson e4c544cd5a Formatting changes (coding guidelines) while thinking about something else...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 11:51:09 +00:00
Tilghman Lesher b5a127daac Modify TIMEOUT() to be accurate down to the millisecond.
(closes issue #10540)
 Reported by: spendergrass
 Patches: 
       20080417__bug10540.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-01 23:06:23 +00:00
Tilghman Lesher 9809a31bb5 Merged revisions 114195 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114195 | tilghman | 2008-04-17 07:56:38 -0500 (Thu, 17 Apr 2008) | 8 lines

Add special case for when the agi cannot be executed, to comply with the documentation that
we return failure in that case.
(closes issue #12462)
 Reported by: fmueller
 Patches: 
       20080416__bug12462.diff.txt uploaded by Corydon76 (license 14)
 Tested by: fmueller

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-17 12:59:04 +00:00
Tilghman Lesher 123ac5fd64 Standardized routines for forking processes (keeps all the specialized code in one place).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-16 22:57:54 +00:00
Tilghman Lesher eb930d5edd AsyncAGI should not close the manager session on error.
(closes issue #12370)
 Reported by: srt
 Patches: 
       asterisk-12370.diff uploaded by srt (license 378)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-05 13:24:12 +00:00
Terry Wilson b02bc230af Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not
actual problems, per se.  I also added format attributes to any printf wrapper functions I found that didn't have them.  -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:43:34 +00:00
Donny Kavanagh 4aadd3c770 trivial fix for an agi error when attempting to use EAGI on a dead/hungup channel, we now print an error that makes sense
given our removal of deadagi as an actual application.

(closes issue #12161)
Reported by: explidous
Patches:
      res_agi_12161.patch uploaded by juggie (license 24)
Tested by: juggie


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106399 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-06 19:31:50 +00:00
Tilghman Lesher 8a411ccf83 Create a centralized configuration option for silencethreshold
(closes issue #11236)
 Reported by: philipps
 Patches: 
       20080218__bug11236.diff.txt uploaded by Corydon76 (license 14)
 Tested by: philipps


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 16:23:44 +00:00
Russell Bryant 0036cde5f3 Rename version.h to ast_version.h. Next, I will be re-adding version.h as an
automatically generated file like it used to be.  This still needs to be there
for modules that have to check it to compile against multiple asterisk versions.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 20:02:14 +00:00
Mark Michelson 7fa044f86f Instead of a notice, make the message about a hung-up channel a debug message, and revert the original
logic on the if statement. Thanks to Juggie for bringing this to my attention.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-21 17:44:34 +00:00
Mark Michelson b403e214b1 Don't print the fact that we are using dead mode in AGI if called from the
'h' extension since it is well-known that it will be running in dead mode.

(closes issue #12046)
Reported by: explidous



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-21 16:46:37 +00:00
Olle Johansson 9cf6138725 Formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 10:19:09 +00:00
Joshua Colp cc0c25c76c Remove ast_module_user usage from res_agi. This is taken care of in the core.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-11 18:29:18 +00:00
Russell Bryant 1ec8cb41a8 Merge changes from team/mvanbaak/cli-command-audit
(closes issue #8925)

About a year ago, as Leif Madsen and Jim van Meggelen were going over the CLI
commands in Asterisk 1.4 for the next version of their book, they documented
a lot of inconsistencies.  This set of changes addresses all of these issues
and has been reviewed by Leif.

While this does introduce even more changes to the CLI command structure, it
makes everything consistent, which is the most important thing.

Thanks to all that helped with this one!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-08 21:26:32 +00:00
Mark Michelson fe9821cc10 Get rid of any remaining ast_verbose calls in the code in favor of
ast_verb

(closes issue #11934)
Reported by: mvanbaak
Patches:
      20080205_astverb-2.diff.txt uploaded by mvanbaak (license 7)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-05 23:00:15 +00:00
Joshua Colp 5186035990 Merged revisions 98317 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98317 | file | 2008-01-11 15:28:30 -0400 (Fri, 11 Jan 2008) | 6 lines

If the channel is hungup during RECORD FILE send a result code of -1 to be uniform with everything else.
(closes issue #11743)
Reported by: davevg
Patches:
      res_agi.diff uploaded by davevg (license 209)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 19:30:34 +00:00