dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

277 Commits

Author SHA1 Message Date
lmadsen a2d2fc70bc 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: http://svn.digium.com/svn/asterisk/trunk@323155 f38db490-d61c-443f-a65b-d21fe96a405b
2011-06-13 19:03:46 +00:00
rmudgett 1788f7e5bd 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: http://svn.digium.com/svn/asterisk/trunk@321445 f38db490-d61c-443f-a65b-d21fe96a405b
2011-05-28 00:29:48 +00:00
russell 681ceaeaac 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: http://svn.digium.com/svn/asterisk/trunk@316293 f38db490-d61c-443f-a65b-d21fe96a405b
2011-05-03 20:45:32 +00:00
russell 5a219f333e 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: http://svn.digium.com/svn/asterisk/trunk@314781 f38db490-d61c-443f-a65b-d21fe96a405b
2011-04-22 14:08:02 +00:00
rmudgett e294083a12 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: http://svn.digium.com/svn/asterisk/trunk@314080 f38db490-d61c-443f-a65b-d21fe96a405b
2011-04-18 16:27:14 +00:00
rmudgett 32198d4329 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: http://svn.digium.com/svn/asterisk/trunk@313701 f38db490-d61c-443f-a65b-d21fe96a405b
2011-04-13 22:54:08 +00:00
rmudgett 4ff120bb0f 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: http://svn.digium.com/svn/asterisk/trunk@313659 f38db490-d61c-443f-a65b-d21fe96a405b
2011-04-13 17:51:14 +00:00
rmudgett f5d7b06ff4 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: http://svn.digium.com/svn/asterisk/trunk@313629 f38db490-d61c-443f-a65b-d21fe96a405b
2011-04-13 17:21:50 +00:00
rmudgett 3de0f5e8b2 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: http://svn.digium.com/svn/asterisk/trunk@313606 f38db490-d61c-443f-a65b-d21fe96a405b
2011-04-13 16:37:06 +00:00
pabelanger 6705f03406 Replace ast_log(LOG_DEBUG, ...) with ast_debug()
(closes issue #18556)
Reported by: kkm

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@306258 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-04 16:55:39 +00:00
dvossel 4aca3187a3 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: http://svn.digium.com/svn/asterisk/trunk@306010 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-03 16:22:10 +00:00
mnicholson 9dd80bbb53 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: http://svn.digium.com/svn/asterisk/trunk@303509 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-24 18:59:22 +00:00
seanbright 0f183e35d1 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: http://svn.digium.com/svn/asterisk/trunk@302550 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-19 18:45:44 +00:00
espiceland 6558fbe18a 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: http://svn.digium.com/svn/asterisk/trunk@295789 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-22 18:43:31 +00:00
espiceland fa420ca248 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: http://svn.digium.com/svn/asterisk/trunk@295554 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-19 19:32:56 +00:00
tilghman d0607f4d52 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: http://svn.digium.com/svn/asterisk/trunk@289588 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-30 20:40:08 +00:00
russell ccf77f3ef6 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: http://svn.digium.com/svn/asterisk/trunk@288928 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-27 13:04:23 +00:00
russell d5595a6292 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: http://svn.digium.com/svn/asterisk/trunk@288926 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-27 12:42:30 +00:00
tilghman 771cdeecd1 Add load priority order, such that preload becomes unnecessary in most cases
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@278132 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-20 19:35:02 +00:00
rmudgett ad58aa92a2 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: http://svn.digium.com/svn/asterisk/trunk@276347 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 15:48:36 +00:00
tilghman cc07f75cb0 Kill some startup warnings and errors and make some messages more helpful in tracking down the source.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@275105 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-09 17:00:22 +00:00
tzafrir 4d43ba70d1 Fix various typos reported by Lintian
(Also fix the typos in the comments)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@273641 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-02 15:57:02 +00:00
pabelanger 5c51759e15 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: http://svn.digium.com/svn/asterisk/trunk@270936 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-16 18:43:22 +00:00
qwell 7e91bd6da5 Fix compile on systems without HAVE_NULLSAFE_PRINTF defined.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@259617 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-27 22:47:36 +00:00
rmudgett f42e29b281 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: http://svn.digium.com/svn/asterisk/trunk@256104 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-03 02:12:33 +00:00
lmadsen 63374e809f 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: http://svn.digium.com/svn/asterisk/trunk@254446 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-25 15:21:26 +00:00
tilghman b65768d7bb 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: http://svn.digium.com/svn/asterisk/trunk@246030 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-10 16:01:28 +00:00
tilghman fb0c85edeb 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: http://svn.digium.com/svn/asterisk/trunk@241188 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-19 00:28:49 +00:00
tilghman f4f0e41dab 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: http://svn.digium.com/svn/asterisk/trunk@238754 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-08 22:17:03 +00:00
tilghman fda6c101b6 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: http://svn.digium.com/svn/asterisk/trunk@237406 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-04 18:28:28 +00:00
jpeeler c6678d2ee6 Fix timeout for AGI command speech recognize.
(closes issue #16297)
Reported by: semond


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@237323 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-04 16:24:51 +00:00
tilghman c75d2ac2c0 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: http://svn.digium.com/svn/asterisk/trunk@236186 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-23 03:07:48 +00:00
tilghman 0c62718430 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: http://svn.digium.com/svn/asterisk/trunk@235053 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-15 15:33:49 +00:00
tilghman 3bacd4082e Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-04 14:05:12 +00:00
tilghman d1ec1aa57d AST-2009-005
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211539 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10 19:20:57 +00:00
russell ac3b35dcc7 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: http://svn.digium.com/svn/asterisk/trunk@203638 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-26 15:28:53 +00:00
kpfleming 12ab0bbe15 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: http://svn.digium.com/svn/asterisk/trunk@200519 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-15 16:07:23 +00:00
eliel 90ddc9b84f Move static documentation of E|Dead|AGI() application and manager action to XML.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@198561 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-01 15:38:48 +00:00
eliel 8a0a175fb8 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: http://svn.digium.com/svn/asterisk/trunk@196585 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-24 16:17:31 +00:00
eliel 6f75be0f9b 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: http://svn.digium.com/svn/asterisk/trunk@196554 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-23 21:11:31 +00:00
eliel 254c392ab0 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: http://svn.digium.com/svn/asterisk/trunk@196344 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-22 19:11:44 +00:00
eliel cbbfdc573c 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: http://svn.digium.com/svn/asterisk/trunk@196308 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-22 17:52:35 +00:00
seanbright a09dfb74c6 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: http://svn.digium.com/svn/asterisk/trunk@196270 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-22 16:51:22 +00:00
kpfleming 230a66da7d 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: http://svn.digium.com/svn/asterisk/trunk@196072 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-21 21:13:09 +00:00
eliel 79c8b491f6 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: http://svn.digium.com/svn/asterisk/trunk@195365 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-18 20:18:43 +00:00
tilghman 0b5da784d0 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: http://svn.digium.com/svn/asterisk/trunk@192171 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-04 19:29:13 +00:00
tilghman 8fc2c0f724 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: http://svn.digium.com/svn/asterisk/trunk@191140 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-29 18:53:01 +00:00
russell 89175b7e04 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: http://svn.digium.com/svn/asterisk/trunk@190423 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-24 14:04:26 +00:00
file aa844c8202 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: http://svn.digium.com/svn/asterisk/trunk@184673 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27 15:46:46 +00:00
russell b48669aa8f 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: http://svn.digium.com/svn/asterisk/trunk@182847 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18 02:28:55 +00:00