Commit Graph

1206 Commits

Author SHA1 Message Date
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
Steve Murphy a40f1cc1c5 Merged revisions 136726 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r136726 | murf | 2008-08-07 18:15:34 -0600 (Thu, 07 Aug 2008) | 32 lines


(closes issue #13236)
Reported by: korihor

Wow, this one was a challenge!

I regrouped and ran a new strategy for
setting the ~~MACRO~~ value; I set it once
per extension, up near the top. It is only
set if there is a switch in the extension.

So, I had to put in a chunk of code to detect
a switch in the pval tree.

I moved the code to insert the set of ~~exten~~
up to the beginning of the gen_prios routine, 
instead of down in the switch code.

I learned that I have to push the detection
of the switches down into the code, so everywhere
I create a new exten in gen_prios, I make sure
to pass onto it the values of the mother_exten
first, and the exten next.

I had to add a couple fields to the exten
struct to accomplish this, in the ael_structs.h
file. The checked field makes it so we don't
repeat the switch search if it's been done.

I also updated the regressions.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-08 00:48:35 +00:00
Olle Johansson a4436cb2ff - Formatting
- Changing debug messages from VERBOSE to DEBUG channel
- Adding a few todo's
- Adding a few more "XMPP"'s to compliment Jabber...



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136005 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-06 13:34:08 +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 aca394bf0c HTTP module memory leaks
(closes issue #13230)
 Reported by: eliel
 Patches: 
       res_http_post_leak.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@135476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-04 16:34:04 +00:00
Terry Wilson 671627028c Fix mime parsing by re-adding support for passing headers to callback functions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@135235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-01 21:56:07 +00:00
Tilghman Lesher e682d4c67e Switch command order, to meet with current specs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@134977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-31 21:53:59 +00:00
Tilghman Lesher 52b2aeb679 Increase column size beyond the minimum required, since PostgreSQL won't let
us modify existing columns.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@134925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-31 20:10:39 +00:00
Tilghman Lesher c4131d9752 Two errors:
1) If a function returns SQLITE_LOCKED, no recovery is possible.
	2) An error message can be allocated, even when no error is signalled.
(closes issue #13109)
 Reported by: gknispel_proformatique


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@134919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-31 19:43:02 +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
Tilghman Lesher 57ffc548bc Add adaptive capabilities to the sqlite realtime driver
(closes issue #13097)
 Reported by: gknispel_proformatique
 Patches: 
       20080730__bug13097.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@134442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-30 17:32:28 +00:00
Michiel van Baak fe246aa673 fix a couple of comments in sqlite resource driver.
(closes issue #13110)
Reported by: gknispel_proformatique
Patches:
      res_config_sqlite_comments.patch uploaded by gknispel (license 261)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-19 10:46:12 +00:00
Tilghman Lesher 941599ce64 Fix memory leaks
(closes issue #13099)
 Reported by: gknispel_proformatique
 Patches: 
       res_config_sqlite_leak_on_error.patch uploaded by gknispel (license 261)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-17 18:36:34 +00:00
Tilghman Lesher 38f7641c93 Fix memory leak.
(Closes issue #13096)
Reported by gknispel_proformatique


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-17 15:45:25 +00:00
Mark Michelson 255a968023 Don't try to dereference the dbfile pointer if
we know that it's NULL.

(closes issue #13092)
Reported by: gknispel_proformatique
Patches:
      trunk_sqlite_check_vars_null.patch uploaded by gknispel (license 261)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-16 19:57:02 +00:00
Steve Murphy 37001f58ff Merged revisions 131242 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r131242 | murf | 2008-07-16 11:53:43 -0600 (Wed, 16 Jul 2008) | 19 lines

(closes issue #13090)
Reported by: murf

The problem was that, esoteric as it is, because the hangerupper
context immediately preceded the std-priv-extent macro, that 
the checking code accidentally would fall from traversing hangerupper
into the std-priv-exten macro, where it would hit the hangerupper
in the 'includes', and proceed into an infinite recursion.

A small fix to traverse into the statements of the context instead
of the context solves this issue.

I also added some commented out printfs for debug, which were pretty
handy in the face of a dorky gdb.

This was a problem around since the package was first written;
but evidently pretty rare in turning up in the field.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-16 17:59:33 +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
Michiel van Baak 0d49cdae3e Make all sed calls Posix sed compatible.
To make sure nobody commits script-modified files we first make a backup
of asterisk.tex, run the script, generate the pdf and / or html,
and put the original asterisk.tex back.
This will guard us for the stuff that happened before that someone committed 
a locally modified asterisk.tex, with changes done by this script.

(closes issue #13062)
Reported by: mvanbaak
Patches:
      sed_without-i-v3.diff uploaded by mvanbaak (license 7)
Tested by: mvanbaak

Feedback from Corydon. Thanks for taking the time to go through this.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-13 23:14:03 +00:00
Steve Murphy b247dcf432 a small change to make things compile
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 21:50:21 +00:00
Tilghman Lesher caf226d50e Don't copy on NULL.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 19:56:34 +00:00
Tilghman Lesher bead8cd6f0 Add some debug code and add a missing release
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 19:53:38 +00:00
Sean Bright 729df81a57 Fix some usages of snprintf, and clarify a couple variable names.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 00:55:06 +00:00
Tilghman Lesher 8b0f38cc57 Merged revisions 129741 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r129741 | tilghman | 2008-07-10 16:19:48 -0500 (Thu, 10 Jul 2008) | 2 lines

Oops

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-10 21:23:23 +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
Brett Bryant d185405755 Janitor project to convert sizeof to ARRAY_LEN macro.
(closes issue #13002)
Reported by: caio1982
Patches:
      janitor_arraylen5.diff uploaded by caio1982 (license 22)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 16:40:28 +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
Tilghman Lesher 638a720eee Add AMI events for start/stop of MOH
(closes issue #12909)
 Reported by: chris-mac
 Patches: 
       res_musiconhold-event.patch uploaded by chris-mac (license 506)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 21:21:26 +00:00
Kevin P. Fleming 00696f5f37 make the AIS checking a little more generic, and have a more useful configure script command line option for OpenAIS
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 17:22:47 +00:00
Philippe Sultan e08829764c Fix a compile time error that occurs if OpenSSL is not installed. Reported by Noel Morais on the users mailing list
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-27 07:28:17 +00:00
Russell Bryant 02b1317d0f - add get_max_rate timing API call
- change ast_settimeout() to honor max rate in edge cases of file playback
  (this will make some warning messages go away at the end of playing back
   a file)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-26 15:37:01 +00:00
Kevin P. Fleming b71f8ac66a fix compile failure found by buildbot (go, buildbot!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-26 12:09:24 +00:00
Kevin P. Fleming fd4a60c459 Merged revisions 125132 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r125132 | kpfleming | 2008-06-25 17:21:30 -0500 (Wed, 25 Jun 2008) | 10 lines

allow tonezone to live in a different place than DAHDI/Zaptel, since dahdi-tools and dahdi-linux are now separate packages and can be installed in different places

don't include tonezone.h in dahdi_compat.h, because only a couple of modules need it

get app_rpt building again after the DAHDI changes

(closes issue #12911)
Reported by: tzafrir


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-25 23:05:28 +00:00
Tilghman Lesher 41e496980b Separate the global initialization routines for cURL into its own separate
module.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-25 16:00:54 +00:00
Philippe Sultan 6be95a8a8a Subscribe to buddy's presence only if we really need to. That is, if
the corresponding roster item has a subscription value set to "none"
or "from".

Make the code more readable.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-24 17:50:22 +00:00
Philippe Sultan c8688bd9b2 Code simplification
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-24 17:28:39 +00:00
Russell Bryant ed289fd3aa fix a memory leak.
(inspired by, and potentially fixes issue #12917)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-24 02:16:59 +00:00
Tilghman Lesher 0660207614 Reduce warning to debug, otherwise we flood the log when we (legitimately)
can't find a record.
(Closes issue #12908)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-21 12:53:48 +00:00
Michiel van Baak 8e8359465b Older versions of GNU gcc do not allow 'NULL' as sentinel.
They want (char *)NULL as sentinel.
An example is OpenBSD (confirmed on 4.3) that ships with gcc 3.3.4

This commit introduces a contstant SENTINEL which is declared as:
#define SENTINEL ((char *)NULL)

All places I could test compile on my openbsd system are converted.
Update CODING-GUIDELINES to tell about this constant.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 20:48:33 +00:00
Russell Bryant fa4bce7c43 - Make res_timing_pthread allow a max rate of 100/sec instead of 50/sec
- change the "timing test" CLI command to let you specify a timing rate to test


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 18:30:49 +00:00
Tilghman Lesher 5791b6680d Don't change pointers that need to be later passed back for deallocation.
(closes issue #12572)
 Reported by: flyn
 Patches: 
       20080613__bug12572.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 17:22:27 +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
Russell Bryant 5aeb6a6cbb Fix the check against the max supported rate
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-17 19:00:14 +00:00
Russell Bryant 9a301b9f20 Merge res_timing_pthread. This is a timing interface for Asterisk that
does not require DAHDI.  It's called "pthread" because it uses a pthread
API call in the timing thread for sleeping and ensuring we wake up at
an appropriate time.  I wasn't sure what else to call it.  :)

The timing API requires a file descriptor that can be polled on.  So,
when you open a timer, this module creates a pipe and returns the read
end of the pipe.  There is a background thread that wakes up every 10ms
and checks to see if any of the currently open timers need a 'tick' and
writes to the appropriate pipe.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 13:08:13 +00:00
Tilghman Lesher 4d322f7bd3 Properly detect the size of char/varchar fields
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-13 21:50:28 +00:00
Russell Bryant 3c8b9bc6c4 Do not allow res_timing_dahdi to be unloaded. We can re-enable this once we
add automatic use count handling for timing modules.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-13 12:53:08 +00:00
Russell Bryant b6457ecf4c Merge changes from timing branch
- Convert chan_iax2 to use the timing API
 - Convert usage of timing in the core to use the timing API instead of
   using DAHDI directly
 - Make a change to the timing API to add the set_rate() function
 - change the timing core to use a rwlock
 - merge a timing implementation, res_timing_dahdi

Basic testing was successful using res_timing_dahdi


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-13 12:45:50 +00:00
Jeff Peeler ef3b214728 Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 17:27:55 +00:00
Tilghman Lesher 97fe3abeec Move the table cache routines to res_odbc, so they can be used from other
places (app_voicemail, for example).
(Related to bug #11678)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 21:14:58 +00:00
Russell Bryant e9d72e0cb2 Merge another big set of changes from team/russell/events
This commit merges in the rest of the code needed to support distributed device
state.  There are two main parts to this commit.

Core changes:
 - The device state handling in the core has been updated to understand device
   state across a cluster of Asterisk servers.  Every time the state of a device
   changes, it looks at all of the device states on each node, and determines the
   aggregate device state.  That resulting device state is what is provided to
   modules in Asterisk that take actions based on the state of a device.

New module, res_ais:
 - A module has been written to facilitate the communication of events between
   nodes in a cluster of Asterisk servers.  This module uses the SAForum AIS
   (Service Availability Forum Application Interface Specification) CLM and EVT
   services (Cluster Management and Event) to handle this task.  This module
   currently supports sharing Voicemail MWI (Message Waiting Indication) and
   device state events between servers.  It has been tested with openais, though
   other implementations of the spec do exist.

For more information on testing distributed device state, see the following doc:
  - doc/distributed_devstate.txt


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 15:12:17 +00:00
Tilghman Lesher 53459f86b2 Expand RQ_INTEGER type out to multiple types, one for each precision
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-09 22:51:59 +00:00
Tilghman Lesher 9471b87d27 Merge the adaptive realtime branch, which will make adding new required fields
to realtime less painful in the future.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-05 19:07:27 +00:00
Philippe Sultan 6bb4c9cde0 Merged revisions 120675 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r120675 | phsultan | 2008-06-05 18:56:15 +0200 (Thu, 05 Jun 2008) | 2 lines

Ignore appended resource when comparing JIDs.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-05 17:02:39 +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
Steve Murphy 7372474c94 Merged revisions 119929 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r119929 | murf | 2008-06-03 08:49:46 -0600 (Tue, 03 Jun 2008) | 16 lines

as per http://lists.digium.com/pipermail/asterisk-users/2008-June/212934.html,
which is a message from Philipp Kempgen, requesting that the WARNING
that an extension is empty be reduced to a NOTICE or less, as empty
extensions are syntactically possible, and no big deal.

With which I agree, and have removed that WARNING message entirely.
I think it is not necessary to see this message. It didn't 
state that a NoOp() was inserted automatically on your behalf,
and really, as users, who cares? Why freak out dialplan writers
with unnecessary warnings? The details of the machinations a compiler goes
thru to produce working assembly code is of little interest
to most programmers-- we will follow the unix principal of
doing our work silently.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-03 15:07:20 +00:00
Philippe Sultan 001c95b595 Do not link the guest account with any configured XMPP client (in
jabber.conf). The actual connection is made when a call comes in
Asterisk.

Apply this fix to Jingle too.

Fix the ast_aji_get_client function that was not able to retrieve an
XMPP client from its JID.

(closes issue #12085)
Reported by: junky
Tested by: phsultan


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-02 14:35:24 +00:00
Tilghman Lesher 6006f40c14 When binding anonymously, credentials are still needed.
(closes issue #12601)
 Reported by: suretec
 Patches: 
       res_config_ldap.c.patch uploaded by suretec (license 70)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 13:30:10 +00:00
Tilghman Lesher ebb4ba3b9a Protect the object from changing while the 'odbc show' CLI command is running
(Closes issue #12704)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-23 18:09:14 +00:00
Philippe Sultan de98d48a0d - remove whitespaces between tags in received XML packets before giving
them to the parser ;
- report Gtalk error messages from a buddy to the console.

This patch makes Asterisk "Google Jingle" (chan_gtalk) implementation
work with Empathy. Note that this is only true for audio streams, not
video.

Thank you to PH for his great help!

(closes issue #12647)
Reported by: PH
Patches:
      trunk-12647-1.diff uploaded by phsultan (license 73)
Tested by: phsultan, PH

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-23 10:33:21 +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 6353bddc57 Increase limit of unshared connections from 1023 to 4.2 billion.
(Related to issue #12677)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-20 16:25:16 +00:00
Tilghman Lesher 01e2bd1e2f Revert part of previous fix, and heavily comment the logic for object
destruction, for future users.
(Closes issue #12677)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-20 16:13:48 +00:00
Joshua Colp a5cb416c86 Merged revisions 117135 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r117135 | file | 2008-05-19 13:50:52 -0300 (Mon, 19 May 2008) | 6 lines

Use the right pthread lock and condition when waiting.
(closes issue #12664)
Reported by: tomo1657
Patches:
      res_smdi.c.patch uploaded by tomo1657 (license 484)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-19 16:53:33 +00:00
Joshua Colp 872eaba11d Remove a premature mutex destroy (the destruction callback will end up destroying it) and use a callback to purge remaining classes.
(closes issue #12677)
Reported by: falves11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-19 16:22:56 +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
Joshua Colp ac876a8e4e Make the ldap version setting work without having both version and protocol set.
(closes issue #12613)
Reported by: suretec


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 18:25:54 +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
Russell Bryant dcbc0aab3f Initialize the start time in smdi_msg_wait. Somehow this code got lost in trunk.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-13 17:14:22 +00:00
Tilghman Lesher 842df68a1f Don't free the object on destroy, as astobj2 takes care of that for you
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-07 18:40:21 +00:00
Russell Bryant 60f877ad5f Only save a password if a username exists.
(closes issue #12600)
Reported By: suretec
Patch by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-07 18:33:50 +00:00
Russell Bryant aeb41dbdf4 Use the default that the log output claims will be used for the basedn
(closes issue #12599)
Reported by: suretec
Patches:
      12599.patch uploaded by juggie (license 24)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-07 18:30:12 +00:00
Jason Parker d63b790247 Merged revisions 115418 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r115418 | qwell | 2008-05-06 14:34:58 -0500 (Tue, 06 May 2008) | 7 lines

Switch to using ast_random() rather than just rand().
This does not fix the bug reported, but I believe it is correct.

(from issue #12446)
Patches:
      bug_12446.diff uploaded by snuffy (license 35)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-06 19:38:44 +00:00
Tilghman Lesher bbab1a6d2f Merge refcounting of res_odbc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 23:38:15 +00:00
Mark Michelson 1235d47242 Make res/snmp/agent.c build
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-02 14:51:59 +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
Russell Bryant 44af1e23d0 Merge changes from team/russell/smdi-msg-searching
This commit adds some new features to the SMDI_MSG_RETRIEVE() dialplan function.
Previously, this function only allowed searching by the forwarding station.
I have added some options to allow you to also search for messages in the queue
by the message desk terminal ID, as well as the message desk number.

This originally came up as a suggestion on the asterisk-dev mailing list.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-01 19:05:36 +00:00
Jason Parker 1ba4d31854 Merged revisions 114829 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114829 | qwell | 2008-04-29 12:08:55 -0500 (Tue, 29 Apr 2008) | 1 line

Change warning message to debug, since there are cases where 0 results is perfectly fine.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-29 17:10:55 +00:00
Jason Parker 8e26876b3e Merged revisions 114594 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114594 | qwell | 2008-04-23 13:28:44 -0500 (Wed, 23 Apr 2008) | 8 lines

Fix reload/unload for res_musiconhold module.

(closes issue #11575)
Reported by: sunder
Patches:
      M11575_14_rev3.diff uploaded by junky (license 177)
      bug11575_trunk.diff.txt uploaded by jamesgolovich (license 176)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-23 18:33:28 +00:00
Joshua Colp 6d5290a85b Only print out the error message if ldap_modify_ext_s actually returns an error, and not success.
(closes issue #12438)
Reported by: gservat
Patches:
      res_config_ldap.c-patch-code uploaded by gservat (license 466)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-21 14:34:06 +00:00
Joshua Colp 116859bd19 If the parsing of the config file fails make sure we unlock ldap_lock.
(closes issue #12477)
Reported by: IgorG


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-18 16:11:27 +00:00
Doug Bailey 30aa3d7059 Add g__object_unref to clean up gmime message object
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-18 16:05:29 +00:00
Philippe Sultan 60a9d14d56 Merged revisions 114198 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114198 | phsultan | 2008-04-17 15:42:23 +0200 (Thu, 17 Apr 2008) | 2 lines

Use keepalives effectively in order diagnose bug #12432.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-17 13:46:17 +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
Terry Wilson 91de4e9cea Need a new buffer for each loop
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-14 19:58:52 +00:00
Terry Wilson 6d34b5fafe Don't unref user twice on failure. Also, when adding sorted list of users, it is best to check the entry already in the list for a "next" entry instead of the newly created entry...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-14 19:12:27 +00:00
Tilghman Lesher 7128ba0bb8 Use the correct function for free'ing objects, and maybe we won't crash.
(closes issue #12163)
 Reported by: gservat
 Patches: 
       20080411__bug12163.diff.txt uploaded by Corydon76 (license 14)
 Tested by: gservat


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-11 23:12:16 +00:00
Terry Wilson ef8007f630 Make sure that ${LINE} is set even if linenumber is not set in users.conf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-11 22:23:34 +00:00
Terry Wilson e276ccea11 Fix the fact that global_variables 1) weren't being updated on reload (thanks for the report, Doug), and 2) weren't actually being appended to the list of profile variables because build_profile was called before the list was populated. Also needed to free the contents returned by load_file().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-11 21:04:46 +00:00
Tilghman Lesher d304a88457 Errors are all greater than 0
(closes issue #12422)
 Reported by: nito
 Patches: 
       res_config_ldap_result_check_patch.diff uploaded by nito (license 340)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-11 14:54:22 +00:00
Terry Wilson c36e37aa6f atoi(NULL) is bad
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-07 18:57:21 +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 75c6945d92 Clean up some memory leak/ref counting issues
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-05 07:58:42 +00:00
Terry Wilson 2abff11905 Multi-line support for phoneprov
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-05 04:59:25 +00:00
Terry Wilson 1eb31edde2 Re-add HTTP post support by moving to res_http_post.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-02 15:25:48 +00:00
Joshua Colp e5c4deace3 Initialize all these here tmp pointers at declaration. They confused some compilers a wee bit.
(closes issue #12333)
Reported by: ovi


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-31 14:20:39 +00:00
Steve Murphy 2427603eaf Merged revisions 111341 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111341 | murf | 2008-03-26 21:21:05 -0600 (Wed, 26 Mar 2008) | 15 lines


(closes issue #12302)
Reported by: pj
Tested by: murf

These changes will set a channel variable ~~EXTEN~~ just before generating code
for a switch, with the value of ${EXTEN}. The exten is marked as having a switch, 
and ever after that, till the end of the exten, we substitute any ${EXTEN} 
with ${~~EXTEN~~} instead in application arguments; (and the ${EXTEN: also). 
The reason for this, is that because switches are coded using 
separate extensions to provide pattern matching, and
jumping to/from these switch extensions messes up the ${EXTEN} value, 
which blows the minds of users.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-27 04:47:12 +00:00
Russell Bryant 3c6cf5dcc5 Add some fixes that I made in regards to wideband codec handling to get
G.722 music on hold working for me.

(issue #12164, reported by milazzo and jsmith, patches by me)

res/res_musiconhold.c:
 - I moved a single line so that the sample queue update happened before
   ast_write().  The reason that this was a bug is that the G.722 frame
   originally says it has 320 samples in it (which is correct).  However,
   when the frame is written to a channel that uses RTP, main/rtp.c modifies
   the frame to cut the number of samples in half before it sends it on
   the wire.  This is to account for the stupid incorrect G.722 spec that
   makes it so we have to lie about the number of samples with RTP.  I should
   probably go and re-work the RTP code so it doesn't modify the frame so
   that a bug like this won't happen in the future.  However, this change to
   MOH is harmless.

main/channel.c:
 - I made two fixes in regards to generator timing.  Generators use samples
   for timing.  However, this code assumed 8 kHz samples.  In one case, it was
   a hard coded 160 samples, that is now written as the sample rate / 50.  The
   other place was dealing with timing a generator based on frames coming from
   the other direction.  However, that would have only worked if the sample
   rates for the formats in both directions were the same.  The code now takes
   into account that the sample rates may differ, and scales the generator
   samples accordingly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20 17:41:22 +00:00
Joshua Colp db0c6576d2 Merged revisions 110035 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110035 | file | 2008-03-19 16:11:33 -0300 (Wed, 19 Mar 2008) | 4 lines

Add sanity checking for position resuming. We *have* to make sure that the position does not exceed the total number of files present, and we have to make sure that the position's filename is the same as previous. These values can change if a music class is reloaded and give unpredictable behavior.
(closes issue #11663)
Reported by: junky

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 19:13:39 +00:00
Kevin P. Fleming 521b193eff ensure that res_phoneprov's HTTP handler tells the dispatcher what method it can handle
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 16:21:36 +00:00