dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

1871 Commits

Author SHA1 Message Date
twilson 3ecca39de5 Merged revisions 172517 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r172517 | twilson | 2009-01-30 11:47:41 -0600 (Fri, 30 Jan 2009) | 37 lines
  
  Fix feature inheritance with builtin features
  
  When using builtin features like parking and transfers, the AST_FEATURE_* flags
  would not be set correctly for all instances when either performing a builtin
  attended transfer, or parking a call and getting the timeout callback.  Also,
  there was no way on a per-call basis to specify what features someone should
  have on picking up a parked call (since that doesn't involve the Dial() command).
  There was a global option for setting whether or not all users who pickup a
  parked call should have AST_FEATURE_REDIRECT set, but nothing for DISCONNECT,
  AUTOMON, or PARKCALL.
  
  This patch:
  1) adds the BRIDGE_FEATURES dialplan variable which can be set either in the
  dialplan or with setvar in channels that support it.  This variable can be set
  to any combination of 't', 'k', 'w', and 'h' (case insensitive matching of the
  equivalent dial options), to set what features should be activated on this
  channel.  The patch moves the setting of the features datastores into the
  bridging code instead of app_dial to help facilitate this.
  
  2) adds global options parkedcallparking, parkedcallhangup, and
  parkedcallrecording to be similar to the parkedcalltransfers option for
  globally setting features.
  
  3) has builtin_atxfer call builtin_parkcall if being transfered to the parking
  extension since tracking everything through multiple masquerades, etc. is
  difficult and error-prone
  
  4) attempts to fix all cases of return calls from parking and completed builtin
  transfers not having the correct permissions
  (closes issue #14274)
  Reported by: aragon
  Patches: 
        fix_feature_inheritence.diff.txt uploaded by otherwiseguy (license 396)
  Tested by: aragon, otherwiseguy
  
  Review http://reviewboard.digium.com/r/138/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-30 21:29:12 +00:00
rmudgett 20fafad005 Fixed some doxygen comments
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172370 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-29 19:34:09 +00:00
oej 10712d118c Fix "cancel answered elsewhere" through app_queue with members in chan_local.
Also, implement a private cause code (as suggested by Tilghman). This works with
chan_sip, but doesn't propagate through chan_local.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172318 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-29 17:08:22 +00:00
oej 7ad1a935c8 - Make sure we set setvar= variables on outbound calls too, not only inbound calls.
- Also, change a function in app.c to return a userful value instead of always returning 0.

Patch by fnordian, changed by Corydon76 and myself.

This does not close the bug report, as fnordian had an additional change we're still discussing.

(related to issue #14059)
Reported by: fnordian
Patches: 
      chan_sip_hfield.patch uploaded by fnordian (license 110)
      20090116__bug14059.diff.txt uploaded by Corydon76 (license 14)
Tested by: fnordian, Corydon76, oej



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172268 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-29 13:21:31 +00:00
murf a0d8bf45f5 Merged revisions 172030 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r172030 | murf | 2009-01-28 11:51:16 -0700 (Wed, 28 Jan 2009) | 46 lines
  
  This patch fixes h-exten running misbehavior in manager-redirected 
  situations.
  
  What it does:
  1. A new Flag value is defined in include/asterisk/channel.h,
   AST_FLAG_BRIDGE_HANGUP_DONT, which used as a messenge to the
   bridge hangup exten code not to run the h-exten there (nor
   publish the bridge cdr there). It will done at the pbx-loop
   level instead.
  2. In the manager Redirect code, I set this flag on the channel
   if the channel has a non-null pbx pointer. I did the same for the
   second (chan2) channel, which gets run if name2 is set...
   and the first succeeds.
  3. I restored the ending of the cdr for the pbx loop h-exten
   running code. Don't know why it was removed in the first place.
  4. The first attempt at the fix for this bug was to place code
     directly in the async_goto routine, which was called from a
     large number of places, and could affect a large number of
     cases, so I tested that fix against a fair number of transfer
     scenarios, both with and without the patch. In the process,
     I saw that putting the fix in async_goto seemed not to affect
     any of the blind or attended scenarios, but still, I was
     was highly concerned that some other scenarios I had not tested
     might be negatively impacted, so I refined the patch to 
     its current scope, and jmls tested both. In the process, tho,
     I saw that blind xfers in one situation, when the one-touch
     blind-xfer feature is used by the peer, we got strange 
     h-exten behavior.  So, I  inserted code to swap CDRs and
     to set the HANGUP_DONT field, to get uniform behavior.
  5. I added code to the bridge to obey the HANGUP_DONT flag,
     skipping both publishing the bridge CDR, and running
     the h-exten; they will be done at the pbx-loop (higher)
     level instead.
  6. I removed all the debug logs from the patch before committing.
  7. I moved the AUTOLOOP set/reset in the h-exten code in res_features
     so it's only done if the h-exten is going to be run. A very
     minor performance improvement, but technically correct.
  
  
  (closes issue #14241)
  Reported by: jmls
  Patches:
        14241_redirect_no_bridgeCDR_or_h_exten_via_transfer uploaded by murf (license 17)
  Tested by: murf, jmls
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172063 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-28 20:31:06 +00:00
russell 99c1b69342 Change ARRAY_LEN() to be more C++ safe.
When the second part of this macro is written as 0[a] instead of a[0], it will
force a failure if the macro is used on a C++ object that overloads the []
operator.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@170943 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-25 02:49:30 +00:00
dbailey 38c7a60810 change VMWI to use new DAHDI_VMWI ioctl call.
Change configure script to detect the new ioctl call data structure.    
(issue #14104)
Reported by: alecdavis
Patches:
      mwiioctl_structure_asterisk.diff4.txt uploaded by dbailey (license )
Tested by: alecdavis, dbailey


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@170112 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-22 15:49:24 +00:00
tilghman 9994f88e7b Merged revisions 169943 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r169943 | tilghman | 2009-01-21 18:43:31 -0600 (Wed, 21 Jan 2009) | 9 lines
  
  AST_RWLOCK_INIT_VALUE is always defined.  What we really wanted to ask is
  whether autoconf detected a static initializer value.  This fixes rwlocks
  on all such platforms (mainly, Mac OS X).
  (closes issue #13767)
   Reported by: jcovert
   Patches: 
         20090121__bug13767.diff.txt uploaded by Corydon76 (license 14)
   Tested by: jcovert, Corydon76
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169944 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-22 00:44:52 +00:00
kpfleming a343f7a275 ast_str_SQLGetData is *not* part of the ast_str API, it's part of the ast_odbc API and just happens to use an ast_str as the buffer; move all of it to res_odbc.c and res_odbc.h, renaming appropriately
along the way fix some minor coding style issues in strings.h and add some attribute_pure annotations to functions in the ast_str API



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169438 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-19 21:42:46 +00:00
twilson d2601c379a Fix qualify for TCP peer
(closes issue #14192)
Reported by: pabelanger
Patches: 
      asterisk-bug14192.diff.txt uploaded by jamesgolovich (license 176)
Tested by: jamesgolovich


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169080 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-17 01:56:36 +00:00
tilghman 844a51b7f3 Merged revisions 168828 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r168828 | tilghman | 2009-01-16 12:41:35 -0600 (Fri, 16 Jan 2009) | 6 lines
  
  Fix the conjugation of Russian and Ukrainian languages.
  (related to issue #12475)
   Reported by: chappell
   Patches: 
         vm_multilang.patch uploaded by chappell (license 8)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168832 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-16 18:49:09 +00:00
tilghman a5200683ad Resolve issue with negative vs non-negative length parameters.
(closes issue #14245)
 Reported by: dveiga


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168719 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-15 18:39:56 +00:00
twilson f4c8743405 Add option to hide console connect messages
(closes issue #14222)
Reported by: jamesgolovich
Patches: 
      asterisk-hideconnect.diff.txt uploaded by jamesgolovich (license 176)
Tested by: otherwiseguy


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168585 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-13 23:00:27 +00:00
russell d056b18a40 Merged revisions 168561 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r168561 | russell | 2009-01-13 13:13:05 -0600 (Tue, 13 Jan 2009) | 2 lines

Revert unnecessary indications API change from rev 122314

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168562 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-13 19:22:13 +00:00
tilghman c0765c5fbf Some platforms (notably, the BSDs) have a more efficient implementation called
closefrom(3).


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168522 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-12 23:06:12 +00:00
tilghman 205de4564c 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: http://svn.digium.com/svn/asterisk/trunk@168090 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-09 18:30:55 +00:00
seanbright 6313d8d59e Mostly just whitespace, but also convert 'CVS' to 'SVN' in a couple
places and fix a few typos I found in the CODING_GUIDELINES.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@167061 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-31 23:07:14 +00:00
murf 7eb310cb7f Merged revisions 166093 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

In order to merge this 1.4 patch into trunk,
I had to resolve some conflicts and wait for
Russell to make some changes to res_agi.
I re-ran all the tests; 39 calls in all, and
made fairly careful notes and comparisons: I
don't want this to blow up some aspect of 
asterisk; I completely removed the KEEPALIVE
from the pbx.h decls. The first 3 scenarios
involving feature park; feature xfer to 700;
hookflash park to Park() app call all behave
the same, don't appear to leave hung channels,
and no crashes.

........
  r166093 | murf | 2008-12-19 15:30:32 -0700 (Fri, 19 Dec 2008) | 131 lines
  
  This merges the masqpark branch into 1.4
  
  These changes eliminate the need for (and use of)
  the KEEPALIVE return code in res_features.c;
  There are other places that use this result code
  for similar purposes at a higher level, these appear
  to be left alone in 1.4, but attacked in trunk.
  
  The reason these changes are being made in 1.4, is
  that parking ends a channel's life, in some situations,
  and the code in the bridge (and some other places),
  was not checking the result code properly, and dereferencing
  the channel pointer, which could lead to memory corruption
  and crashes.
  
  Calling the masq_park function eliminates this danger 
  in higher levels.
  
  A series of previous commits have replaced some parking calls
  with masq_park, but this patch puts them ALL to rest,
  (except one, purposely left alone because a masquerade
  is done anyway), and gets rid of the code that tests
  the KEEPALIVE result, and the NOHANGUP_PEER result codes.
  
  While bug 13820 inspired this work, this patch does
  not solve all the problems mentioned there.
  
  I have tested this patch (again) to make sure I have
  not introduced regressions. 
  
  Crashes that occurred when a parked party hung up
  while the parking party was listening to the numbers
  of the parking stall being assigned, is eliminated.
  
  These are the cases where parking code may be activated:
  
  1. Feature one touch (eg. *3)
  2. Feature blind xfer to parking lot (eg ##700)
  3. Run Park() app from dialplan (eg sip xfer to 700)
     (eg. dahdi hookflash xfer to 700)
  4. Run Park via manager.
  
  The interesting testing cases for parking are:
  I. A calls B, A parks B
      a. B hangs up while A is getting the numbers announced.
      b. B hangs up after A gets the announcement, but 
         before the parking time expires
      c. B waits, time expires, A is redialed,
         A answers, B and A are connected, after
         which, B hangs up.
      d. C picks up B while still in parking lot.
  
  II. A calls B, B parks A
      a. A hangs up while B is getting the numbers announced.
      b. A hangs up after B gets the announcement, but 
         before the parking time expires
      c. A waits, time expires, B is redialed,
         B answers, A and B are connected, after
         which, A hangs up.
      d. C picks up A while still in parking lot.
  
  Testing this throroughly involves acting all the permutations
  of I and II, in situations 1,2,3, and 4.
  
  Since I added a few more changes (ALL references to KEEPALIVE in the bridge
  code eliimated (I missed one earlier), I retested
  most of the above cases, and no crashes.
  
  H-extension weirdness.
  
  Current h-extension execution is not completely
  correct for several of the cases.
  
  For the case where A calls B, and A parks B, the
  'h' exten is run on A's channel as soon as the park
  is accomplished. This is expected behavior.
  
  But when A calls B, and B parks A, this will be
  current behavior:
  
  After B parks A, B is hung up by the system, and
  the 'h' (hangup) exten gets run, but the channel
  mentioned will be a derivative of A's...
  
  Thus, if A is DAHDI/1, and B is DAHDI/2,
  the h-extension will be run on channel
  Parked/DAHDI/1-1<ZOMBIE>, and the 
  start/answer/end info will be those 
  relating to Channel A.
  
  And, in the case where A is reconnected to
  B after the park time expires, when both parties
  hang up after the joyful reunion, no h-exten
  will be run at all.
  
  In the case where C picks up A from the 
  parking lot, when either A or C hang up,
  the h-exten will be run for the C channel.
  
  CDR's are a separate issue, and not addressed
  here.
  
  As to WHY this strange behavior occurs, 
  the answer lies in the procedure followed
  to accomplish handing over the channel
  to the parking manager thread. This procedure
  is called masquerading. In the process,
  a duplicate copy of the channel is created,
  and most of the active data is given to the
  new copy. The original channel gets its name
  changed to XXX<ZOMBIE> and keeps the PBX
  information for the sake of the original
  thread (preserving its role as a call 
  originator, if it had this role to begin
  with), while the new channel is without
  this info and becomes a call target (a
  "peer").
  
  In this case, the parking lot manager
  thread is handed the new (masqueraded)
  channel. It will not run an h-exten
  on the channel if it hangs up while
  in the parking lot. The h exten will
  be run on the original channel instead,
  in the original thread, after the bridge
  completes.
  
  See bug 13820 for our intentions as
  to how to clean up the h exten behavior.

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

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@166665 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-23 18:13:49 +00:00
russell 87c96dd4d0 Introduce ast_careful_fwrite() and use in AMI to prevent partial writes.
This patch introduces a function to do careful writes on a file stream which
will handle timeouts and partial writes.  It is currently used in AMI to
address the issue that has been reported.  However, there are probably a few
other places where this could be used.

(closes issue #13546)
Reported by: srt
Tested by: russell
http://reviewboard.digium.com/r/104/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@166282 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-22 17:09:36 +00:00
russell cc5fc396d5 Make a note about formatting the review URL in commit messages
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@166219 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-20 01:37:23 +00:00
mmichelson 1a28ef410a Adding a new dialplan function AUDIOHOOK_INHERIT
This function is being added as a method to allow for
an audiohook to move to a new channel during a channel
masquerade. The most obvious use for such a facility is
for MixMonitor when a transfer is performed. Prior to
the addition of this functionality, if a channel 
running MixMonitor was transferred by another party, then
the recording would stop once the transfer had completed.
By using AUDIOHOOK_INHERIT, you can make MixMonitor 
continue recording the call even after the transfer
has completed.

It has also been determined that since this is seen
by most as a bug fix and is not an invasive change,
this functionality will also be backported to 1.4 and
merged into the 1.6.0 branches, even though they are
feature-frozen.

(closes issue #13538)
Reported by: mbit
Patches:
      13538.patch uploaded by putnopvut (license 60)
	  Tested by: putnopvut

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@166092 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-19 22:26:16 +00:00
mattf e679eac279 Add configuration support for half_full DAHDI buffer policy
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@166058 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-19 21:44:18 +00:00
russell 83801fcf36 Disable some automatic links generated by doxygen.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@165886 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-19 14:48:35 +00:00
russell bd38377604 Introduce commit message formatting guidelines.
This documents the recommended outline to use for commit message.  It also
covers information on special tags that can be used in commit messages, as well
as the template functionality that is available on bugs.digium.com.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@165883 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-19 14:42:51 +00:00
russell 155014c14e Remove the need for AST_PBX_KEEPALIVE with the GoSub option from Dial.
This is part of an effort to completely remove AST_PBX_KEEPALIVE and other
similar return codes from the source.  While this usage was perfectly safe,
there are others that are problematic.  Since we know ahead of time that
we do not want to PBX to destroy the channel, the PBX API has been changed
so that information can be provided as an argument, instead, thus removing
the need for the KEEPALIVE return value.

Further changes to get rid of KEEPALIVE and related code is being done by
murf.  There is a patch up for that on review 29.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@165723 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-18 19:33:42 +00:00
eliel ce066d4df8 Remove duplicate code from the ast_str API. We now use __AST_STR_* to
access 'struct ast_str' members, but this must only be used inside the API implementation.

(closes issue #14098)
Reported by: eliel
Patches:
      ast_str.patch uploaded by eliel (license 64)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@165502 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-18 15:25:15 +00:00
tilghman 0bb7f0ce94 Add timezone to the possible fields in a timespec.
(closes issue #14028)
 Reported by: mostyn
 Patches: 
       timezone-v2.patch uploaded by mostyn (license 398)
       (with additional code guideline fixes and a memory leak fix by me - license 14)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164976 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-16 22:57:17 +00:00
mvanbaak 8e8c865414 introduce 'core show sysinfo' for systems that dont have the Linux-ish sysinfo stuff but do have sysctl.
(closes issue #13433)
Reported by: mvanbaak
Patches:
      2008121300_sysinfosysctl.diff.txt uploaded by mvanbaak (license 7)
	  with two free calls replaced with ast_free based on feedback on reviewboard
Review:
      http://reviewboard.digium.com/r/91/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-16 20:08:34 +00:00
russell e5ec2233ce Merged revisions 164736 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164736 | russell | 2008-12-16 11:06:29 -0600 (Tue, 16 Dec 2008) | 14 lines

Fix memory leak and invalid reporting issues with DEBUG_THREADLOCALS.

One issue was that the ast_mutex_* API was being used within the context of the
thread local data destructors.  We would go off and allocate more thread local data
while the pthread lib was in the middle of destroying it all.  This led to a memory 
leak.

Another issue was an invalid argument being provided to the the object_add
API call.

(closes issue #13678)
Reported by: ys
Tested by: Russell

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164737 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-16 17:14:01 +00:00
mmichelson e5c0052348 Merged revisions 164422 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164422 | mmichelson | 2008-12-15 13:53:08 -0600 (Mon, 15 Dec 2008) | 3 lines

Add the deadlock note to ast_spawn_extension as well


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164423 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15 19:53:29 +00:00
mmichelson db5a351dc0 Merged revisions 164416 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164416 | mmichelson | 2008-12-15 13:45:07 -0600 (Mon, 15 Dec 2008) | 4 lines

Add notes to autoservice and pbx doxygen regarding a potential
deadlock scenario so that it is avoided in the future


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164419 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15 19:51:24 +00:00
tilghman 0513d1771d Revert ast_str opacity in chan_sip for now, since something wasn't quite right
in the merge.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164417 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15 19:48:02 +00:00
murf 2b35a7d320 I was getting this warning during a compile
on a 64-bit machine running ubuntu server 8.10, 
and gcc-4.3.2:

   [CXXi] chan_vpb.ii -> chan_vpb.oo
cc1plus: warnings being treated as errors
In file included from /home/murf/asterisk/trunk/include/asterisk/utils.h:671,
                 from chan_vpb.cc:46:
/home/murf/asterisk/trunk/include/asterisk/strings.h: In function ‘char* ast_str_truncate(ast_str*, ssize_t)’:
/home/murf/asterisk/trunk/include/asterisk/strings.h:479: error: comparison between signed and unsigned integer expressions
make[1]: *** [chan_vpb.oo] Error 1
make: *** [channels] Error 2

which this fix silences



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164415 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15 19:42:05 +00:00
russell 05e67d6ebb Fix a couple more build issues related to ast_str_opaque
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164309 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15 17:21:38 +00:00
file 4e5ba01e6a Make app_fax compatible with newer versions of spandsp. This remains backwards compatible with earlier versions though so do not fret.
(closes issue #14073)
Reported by: seandarcy


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164257 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15 15:41:22 +00:00
tilghman c86e7bf6f4 Don't pass a negative to an unsigned type and expect things to work correctly.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164168 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-14 18:16:28 +00:00
tilghman a41b34a63c Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163991 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-13 08:36:35 +00:00
russell ee91d064cd Merged revisions 163448 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r163448 | russell | 2008-12-12 07:44:08 -0600 (Fri, 12 Dec 2008) | 26 lines

Resolve issues that could cause DTMF to be processed out of order.

These changes come from team/russell/issue_12658

1) Change autoservice to put digits on the head of the channel's frame readq 
   instead of the tail.  If there were frames on the readq that autoservice 
   had not yet read, the previous code would have resulted in out of order 
   processing.  This required a new API call to queue a frame to the head 
   of the queue instead of the tail.

2) Change up the processing of DTMF in ast_read().  Some of the problems 
   were the result of having two sources of pending DTMF frames.  There 
   was the dtmfq and the more generic readq.  Both were used for pending 
   DTMF in various scenarios.  Simplifying things to only use the frame 
   readq avoids some of the problems.

3) Fix a bug where a DTMF END frame could get passed through when it 
   shouldn't have.  If code set END_DTMF_ONLY in the middle of digit emulation,
   and a digit arrived before emulation was complete, digits would get 
   processed out of order.

(closes issue #12658)
Reported by: dimas
Tested by: russell, file
Review: http://reviewboard.digium.com/r/85/

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163449 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-12 13:55:30 +00:00
mvanbaak 1c65c0fc8d add tab completion for 'core set debug X filename.c'
(closes issue #13969)
Reported by: jtodd
Patches:
      20081205__bug13969.diff.txt uploaded by Corydon76 (license 14)
Tested by: mvanbaak, eliel


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@162687 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-10 17:09:15 +00:00
kpfleming 4fbfb9c338 it does help if the compiler attribute syntax is correct
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@162488 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-09 23:41:02 +00:00
russell 8571cda31e Add some additional Asterisk project developer documentation.
After the nightly update of the documentation on asterisk.org, I'll post 
an update to asterisk-dev with a pointer to the changes.  This covers some
release branch and commit policy information.  None of this should be a
surprise, since it's just documenting what we have already been doing.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@162418 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-09 22:38:41 +00:00
russell 78f46b1cdb Merged revisions 162413 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r162413 | russell | 2008-12-09 16:17:39 -0600 (Tue, 09 Dec 2008) | 8 lines

Remove the test_for_thread_safety() function completely.

The test is not valid.  Besides, if we actually suspected that recursive
mutexes were not working, we would get a ton of LOG_ERROR messages when
DEBUG_THREADS is turned on.

(inspired by a discussion on the asterisk-dev list)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@162414 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-09 22:25:06 +00:00
murf 7806fa9c29 Merged revisions 162013 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r162013 | murf | 2008-12-09 09:31:55 -0700 (Tue, 09 Dec 2008) | 45 lines

(closes issue #14019)
Reported by: ckjohnsonme
Patches:
      14019.diff uploaded by murf (license 17)
Tested by: ckjohnsonme, murf

This crash was the result of a few small errors that
would combine in 64-bit land to result in a crash.

32-bit land might have seen these combine to mysteriously
drop the args to an application call, in certain
circumstances.

Also, in trying to find this bug, I spotted
a situation in the flex input, where, in passing
back a 'word' to the parser, it would allocate
a buffer larger than necessary. I changed the
usage in such situations, so that strdup was
not used, but rather, an ast_malloc, followed
by ast_copy_string.

I removed a field from the pval struct, in
u2, that was never getting used, and set in
one spot in the code. I believe it was an
artifact of a previous fix to make switch
cases work invisibly with extens.

And, for goto's I removed a '!' from
before a strcmp, that has been there
since the initial merging of AEL2, that
might prevent the proper target of a 
goto from being found. This was pretty
harmless on its own, as it would just
louse up a consistency check for users.

Many thanks to ckjohnsonme for providing
a simplified and complete set of information
about the bug, that helped considerably in
finding and fixing the problem.

Now, to get aelparse up and running again
in trunk, and out of its "horribly broken" state,
so I can run the regression suite!


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@162079 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-09 17:18:03 +00:00
seanbright d12397a531 Merged revisions 161426 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
  r161426 | seanbright | 2008-12-05 16:02:20 -0500 (Fri, 05 Dec 2008) | 15 lines
  
  Merged revisions 161421 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.2
  
  ........
    r161421 | seanbright | 2008-12-05 15:50:23 -0500 (Fri, 05 Dec 2008) | 8 lines
    
    Fix build errors on FreeBSD (uint -> unsigned int).
    
    (closes issue #14006)
    Reported by: alphaque
    Patches:
          astobj2.h-patch uploaded by alphaque (license 259)
          (Slightly modified by seanbright)
  ........
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@161427 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-05 21:08:43 +00:00
tilghman ad1d52df72 Merged revisions 160207 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r160207 | tilghman | 2008-12-01 18:25:16 -0600 (Mon, 01 Dec 2008) | 3 lines
  
  Ensure that Asterisk builds with --enable-dev-mode, even on the latest gcc
  and glibc.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@160208 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-02 00:37:21 +00:00
eliel c3bceb968b Introduce CLI permissions.
Based on cli_permissions.conf configuration file, we are able to permit or deny
cli commands based on some patterns and the local user and group running rasterisk.

(Sorry if I missed some of the testers).

Reviewboard: http://reviewboard.digium.com/r/11/

(closes issue #11123)
Reported by: eliel
Tested by: eliel, IgorG, Laureano, otherwiseguy, mvanbaak



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@160062 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-01 18:52:14 +00:00
kpfleming 246ce365ae incorporates r159808 from branches/1.4:
------------------------------------------------------------------------
r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines

update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors

since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them

format attributes in a consistent way


------------------------------------------------------------------------

in addition:

move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159818 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-29 17:57:39 +00:00
kpfleming 4d88cfdab5 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: http://svn.digium.com/svn/asterisk/trunk@159631 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-26 21:20:50 +00:00
tilghman a836c3d93b Add an option, waitfordialtone, for UK analog lines which do not end a call
until the originating line hangs up.
(closes issue #12382)
 Reported by: one47
 Patches: 
       zap-waitfordialtone-trunk.080901.patch uploaded by one47 (license 23)
       zap-waitfordialtone-bra-1.4.21.2.patch uploaded by fleed (license 463)
 Tested by: fleed


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159317 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-25 22:45:59 +00:00
tilghman 5d1e952b32 Merged revisions 159025 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r159025 | tilghman | 2008-11-24 22:50:00 -0600 (Mon, 24 Nov 2008) | 3 lines
  
  System call ioperm is non-portable, so check for its existence in autoconf.
  (Closes issue #13863)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159050 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-25 05:02:11 +00:00
seanbright 3ce5f8f4ee This is basically a complete rollback of r155401, as it was determined that
it would be best to maintain API compatibility.  Instead, this commit introduces
ao2_callback_data() which is functionally identical to ao2_callback() except
that it allows you to pass arbitrary data to the callback.

Reviewed by Mark Michelson via ReviewBoard:
	http://reviewboard.digium.com/r/64


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158959 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-25 01:01:49 +00:00
mnicholson 56aff74a07 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: http://svn.digium.com/svn/asterisk/trunk@158876 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-24 21:56:22 +00:00
russell 548100202d Merged revisions 158539 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r158539 | russell | 2008-11-21 16:05:55 -0600 (Fri, 21 Nov 2008) | 2 lines

When compiling with DEBUG_THREADS, report the real file/func/line for ao2_lock/ao2_unlock

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158540 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-21 22:12:37 +00:00
mmichelson 55c8679f51 Merged revisions 158072 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r158072 | twilson | 2008-11-20 11:48:58 -0600 (Thu, 20 Nov 2008) | 2 lines

Begin on a crusade to end trailing whitespace!

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158133 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-20 18:20:00 +00:00
mmichelson 0478a270ed Merge the changes from the res_timing_timerfd branch.
This provides a new timing interface. In order to use it,
you must be running a Linux with a kernel version of
2.6.25 or newer and glibc 2.8 or newer.

This timing interface is a good alternative if a timing
source is necessary (e.g. for IAX trunking) but DAHDI is
otherwise unnecessary for the system.

For now, this commit contains the actual work done in the
res_timing_timerfd branch. There are no notices in the README
or CHANGES files yet, but they will be added in my next commit.

The timing API of Asterisk also needs to have a bit of work done
with regards to choosing which timing interface to use. This commit
makes the choice a build-time decision, by only allowing one of
the timer interfaces to be chosen in menuselect. It would be preferable
if the choice could be made at run-time, however. The preferred timing
interface could be loaded and tested, and if it does not work, choice
number two may be used instead. That sort of thing. That is beyond
the scope of work in this branch though.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@157820 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-19 19:37:32 +00:00
kpfleming 7ad42d39db 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: http://svn.digium.com/svn/asterisk/trunk@157706 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-19 12:42:19 +00:00
tilghman 6e814d6644 Starting with a change to ensure that ast_verbose() preserves ABI compatibility
in 1.6.1 (as compared to 1.6.0 and versions of 1.4), this change also
deprecates the use of Asterisk with FreeBSD 4, given the central use of va_copy
in core functions.  va_copy() is C99, anyway, and we already require C99 for
other purposes, so this isn't really a big change anyway.  This change also
simplifies some of the core ast_str_* functions.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@157639 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-19 01:02:45 +00:00
mmichelson 135ce47598 Merged revisions 157305 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r157305 | mmichelson | 2008-11-18 12:25:55 -0600 (Tue, 18 Nov 2008) | 12 lines

Fix a crash in the end_bridge_callback of app_dial and
app_followme which would occur at the end of an attended
transfer. The error occurred because we initially stored
a pointer to an ast_channel which then was hung up due
to a masquerade.

This commit adds a "fixup" callback to the bridge_config
structure to allow for end_bridge_callback_data to be
changed in the case that a new channel pointer is needed
for the end_bridge_callback.


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@157306 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-18 18:31:08 +00:00
mmichelson 8bbcf78384 Fix some refcounting in app_queue.c and change the
hashing used by app_queue.c to be case-insensitive.
This is accomplished by adding a new case-insensitive
hashing function.

This was necessary to prevent bad refcount errors
(and potential crashes) which would occur due to the
fact that queues were initially read from the config
file in a case-sensitive manner. Then, when a user
issued a CLI command or manager action, we allowed
for case-insensitive input and used that input to 
directly try to find the queue in the hash table. The result
was either that we could not find a queue that was input or
worse, we would end up hashing to a completely bogus value
based on the input.

This commit resolves the problem presented in
issue #13703. However, that issue was reported against
1.6.0. Since this fix introduces a behavior change, I am
electing to not place this same fix in to the 1.6.0 or 1.6.1
branches, and instead will opt for a change which does not
change behavior.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156883 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-14 16:53:38 +00:00
eliel 28bb0c48be Remove trailing whitespaces
using ':%s/\s\+$//' pointed by seanbright on #asterisk-dev


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156535 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-13 13:08:34 +00:00
mvanbaak e005e919bd 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: http://svn.digium.com/svn/asterisk/trunk@156120 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-12 06:46:04 +00:00
eliel f4ab4abaf3 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: http://svn.digium.com/svn/asterisk/trunk@156051 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-12 00:17:43 +00:00
kpfleming ed1b8e4ade use some fancy compiler magic (thanks to Matthew Woehlke on the gcc-help mailing list) to restore type-safety to S_OR by going back to a macro, but preserve the side-effect-safe usage of the macro arguments
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155967 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-11 17:57:20 +00:00
eliel d3011dda43 Move all the XML documentation API from pbx.c to xmldoc.c.
Export the XML documentation API:
   ast_xmldoc_build_synopsis()
   ast_xmldoc_build_syntax()
   ast_xmldoc_build_description()
   ast_xmldoc_build_seealso()
   ast_xmldoc_build_arguments()
   ast_xmldoc_printable()
   ast_xmldoc_load_documentation()



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155711 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-10 13:53:23 +00:00
seanbright 2034723f38 In order to move away from nested function use, some changes to the recently introduced
ast_channel_search_locked need to be made.  Specifically, the caller needs to be able to
pass arbitrary data which in turn is passed to the callback.  This patch addresses all
of the nested functions currently in asterisk trunk.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155590 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-09 01:59:59 +00:00
seanbright 70ff546e20 Merged revisions 155553 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r155553 | seanbright | 2008-11-08 20:08:07 -0500 (Sat, 08 Nov 2008) | 6 lines

Use static functions here instead of nested ones.  This requires a small
change to the ast_bridge_config struct as well.  To understand the reason
for this change, see the following post:

    http://gcc.gnu.org/ml/gcc-help/2008-11/msg00049.html

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155554 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-09 01:27:00 +00:00
russell cd55da2a78 - Check for failure when putting the packet in the ast_str
- fix a spelling error in a header file


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155516 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-08 21:46:43 +00:00
seanbright a7a95954c8 Add ability to pass arbitrary data to the ao2_callback_fn (called from
ao2_callback and ao2_find).  Currently, passing OBJ_POINTER to either
of these mandates that the passed 'arg' is a hashable object, making
searching for an ao2 object based on outside criteria difficult.

Reviewed by Russell and Mark M. via ReviewBoard:
    http://reviewboard.digium.com/r/36/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155401 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-07 22:39:30 +00:00
seanbright 8e17ba0b0b Convert open-coded linked list in indications to the AST_LIST_* macros. This
cleans the code up some and should make it more maintainable as time goes on.

Reviewed by Russell, Kevin, Mark M., and Tilghman via ReviewBoard:
	http://reviewboard.digium.com/r/34/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155284 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-07 16:18:52 +00:00
russell dc12f815e9 Clarify which part of OBJ_MULTIPLE is not implemented, and under what case it
is perfectly fine to use.  (Inspired by a question I received about my last
commit.)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155244 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-07 15:01:02 +00:00
kpfleming 4cdc4dd884 make S_OR and S_COR safe to use even if the parameters are function calls or have side effects. it still bothers me that these are called S_OR and not something like ast_string_or, but that's water over the bridge
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155079 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-06 21:09:24 +00:00
seanbright 8b5c11ae52 Fix a problem found while building res_snmp.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154919 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-05 22:01:22 +00:00
tilghman 7c5853a25d Add LISTFILTER dialplan function, along with supporting documentation. See
documentation for more information on how to use it.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154915 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-05 21:58:48 +00:00
mattf 2e86ed61ac Make compilation of chan_dahdi so that it does not require the new pri_progress_with_cause function to have libpri support work.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154875 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-05 20:45:03 +00:00
seanbright 1a38e697db Introduce a new API call ast_channel_search_locked, which iterates through the
channel list calling a caller-defined callback.  The callback returns non-zero
if a match is found.  This should speed up some of the code that I committed
earlier today in chan_sip (which is also updated by this commit).

Reviewed by russellb and kpfleming via ReviewBoard:
	http://reviewboard.digium.com/r/28/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154429 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-04 23:23:39 +00:00
tilghman cf7ea76646 Slightly optimize ast_devstate_str and rename global functions devstate2str and config_text_file_save to have an ast_ prefix
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154260 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-04 18:47:20 +00:00
kpfleming f2d5a34825 instead of trying to forcibly load res_agi when app_stack is loaded (even if the administrator didn't want it loaded), use GCC weak symbols to determine whether it was loaded already or not; if it was loaded, then use it.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153709 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02 23:34:39 +00:00
russell 01fbd4a8fe Merged revisions 153651 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r153651 | russell | 2008-11-02 13:51:17 -0600 (Sun, 02 Nov 2008) | 2 lines

features.h depends on linkedlists.h, so include it

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153652 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02 20:06:03 +00:00
russell b1f91b97d2 Merge changes from team/group/appdocsxml
This commit introduces the first phase of an effort to manage documentation of the
interfaces in Asterisk in an XML format.  Currently, a new format is available for
applications and dialplan functions.  A good number of conversions to the new format
are also included.

For more information, see the following message to asterisk-dev:

http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153365 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-01 21:10:07 +00:00
mmichelson 9bc20020f1 * Fixed timeout logic in the dialing API as setting timeouts
had no effect
* Updated dialing API documentation to indicate that timeouts
  are specified in milliseconds
* Added a new timeout argument to the Page application. If time
  expires, any endpoints which have not answered will be hung up.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153223 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-31 20:05:46 +00:00
twilson b417a0a687 Recent CDR fixes moved execution of the 'h' exten into the bridging code, so variables that were set after ast_bridge_call was called would not show up in the 'h' exten. Added a callback function to handle setting variables, etc. from w/in the bridging code. Calls back into a nested function within the function calling ast_bridge_call
(closes issue #13793)
Reported by: greenfieldtech


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153181 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-31 18:55:33 +00:00
russell ac217589d1 Add a todo for a new timing API implementation that would work for Linux systems
as of kernel 2.6.25 and glibc 2.8


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@152990 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-30 20:46:17 +00:00
russell cebbff12f7 Fix a bug in AST_SCHED_REPLACE_UNREF(). The reference count of the object
_must_ be increased before creating the scheduler entry.  Otherwise, you
create a race condition where the reference count may hit zero and the
object can disappear out from under you.  This could also would have
incorrectly decreased the reference count in the case that the scheduler
add failed.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@152887 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-30 19:28:06 +00:00
kpfleming 20b9710bbf try to get this committed before the buildbot complains about a broken tree
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@152810 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-30 16:53:11 +00:00
murf 6d700c596a Merged revisions 152535 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r152535 | murf | 2008-10-28 22:36:32 -0600 (Tue, 28 Oct 2008) | 46 lines

The magic trick to avoid this crash is not to
try to find the channel by name in the list,
which is slow and resource consuming, but rather
to pay attention to the result codes from the
ast_bridge_call, to which I added the 
AST_PBX_NO_HANGUP_PEER_PARKED value, which
now are returned when a channel is parked.
Why? because CDR's aren't generated via parking,
so nothing is needed, but if a transfer occurred,
there are critical things I need.

If you get AST_PBX_KEEPALIVE,
then don't touch the channel pointer.

If you get AST_PBX_NO_HANGUP_PEER, or
AST_PBX_NO_HANGUP_PEER_PARKED, then don't
touch the peer pointer.

Updated the several places where the results
from a bridge were not being properly obeyed,
and fixed some code I had introduced so that
the results of the bridge were not overridden 
(in trunk).

All the places that previously tested for 
AST_PBX_NO_HANGUP_PEER now have to check for
both AST_PBX_NO_HANGUP_PEER and AST_PBX_NO_HANGUP_PEER_PARKED.

I tested this against the 4 common parking
scenarios:


1. A calls B; B answers; A parks B; B hangs up while A is getting the parking
slot announcement, immediately after being put on hold.

2. A calls B; B answers; A parks B; B hangs up after A has been hung up, but
before the park times out.

3. A calls B; B answers; B parks A; A hangs up while B is getting the parking slot announcement, immediately after being put on hold.

4. A calls B; B answers; B parks A; A hangs up after B has been hung up, but before the park times out.


No crash.

I also ran the scenarios above against valgrind, and accesses looked good.



........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@152536 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-29 05:01:00 +00:00
kpfleming 2b799006a1 cleaup of the TCP/TLS socket API:
1) rename 'struct server_args' to 'struct ast_tcptls_session_args', to follow coding guidelines

2) make ast_make_file_from_fd() static and rename it to something that indicates what it really is for (again coding guidelines)

3) rename address variables inside 'struct ast_tcptls_session_args' to be more descriptive (dare i say it... coding guidelines)

4) change ast_tcptls_client_start() to use the new 'remote_address' field of the session args for the destination of the connection, and use the 'local_address' field to bind() the socket to the proper source address, if one is supplied

5) in chan_sip, ensure that we pass in the PP address we are bound to when creating outbound (client) connections, so that our connections will appear from the correct address



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@151101 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-19 19:11:28 +00:00
qwell ba0313e902 Merge codec_consistency branch. This should make sample usage much happier.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@150729 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-17 21:35:23 +00:00
tilghman fac48f7769 Fix the FRACK! warnings in chan_iax2 when POKE/LAGRQ packets are not answered.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@150580 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-17 16:34:29 +00:00
mmichelson ba8b55f86d Merged revisions 149204 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r149204 | mmichelson | 2008-10-14 18:00:01 -0500 (Tue, 14 Oct 2008) | 12 lines

Add a tolerance period for sync-triggered audiohooks
so that if packetization of audio is close (but not equal)
we don't end up flushing the audiohooks over small
inconsistencies in synchronization.

Related to issue #13005, and solves the issue
for most people who were experiencing the problem.
However, a small number of people are still experiencing
the problem on long calls, so I am not closing
the issue yet


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@149205 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-14 23:04:44 +00:00
tilghman 6c7d8c95df Add additional memory debugging to several core APIs, and fix several memory
leaks found with these changes.
(Closes issue #13505, closes issue #13543)
Reported by: mav3rick, triccyx
 Patches: 
       20081001__bug13505.diff.txt uploaded by Corydon76 (license 14)
 Tested by: mav3rick, triccyx


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@149199 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-14 22:38:06 +00:00
tilghman 4d59ca2641 Merge realtime_update2 branch, which adds a new realtime API call named
'update2', which permits updates which match across multiple columns, instead
of requiring all tables to have a single unique identifier.  All of the other
API calls with the exception of 'update' already had the ability to match on
multiple fields, so it was a missing and very desireable feature that an API
call implementing an update should have this, too.

This does not change any outward performance of Asterisk, but it should make
life easier for application developers who use the RealTime framework.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@148570 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-14 00:08:52 +00:00
seanbright 246755e0d4 Don't include logger.h in asterisk.h by default as it is causing problems building
app_voicemail.  Instead, include it where it is needed.  This turned out to be a
relatively minor issue because other headers include logger.h as well.

Need to test -addons before merging this back to 1.6.0.

(closes issue #13605)
Reported by: tomo1657
Patches: 
      13605_seanbright.diff uploaded by seanbright (license 71)
Tested by: mmichelson


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@148200 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-10 00:42:13 +00:00
mvanbaak c502494115 only include this for OpenBSD. At least FreeBSD is borked when including it
(closes issue #13649)
Reported by: ys


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147899 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-09 17:48:53 +00:00
murf 6499c3c6d4 (closes issue #13557)
Reported by: nickpeirson
Patches:
      pbx.c.patch uploaded by nickpeirson (license 579)
      replace_bzero+bcopy.patch uploaded by nickpeirson (license 579)
Tested by: nickpeirson, murf

1. replaced all refs to bzero and bcopy to memset and memmove instead.
2. added a note to the CODING-GUIDELINES
3. add two macros to asterisk.h to prevent bzero, bcopy from creeping
   back into the source
4. removed bzero from configure, configure.ac, autoconfig.h.in




git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147807 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-09 14:17:33 +00:00
tilghman c77eb286d6 Allow people to select the old console behavior of white text on a black
background, by using the startup flag '-B'.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147262 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-07 17:44:32 +00:00
tilghman e41ed2002e Update documentation; AST_THREADSTORAGE() in trunk only takes a single
argument.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146928 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06 23:21:02 +00:00
mvanbaak 7c30763fbe All ODBC parts can now use either unixodbc or iodbc.
This allows for the ODBC parts to work on OpenBSD as well.

99.99% of the work is done by seanbright (bow, bow) and I actually
did nothing but test and yell at him that it still didn't work :)

Thanks for helping out !


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146925 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06 23:14:33 +00:00
jpeeler 99e4818e3c Similar to r143204, masquerade the channel in the case of Park being called from AGI.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146923 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06 23:08:21 +00:00
jpeeler 614cb88aef Mvanbaak said this was needed to compile on OpenBSD, so put it in the OpenBSD section.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146920 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06 22:59:58 +00:00
mvanbaak 6d1e5af1b5 make aescrypt.c compile on OpenBSD again
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146807 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06 21:18:13 +00:00