asterisk/asterisk.git
15 years agorewrite "sip show {channels|subscriptions}" CLI handler
Luigi Rizzo [Sun, 22 Jul 2007 21:38:26 +0000 (21:38 +0000)]
rewrite "sip show {channels|subscriptions}" CLI handler
using the new-style cli format.
No functional changes, nothing to backport.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76408 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMake sip_destroy() return NULL so the caller can do things like
Luigi Rizzo [Sun, 22 Jul 2007 21:00:10 +0000 (21:00 +0000)]
Make sip_destroy() return NULL so the caller can do things like
     foo = sip_destroy(foo);
and reduce the chance of bugs due to dangling pointers.

Also remove a duplicate prototype for the function.

nothing to backport.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76392 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoadd two comment blocks, one on reusing nonces, and one on the handling
Luigi Rizzo [Sun, 22 Jul 2007 20:44:06 +0000 (20:44 +0000)]
add two comment blocks, one on reusing nonces, and one on the handling
of an 'authpeer' local variable.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76390 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agocomment and slightly restructure handle_request() in the part that handles
Luigi Rizzo [Sun, 22 Jul 2007 19:08:37 +0000 (19:08 +0000)]
comment and slightly restructure handle_request() in the part that handles
responses, so that there is a common exit point.
Mark two places where probably we could return -1 instead of 0 to report
an error to the caller.
(change triggered by investigations on how the 'SIP_PKT_IGNORE' field was used).

nothing to backport from this commit

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76371 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoremove unused argument from handle_invite_replaces(), and also leftover
Luigi Rizzo [Sun, 22 Jul 2007 18:46:52 +0000 (18:46 +0000)]
remove unused argument from handle_invite_replaces(), and also leftover
SIP_PKT_* stuff from the previous commit.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76366 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoCleanup of flags used in struct sip_request, moving them to
Luigi Rizzo [Sun, 22 Jul 2007 18:41:57 +0000 (18:41 +0000)]
Cleanup of flags used in struct sip_request, moving them to
individual variables. Apart from SIP_PKT_IGNORE which was used
a zillion times, the other two are used seldom.

On passing:
- move the arrays to the end of struct sip_request, so a (small)
  buffer overflow is less likely to overwrite the other fields;
- note that the 'ignore' argument to handle_invite_replaces() is not
  used and should be removed (will be done in a separate commit).

Nothing to backport in this change.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76365 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agomove two per-packet flags to proper variables.
Luigi Rizzo [Sun, 22 Jul 2007 18:03:07 +0000 (18:03 +0000)]
move two per-packet flags to proper variables.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76349 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agominor clarification on the usage of SIP_* flags.
Luigi Rizzo [Sun, 22 Jul 2007 17:27:52 +0000 (17:27 +0000)]
minor clarification on the usage of SIP_* flags.
Also correct some items that were misclassified.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76348 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agodocument the way sipdebug works, and implement it through
Luigi Rizzo [Sun, 22 Jul 2007 08:42:24 +0000 (08:42 +0000)]
document the way sipdebug works, and implement it through
variables and not flags.

NOTE:
The old behaviour (preserved in this commit) is that if sipdebug
is set in the config file, it can only be disabled by reloading the
config.  I am not sure if this is accidental or voluntary, but it
is really unconvenient and I think it should be handled in the same
way as other options i.e. consider requests from the config file
or the cli (or the command line) to be fully equivalent and act on
the same status variable.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76330 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agomove the SIP_REALTIME flag to a field in the user/peer structure.
Luigi Rizzo [Sat, 21 Jul 2007 17:57:47 +0000 (17:57 +0000)]
move the SIP_REALTIME flag to a field in the user/peer structure.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76314 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoAdd a note to document how the temporary 'pvt' should be initialized
Luigi Rizzo [Sat, 21 Jul 2007 17:32:00 +0000 (17:32 +0000)]
Add a note to document how the temporary 'pvt' should be initialized
before using it.
I am unclear on the details right now so i hope someone can comment
more. The obvious (and lazy) approach would be to bzero() all of it
(except for the string pool), but isn't that too much work ?
Feedback wanted here...

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76313 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoAdd support for using /dev/urandom to get random numbers on systems that support it.
Joshua Colp [Sat, 21 Jul 2007 14:39:52 +0000 (14:39 +0000)]
Add support for using /dev/urandom to get random numbers on systems that support it.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76296 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agowhoops... was setting needdestroy on the wrong dialog.
Luigi Rizzo [Sat, 21 Jul 2007 09:35:48 +0000 (09:35 +0000)]
whoops... was setting needdestroy on the wrong dialog.
(spotted by a diff with my own branch)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76279 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agomore two more flags to proper variables: ALREADYGONE and NEEDDESTROY.
Luigi Rizzo [Sat, 21 Jul 2007 09:18:50 +0000 (09:18 +0000)]
more two more flags to proper variables: ALREADYGONE and NEEDDESTROY.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76278 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agouse explicit variables for things that don't need to
Luigi Rizzo [Sat, 21 Jul 2007 03:53:17 +0000 (03:53 +0000)]
use explicit variables for things that don't need to
be stored in ast_flags. First victim is 'SIP_NO_HISTORY'
replaced by a 'do_history' field in the sip_pvt structure.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76231 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoUse ast_str_append() instead of ast_build_string() to construct
Luigi Rizzo [Sat, 21 Jul 2007 02:33:25 +0000 (02:33 +0000)]
Use ast_str_append() instead of ast_build_string() to construct
the sdp messages. Overall the code is slightly more readable
(because the string is fully described by a single pointer),
and more efficient (because the length is stored explicitly
so you don't need to do strlen()).
(I have been using this code for almost a year now.)

I wish we had infix string operators to do this sort of things!

Nothing to backport from this change.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76229 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoBlocked revisions 76227 via svnmerge
Russell Bryant [Sat, 21 Jul 2007 02:03:43 +0000 (02:03 +0000)]
Blocked revisions 76227 via svnmerge

................
r76227 | russell | 2007-07-20 21:02:54 -0500 (Fri, 20 Jul 2007) | 12 lines

Merged revisions 76226 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r76226 | russell | 2007-07-20 21:01:46 -0500 (Fri, 20 Jul 2007) | 4 lines

Backport a fix for a memory leak that was fixed in trunk in reivision 76221
by rizzo.  The memory used for the localaddr list was not freed during a
configuration reload.

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76228 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoWe have two 'technology' descriptors for a SIP channel, so
Luigi Rizzo [Sat, 21 Jul 2007 01:25:13 +0000 (01:25 +0000)]
We have two 'technology' descriptors for a SIP channel, so
define and use a macro to determine whether we are pointing to
one of them, so when one goes away (or a new one appears) we don't
have to touch all the code.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76224 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoOne small documentation update made to accompany 10154, the upgrading of the queue...
Steve Murphy [Sat, 21 Jul 2007 01:08:46 +0000 (01:08 +0000)]
One small documentation update made to accompany 10154, the upgrading of the queue ringing to allow periodic announcments

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76222 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoEnhance NAT support as discussed on the -dev list, i.e.:
Luigi Rizzo [Sat, 21 Jul 2007 01:01:10 +0000 (01:01 +0000)]
Enhance NAT support as discussed on the -dev list, i.e.:

+ extensive documentation changes both in sip.conf.sample and in the source;

+ allow "externip" and "externhost" to include a port number as well;

+ allow "bindaddr" to have a port number (making bindport unnecessary,
  even though it is still present for backward compatibility);

+ introduce the new "stunaddr" parameter to specify an STUN server to
  be used from the main SIP socket;

+ extend the "sip show settings" output to show all the above.

Internally:

+ change related data structures from struct in_addr to struct sockaddr_in
  to store the port numbers as well;

+ reorganize ast_sip_ouraddrfor() (should also be renamed to sip_ouraddrfor()
  because it is not a generic API, though it might become so if called with
  a socket as an additional argument, in which case it can be moved elsewhere).

As mentioned in the documentation, media sessions still do not use STUN so the
port numbers may still be incorrect when Asterisk is behind a NAT

On passing, some of the debugging messages printing media addresses are
probably using the wrong values, but this will be checked/fixed in a
subsequent commit if needed.

Part of the following chunk in the function that handles a "sip reload" is
probably needed on previous versions as well, to avoid leaking the memory
used for the "localaddr" list:

@@ -17244,13 +17274,17 @@

        /* Reset IP addresses  */
        memset(&bindaddr, 0, sizeof(bindaddr));
+       memset(&stunaddr, 0, sizeof(stunaddr));
+       memset(&internip, 0, sizeof(internip));
+       /* Free memory for local network address mask */
+ --->  ast_free_ha(localaddr); <-----
        memset(&localaddr, 0, sizeof(localaddr));
        memset(&externip, 0, sizeof(externip));
        memset(&default_prefs, 0 , sizeof(default_prefs));

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76221 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoThis update was supplied in 10154; to allow announcemnts if the 'r' option (ringing...
Steve Murphy [Sat, 21 Jul 2007 00:57:00 +0000 (00:57 +0000)]
This update was supplied in 10154; to allow announcemnts if the 'r' option (ringing) is provided.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76220 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoAdd support for default "say mode" (whether to use the "old" method or "new" method...
Jason Parker [Fri, 20 Jul 2007 22:25:41 +0000 (22:25 +0000)]
Add support for default "say mode" (whether to use the "old" method or "new" method.  "new" method being config file)
Add support for autocomplete of "say load" CLI command.

Patch by IgorG
(closes issue #10243)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76216 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 76211 via svnmerge from
Steve Murphy [Fri, 20 Jul 2007 21:41:51 +0000 (21:41 +0000)]
Merged revisions 76211 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r76211 | murf | 2007-07-20 15:36:05 -0600 (Fri, 20 Jul 2007) | 1 line

This patch from 10249 is worth applying! It prevents downloading sound files if they are already downloaded. Darn Practical, if you ask me
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76213 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoBlocked revisions 76178 via svnmerge
Jason Parker [Fri, 20 Jul 2007 21:04:27 +0000 (21:04 +0000)]
Blocked revisions 76178 via svnmerge

........
r76178 | qwell | 2007-07-20 16:03:57 -0500 (Fri, 20 Jul 2007) | 7 lines

Allow getting a call from an existing "sub" channel.

Cancel ringing if endpoint hangs up before answering.

Fixes were backported from trunk (there was apparently a bit of confusion during merge of a previous patch).
(closes issue #10241)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76179 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoBlocked revisions 76176 via svnmerge
Jason Parker [Fri, 20 Jul 2007 20:56:07 +0000 (20:56 +0000)]
Blocked revisions 76176 via svnmerge

........
r76176 | qwell | 2007-07-20 15:54:10 -0500 (Fri, 20 Jul 2007) | 2 lines

Eliminate a compiler warning with gcc 4.2 by constifying a char *

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76177 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 76174 via svnmerge from
Jason Parker [Fri, 20 Jul 2007 20:33:34 +0000 (20:33 +0000)]
Merged revisions 76174 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r76174 | qwell | 2007-07-20 15:32:55 -0500 (Fri, 20 Jul 2007) | 2 lines

It's possible for sub->owner to be NULL here if you cancel the call immediately after/during sending a digit.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76175 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 76139 via svnmerge from
Mark Michelson [Fri, 20 Jul 2007 18:44:30 +0000 (18:44 +0000)]
Merged revisions 76139 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r76139 | mmichelson | 2007-07-20 13:42:27 -0500 (Fri, 20 Jul 2007) | 6 lines

When using users.conf for the entries in the directory, if multiple users had the same last name, only the first user listed would be available
in the directory.

(closes issue #10200, reported by mrskippy, patched by me)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76140 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 76132 via svnmerge from
Russell Bryant [Fri, 20 Jul 2007 18:28:15 +0000 (18:28 +0000)]
Merged revisions 76132 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r76132 | russell | 2007-07-20 13:22:24 -0500 (Fri, 20 Jul 2007) | 6 lines

Use the define that specifies the default length of an artificially created
DTMF digit in the ast_senddigit() function.  The define is set to 100ms by
default, which is the same thing that this function was using.  But, using
the define lets changes take effect in this case, as well as the others where
it was already used.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76138 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 76087 via svnmerge from
Joshua Colp [Fri, 20 Jul 2007 17:21:23 +0000 (17:21 +0000)]
Merged revisions 76087 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r76087 | file | 2007-07-20 14:20:09 -0300 (Fri, 20 Jul 2007) | 14 lines

Merged revisions 76080 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r76080 | file | 2007-07-20 14:16:48 -0300 (Fri, 20 Jul 2007) | 6 lines

(closes issue #10247)
Reported by: fkasumovic
Patches:
      chan_sip.patch uploaded by fkasumovic (license #101)
Drop any peer realm authentication entries when reloading so multiple entries do not get added to the peer.

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76091 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 76067 via svnmerge from
Joshua Colp [Fri, 20 Jul 2007 17:11:39 +0000 (17:11 +0000)]
Merged revisions 76067 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r76067 | file | 2007-07-20 14:10:17 -0300 (Fri, 20 Jul 2007) | 6 lines

(closes issue #10246)
Reported by: fkasumovic
Patches:
      res_conver.patch uploaded by fkasumovic (license #101)
Use the last occurance of . to find the extension, not the first occurance.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76070 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoIt is impossible for the externhost variable to not exist, it is however possible...
Joshua Colp [Fri, 20 Jul 2007 16:51:09 +0000 (16:51 +0000)]
It is impossible for the externhost variable to not exist, it is however possible for it to be empty.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76056 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoBlocked revisions 76054 via svnmerge
Joshua Colp [Fri, 20 Jul 2007 16:49:58 +0000 (16:49 +0000)]
Blocked revisions 76054 via svnmerge

........
r76054 | file | 2007-07-20 13:49:13 -0300 (Fri, 20 Jul 2007) | 2 lines

Move makeannouncement variable declaration to proper place.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76055 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoDon't use a field size for the last argument of printf format,
Luigi Rizzo [Fri, 20 Jul 2007 15:06:54 +0000 (15:06 +0000)]
Don't use a field size for the last argument of printf format,
because in this case the string is left-aligned and it is not
truncated anyways.

Omitting the field size prevents the generation of trailing whitespace,
which makes the string fit in smaller windows.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76037 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoExtend the 'network settings' section with indication on the
Luigi Rizzo [Fri, 20 Jul 2007 14:54:01 +0000 (14:54 +0000)]
Extend the 'network settings' section with indication on the
localnet settings (requires the change in SVN 76034), and also
give an indication on whether/why/how the remapping of addresses
in SIP message is done or not.

I think this is especially useful for debugging the configuration,
as the address remapping depends on a combination of at least 3
parameters (localnet, externhost, externip) and successful DNS lookup.

An example of the output of this section is below:

Network Settings:
---------------------------
  SIP address remapping:  Enabled using externhost
  Externhost:             foo.dyndns.net
  Externip:               80.64.128.23:0
  Externrefresh:          10
  Internal IP:            12.34.56.78:5060
  Localnet:               192.168.0.0/255.255.0.0
  10.0.0.0/255.0.0.0

I leave to the community the judgement if the above info is a
useful addition for 1.4. It is not a bugfix, but it is neither a
new feature, only a useful diagnostic tool.

Note that I would like to move there also the bindaddress/port
information, in the usual addr:port format e.g.

          Bindaddress:            0.0.0.0:5060

so that network information is all in one place.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76035 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoexpose struct ast_ha so external code can do things such as printing it
Luigi Rizzo [Fri, 20 Jul 2007 14:38:36 +0000 (14:38 +0000)]
expose struct ast_ha so external code can do things such as printing it
(e.g. chan_sip.c in a subsequent commit).

Obviously exposing the internals of a data structure is far from ideal
(especially in a case like this where the implementation is very
inefficient and will need to be changed at some point).

On the other hand, it was also unclear what additional APIs should
we provide instead, and because exposing the stucture has no impact
on source and binary compatibility, this seemed to me the best option at
this time.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76034 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoReduce some logging contention by switching several locks over to rwlocks
Tilghman Lesher [Fri, 20 Jul 2007 01:54:52 +0000 (01:54 +0000)]
Reduce some logging contention by switching several locks over to rwlocks

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76015 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoAfter some study, thought, comparing, etc. I've backed out the previous universal...
Steve Murphy [Thu, 19 Jul 2007 23:24:27 +0000 (23:24 +0000)]
After some study, thought, comparing, etc. I've backed out the previous universal mod to make ast_flags a 64 bit thing. Instead, I added a 64-bit version of ast_flags (ast_flags64), and 64-bit versions of the test-flag, set-flag, etc. macros, and an app_parse_options64 routine, and I use these in app_dial alone, to eliminate the 30-option limit it had grown to meet. There is room now for 32 more options and flags. I was heavily tempted to implement some of the other ideas that were presented, but this solution does not intro any new versions of dial, doesn't have a different API, has a minimal/zero impact on code outside of dial, and doesn't seriously (I hope) affect the code structure of dial. It's the best I can think of right now. My goal was NOT to rewrite dial. I leave that to a future, coordinated effort.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75983 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoThis repairs a 'warning: ISO C90 forbids mixed declarations and code' message that...
Steve Murphy [Thu, 19 Jul 2007 22:00:59 +0000 (22:00 +0000)]
This repairs a 'warning: ISO C90 forbids mixed declarations and code' message that cripples my dev-mode enabled build

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75982 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoBlocked revisions 75980 via svnmerge
Jason Parker [Thu, 19 Jul 2007 20:36:55 +0000 (20:36 +0000)]
Blocked revisions 75980 via svnmerge

........
r75980 | qwell | 2007-07-19 15:36:06 -0500 (Thu, 19 Jul 2007) | 2 lines

Remove some duplicate code.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75981 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75978 via svnmerge from
Mark Michelson [Thu, 19 Jul 2007 19:02:38 +0000 (19:02 +0000)]
Merged revisions 75978 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r75978 | mmichelson | 2007-07-19 13:59:30 -0500 (Thu, 19 Jul 2007) | 3 lines

The diff on this looks pretty big but all I did was remove a pointless if statement (always evaluates true).

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75979 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75969 via svnmerge from
Mark Michelson [Thu, 19 Jul 2007 16:29:51 +0000 (16:29 +0000)]
Merged revisions 75969 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r75969 | mmichelson | 2007-07-19 11:26:10 -0500 (Thu, 19 Jul 2007) | 10 lines

Changes in handling return values of several functions in app_queue. This all started as a fix for issue #10008
but now includes all of the following changes:

1. Simplifying the code to handle positive return values from ast API calls.
2. Removing the background_file function.
3. The fix for issue #10008

(closes issue #10008, reported and patched by dimas)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75977 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years ago(closes issue #10210, reported and patched by juggie)
Russell Bryant [Thu, 19 Jul 2007 15:59:19 +0000 (15:59 +0000)]
(closes issue #10210, reported and patched by juggie)

This merges the trunk only part of the patches from this issue.  In 1.4, res_agi
will issue a warning if you try to use DeadAGI on a channel that is not hung up.
Now, in trunk, it just plain won't let you do it.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75930 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75928 via svnmerge from
Russell Bryant [Thu, 19 Jul 2007 15:53:50 +0000 (15:53 +0000)]
Merged revisions 75928 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75928 | russell | 2007-07-19 10:53:15 -0500 (Thu, 19 Jul 2007) | 14 lines

Merged revisions 75927 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75927 | russell | 2007-07-19 10:49:42 -0500 (Thu, 19 Jul 2007) | 6 lines

When processing full frames, take sequence number wraparound into account when
deciding whether or not we need to request retransmissions by sending a VNAK.
This code could cause VNAKs to be sent erroneously in some cases, and to not
be sent in other cases when it should have been.
(closes issue #10237, reported and patched by mihai)

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75929 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoRemove some debug code that was added in revision 75894, which removed some
Russell Bryant [Thu, 19 Jul 2007 14:46:49 +0000 (14:46 +0000)]
Remove some debug code that was added in revision 75894, which removed some
other debug code.  :)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75911 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agocomment out some terribly expensive debugging code
Luigi Rizzo [Thu, 19 Jul 2007 12:38:13 +0000 (12:38 +0000)]
comment out some terribly expensive debugging code
in the body of ast_apply_ha()

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75894 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoprint more of the network settings (externip, externhost etc.)
Luigi Rizzo [Thu, 19 Jul 2007 08:07:04 +0000 (08:07 +0000)]
print more of the network settings (externip, externhost etc.)
in the "sip show settings" cli output. I have put these in a
separate section, probably even bindaddr and SIP port should go
there.

There are more things to add here e.g. localnet and so on.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75878 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agodocument the use of externip, externhost and other nat-related options,
Luigi Rizzo [Thu, 19 Jul 2007 08:00:03 +0000 (08:00 +0000)]
document the use of externip, externhost and other nat-related options,
as well as the handling of the sip socket.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75875 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoast_sip_ouraddrfor() never fails, so make it void
Luigi Rizzo [Thu, 19 Jul 2007 07:51:34 +0000 (07:51 +0000)]
ast_sip_ouraddrfor() never fails, so make it void
and remove the code that would never be called.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75874 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoportability fix: use %f instead of %lf when printing double.
Luigi Rizzo [Thu, 19 Jul 2007 07:41:45 +0000 (07:41 +0000)]
portability fix: use %f instead of %lf when printing double.
The l is useless.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75873 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoAllow chan_misdn to build in dev-mode
Tilghman Lesher [Thu, 19 Jul 2007 04:45:20 +0000 (04:45 +0000)]
Allow chan_misdn to build in dev-mode

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75857 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoFix trunk where I broke it earlier (for ast_strftime branch)
Tilghman Lesher [Thu, 19 Jul 2007 03:37:12 +0000 (03:37 +0000)]
Fix trunk where I broke it earlier (for ast_strftime branch)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75841 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75807 via svnmerge from
Jason Parker [Wed, 18 Jul 2007 23:00:30 +0000 (23:00 +0000)]
Merged revisions 75807 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r75807 | qwell | 2007-07-18 17:59:18 -0500 (Wed, 18 Jul 2007) | 1 line

Need to make sure we set milliseconds and timestamp - pointed out by the recent ast_ time stuff from Tilghman
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75808 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoI thought I noticed a memory leak earlier when I saw that the contents of this
Russell Bryant [Wed, 18 Jul 2007 22:52:54 +0000 (22:52 +0000)]
I thought I noticed a memory leak earlier when I saw that the contents of this
list were not destroyed when the module is unloaded.  However, after reading
the code related to the use of this list a lot today, I realized that it isn't
necessary.  So, I have added a comment to explain why it isn't necessary.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75806 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoChange IAX variables to use datastores (closes issue #9315)
Tilghman Lesher [Wed, 18 Jul 2007 22:40:03 +0000 (22:40 +0000)]
Change IAX variables to use datastores (closes issue #9315)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75805 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75759 via svnmerge from
Russell Bryant [Wed, 18 Jul 2007 21:10:27 +0000 (21:10 +0000)]
Merged revisions 75759 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75759 | russell | 2007-07-18 16:09:46 -0500 (Wed, 18 Jul 2007) | 13 lines

Merged revisions 75757 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75757 | russell | 2007-07-18 16:09:13 -0500 (Wed, 18 Jul 2007) | 5 lines

When traversing the queue of frames for possible retransmission after
receiving a VNAK, handle sequence number wraparound so that all frames that
should be retransmitted actually do get retransmitted.
(issue #10227, reported and patched by mihai)

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75761 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75749 via svnmerge from
Tilghman Lesher [Wed, 18 Jul 2007 20:43:54 +0000 (20:43 +0000)]
Merged revisions 75749 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75749 | tilghman | 2007-07-18 15:40:18 -0500 (Wed, 18 Jul 2007) | 10 lines

Merged revisions 75748 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75748 | tilghman | 2007-07-18 15:31:36 -0500 (Wed, 18 Jul 2007) | 2 lines

Store prior to copy (closes issue #10193)

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75750 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75732 via svnmerge from
Jason Parker [Wed, 18 Jul 2007 20:18:00 +0000 (20:18 +0000)]
Merged revisions 75732 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r75732 | qwell | 2007-07-18 15:17:27 -0500 (Wed, 18 Jul 2007) | 1 line

Umm, why are we transmitting dialtone on cfwdall?
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75734 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75711 via svnmerge from
Jason Parker [Wed, 18 Jul 2007 20:05:45 +0000 (20:05 +0000)]
Merged revisions 75711 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #9245)
........
r75711 | qwell | 2007-07-18 14:54:32 -0500 (Wed, 18 Jul 2007) | 4 lines

Fixes for 7935/7936 conference phones.

Issue 9245, patch by slimey.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75714 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoBlocked revisions 75712 via svnmerge
Joshua Colp [Wed, 18 Jul 2007 20:01:52 +0000 (20:01 +0000)]
Blocked revisions 75712 via svnmerge

........
r75712 | file | 2007-07-18 17:00:23 -0300 (Wed, 18 Jul 2007) | 2 lines

Backport GCC 4.2 fixes. Without these Asterisk won't build under devmode using GCC 4.2.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75713 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75707 via svnmerge from
Jason Parker [Wed, 18 Jul 2007 19:51:18 +0000 (19:51 +0000)]
Merged revisions 75707 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #9887)
........
r75707 | qwell | 2007-07-18 14:48:12 -0500 (Wed, 18 Jul 2007) | 4 lines

Fix issues with new 79x1 phones.

Issue 9887, patches by DEA

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75710 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoconvert some lines indented with spaces to tabs
Russell Bryant [Wed, 18 Jul 2007 19:50:21 +0000 (19:50 +0000)]
convert some lines indented with spaces to tabs

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75709 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerge in ast_strftime branch, which changes timestamps to be accurate to the microsec...
Tilghman Lesher [Wed, 18 Jul 2007 19:47:20 +0000 (19:47 +0000)]
Merge in ast_strftime branch, which changes timestamps to be accurate to the microsecond, instead of only to the second

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75706 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75658 via svnmerge from
Dwayne M. Hubbard [Wed, 18 Jul 2007 17:59:56 +0000 (17:59 +0000)]
Merged revisions 75658 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75658 | dhubbard | 2007-07-18 12:56:30 -0500 (Wed, 18 Jul 2007) | 9 lines

Merged revisions 75657 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75657 | dhubbard | 2007-07-18 12:48:33 -0500 (Wed, 18 Jul 2007) | 1 line

removed the word 'pissed' from ast_log(...) function call for BE-90
........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75659 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75623 via svnmerge from
Joshua Colp [Wed, 18 Jul 2007 15:45:18 +0000 (15:45 +0000)]
Merged revisions 75623 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r75623 | file | 2007-07-18 12:44:02 -0300 (Wed, 18 Jul 2007) | 2 lines

Few more places that needs to check for onhold state.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75624 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75621 via svnmerge from
Joshua Colp [Wed, 18 Jul 2007 15:42:11 +0000 (15:42 +0000)]
Merged revisions 75621 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r75621 | file | 2007-07-18 12:41:06 -0300 (Wed, 18 Jul 2007) | 5 lines

(closes issue #10165)
Reported by: elandivar

It is possible for hold status to exist without call limits set, so we need to ensure update_call_counter is executed regardless.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75622 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75619 via svnmerge from
Joshua Colp [Wed, 18 Jul 2007 15:26:52 +0000 (15:26 +0000)]
Merged revisions 75619 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r75619 | file | 2007-07-18 12:25:45 -0300 (Wed, 18 Jul 2007) | 2 lines

Don't bother reloading chan_h323 if it did not load successfully in the first place. This would otherwise cause a crash.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75620 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoClean up func_curl a bit.
Joshua Colp [Wed, 18 Jul 2007 14:59:20 +0000 (14:59 +0000)]
Clean up func_curl a bit.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75586 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoThis corrects the problem with flags and %lld formats on 64-bit machines, where uint6...
Steve Murphy [Wed, 18 Jul 2007 14:35:07 +0000 (14:35 +0000)]
This corrects the problem with flags and %lld formats on 64-bit machines, where uint64_t is NOT acceptable for %lld, and also works on 32-bit machines. At least, with gcc.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75585 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75583 via svnmerge from
Joshua Colp [Wed, 18 Jul 2007 14:20:19 +0000 (14:20 +0000)]
Merged revisions 75583 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r75583 | file | 2007-07-18 11:18:53 -0300 (Wed, 18 Jul 2007) | 5 lines

(closes issue #10224)
Reported by: irroot

Record the threadid of each running thread before shutting them down as the thread themselves may change the value.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75584 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMinor code tweaks. Variables were being checked wrong in some situations and didn...
Joshua Colp [Wed, 18 Jul 2007 13:59:01 +0000 (13:59 +0000)]
Minor code tweaks. Variables were being checked wrong in some situations and didn't need to be checked in others.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75566 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75529 via svnmerge from
Tilghman Lesher [Wed, 18 Jul 2007 12:38:36 +0000 (12:38 +0000)]
Merged revisions 75529 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r75529 | tilghman | 2007-07-18 07:29:41 -0500 (Wed, 18 Jul 2007) | 2 lines

Using a freed frame causes crashes (closes issue #9317)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75530 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoSpotted this bug today myself, trying to reproduce a BE bug. Use a vert bar instead...
Steve Murphy [Tue, 17 Jul 2007 21:52:51 +0000 (21:52 +0000)]
Spotted this bug today myself, trying to reproduce a BE bug. Use a vert bar instead of a comma, when calling RAND.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75505 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75450 via svnmerge from
Russell Bryant [Tue, 17 Jul 2007 20:58:40 +0000 (20:58 +0000)]
Merged revisions 75450 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75450 | russell | 2007-07-17 15:57:56 -0500 (Tue, 17 Jul 2007) | 11 lines

Merged revisions 75449 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75449 | russell | 2007-07-17 15:57:09 -0500 (Tue, 17 Jul 2007) | 3 lines

Properly check for the length in the skinny packet to prevent an invalid memcpy.
(ASA-2007-016)

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75451 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoBlocked revisions 75447 via svnmerge
Russell Bryant [Tue, 17 Jul 2007 20:52:20 +0000 (20:52 +0000)]
Blocked revisions 75447 via svnmerge

........
r75447 | russell | 2007-07-17 15:51:25 -0500 (Tue, 17 Jul 2007) | 1 line

cast arguments to ast_log so that it builds without warnings for me
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75448 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75445 via svnmerge from
Russell Bryant [Tue, 17 Jul 2007 20:49:09 +0000 (20:49 +0000)]
Merged revisions 75445 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75445 | russell | 2007-07-17 15:48:21 -0500 (Tue, 17 Jul 2007) | 13 lines

Merged revisions 75444 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75444 | russell | 2007-07-17 15:45:27 -0500 (Tue, 17 Jul 2007) | 5 lines

Ensure that when encoding the contents of an ast_frame into an iax_frame, that
the size of the destination buffer is known in the iax_frame so that code
won't write past the end of the allocated buffer when sending outgoing frames.
(ASA-2007-014)

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75446 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoBlocked revisions 75439 via svnmerge
Joshua Colp [Tue, 17 Jul 2007 20:44:55 +0000 (20:44 +0000)]
Blocked revisions 75439 via svnmerge

........
r75439 | file | 2007-07-17 17:40:57 -0300 (Tue, 17 Jul 2007) | 2 lines

Ensure that the pointer to STUN data does not go to unaccessible memory. (ASA-2007-017)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75443 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75441 via svnmerge from
Russell Bryant [Tue, 17 Jul 2007 20:42:50 +0000 (20:42 +0000)]
Merged revisions 75441 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75441 | russell | 2007-07-17 15:42:12 -0500 (Tue, 17 Jul 2007) | 12 lines

Merged revisions 75440 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75440 | russell | 2007-07-17 15:41:41 -0500 (Tue, 17 Jul 2007) | 4 lines

After parsing information elements in IAX frames, set the data length to zero,
so that code later on does not think it has data to copy.
(ASA-2007-015)

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75442 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoBlocked revisions 75437 via svnmerge
Russell Bryant [Tue, 17 Jul 2007 20:34:52 +0000 (20:34 +0000)]
Blocked revisions 75437 via svnmerge

........
r75437 | russell | 2007-07-17 15:33:06 -0500 (Tue, 17 Jul 2007) | 8 lines

(issue #10210)
Reported by: juggie
Patches:
      10210-1.4-grr.patch uploaded by juggie (license #24)
Tested by: juggie, blitzrage

Log a warning if someone uses DeadAGI on a live channel.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75438 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75405 via svnmerge from
Mark Michelson [Tue, 17 Jul 2007 20:05:19 +0000 (20:05 +0000)]
Merged revisions 75405 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r75405 | mmichelson | 2007-07-17 15:03:48 -0500 (Tue, 17 Jul 2007) | 6 lines

Fixing an error I made earlier. ast_fileexists can return -1 on failure, so I need to be sure that we only enter the if
statement if it is successful.

Related to my fix to issue #10186

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75406 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75403 via svnmerge from
Russell Bryant [Tue, 17 Jul 2007 20:01:54 +0000 (20:01 +0000)]
Merged revisions 75403 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r75403 | russell | 2007-07-17 15:01:12 -0500 (Tue, 17 Jul 2007) | 12 lines

(closes issue #10209)
Reported by: juggie
Patches:
      10209-trunk-2.patch uploaded by juggie
Tested by: juggie, blitzrage

In ast_pbx_run(), mark a channel as hung up after an application returned -1,
or when it runs out of extensions to execute.  This is so that code can detect
that this channel has been hung up for things like making sure DeadAGI is used
on actual dead channels, and is beneficial for other things, like making sure
someone doesn't try to start spying on a channel that is about to go away.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75404 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75401 via svnmerge from
Russell Bryant [Tue, 17 Jul 2007 19:46:13 +0000 (19:46 +0000)]
Merged revisions 75401 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r75401 | russell | 2007-07-17 14:45:07 -0500 (Tue, 17 Jul 2007) | 3 lines

Remove a duplicated newline character in AGI debug output.
(closes issue #10207, patch by seanbright)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75402 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agovia 10206, I have added an option (e) to Dial to allow the h exten to get run on...
Steve Murphy [Tue, 17 Jul 2007 19:40:29 +0000 (19:40 +0000)]
via 10206, I have added an option (e) to Dial to allow the h exten to get run on peer. Had to upgrade ast_flag stuff to 64 bits to do this.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75400 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMake trunk build once again.
Joshua Colp [Tue, 17 Jul 2007 14:48:17 +0000 (14:48 +0000)]
Make trunk build once again.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75381 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoIntroduce ast_parse_arg() , a generic function to parse strings
Luigi Rizzo [Tue, 17 Jul 2007 14:32:15 +0000 (14:32 +0000)]
Introduce ast_parse_arg() , a generic function to parse strings
in a consistent way. This is meant to replace the custom code
which is repeated all over the place in the various files when
parsing config files, CLI entries and other string information.

Right now the code supports parsing int32, uint32 and sockaddr_in with
optional default values and bound checks. It contains minimal error
checking, but that can be easily extended as the need arises.

Being a new API i am introducing this only in trunk, though I believe
that once the interface has been ironed out it might become a
worthwhile addition to 1.4 as well - basically, the first time
we will need to fix a piece of argument parsing code, we might as
well bring in this change and use the new API instead.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75379 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoInitialize a variable to avoid a warning when the compiler
Luigi Rizzo [Tue, 17 Jul 2007 12:46:25 +0000 (12:46 +0000)]
Initialize a variable to avoid a warning when the compiler
(and/or the optimization level) may think it is used uninitialized.
The code was indeed correct, but unfortunately the result of
some compiler checks such as -Wunused and -Wuninitialized depends
heavily on the optimization level.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75365 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoFix an incorrect parenthesization (TODO: Find a better word) in app_dial
Jason Parker [Tue, 17 Jul 2007 12:01:05 +0000 (12:01 +0000)]
Fix an incorrect parenthesization (TODO: Find a better word) in app_dial

Pointed out by Fanzhou Zhao

Closes issue #10216

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75351 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75306 via svnmerge from
Kevin P. Fleming [Mon, 16 Jul 2007 20:58:56 +0000 (20:58 +0000)]
Merged revisions 75306 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75306 | kpfleming | 2007-07-16 15:53:24 -0500 (Mon, 16 Jul 2007) | 11 lines

Merged revisions 75304 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75304 | kpfleming | 2007-07-16 15:46:58 -0500 (Mon, 16 Jul 2007) | 3 lines

provide proper copyright/license attribution for this structure that was copied from a BSD-licensed header file long, long ago...

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75307 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoChange the function name slightly... just for kpfleming!
Joshua Colp [Mon, 16 Jul 2007 18:38:28 +0000 (18:38 +0000)]
Change the function name slightly... just for kpfleming!

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75260 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoAdd in check for the GCC attribute deprecated. It may be used soon!
Joshua Colp [Mon, 16 Jul 2007 18:36:02 +0000 (18:36 +0000)]
Add in check for the GCC attribute deprecated. It may be used soon!

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75259 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoFor my next trick I will make it so dialplan functions no longer need to call ast_mod...
Joshua Colp [Mon, 16 Jul 2007 18:24:29 +0000 (18:24 +0000)]
For my next trick I will make it so dialplan functions no longer need to call ast_module_user_add and ast_module_user_remove. These are now called in the ast_func_read and ast_func_write functions outside of the module.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75255 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75253 via svnmerge from
Mark Michelson [Mon, 16 Jul 2007 18:18:19 +0000 (18:18 +0000)]
Merged revisions 75253 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r75253 | mmichelson | 2007-07-16 13:16:15 -0500 (Mon, 16 Jul 2007) | 8 lines

Restoring functionality from 1.2 wherein Retrydial will not exit if there is no announce file specified.
This change makes it so that if there is no announce file specified, the application will continue until finished (or caller hangs up).
If a bogus announce file is specified, then a warning message will be printed saying that the file could not be found, but execution will
still continue.

(closes issue #10186, reported by jon, patched by me)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75254 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoI found this sillyness when I did my ast_module_user conversion. Return immediately...
Joshua Colp [Mon, 16 Jul 2007 15:57:01 +0000 (15:57 +0000)]
I found this sillyness when I did my ast_module_user conversion. Return immediately if no data was passed to the Verbose application.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75227 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoApplications no longer need to call ast_module_user_add and ast_module_user_remove...
Joshua Colp [Mon, 16 Jul 2007 14:39:29 +0000 (14:39 +0000)]
Applications no longer need to call ast_module_user_add and ast_module_user_remove. This is now taken care of in the pbx_exec function outside of the application.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75200 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoIt is no longer required for each module that deals with a channel to call ast_module...
Joshua Colp [Mon, 16 Jul 2007 13:35:20 +0000 (13:35 +0000)]
It is no longer required for each module that deals with a channel to call ast_module_user_hangup_all in it's unload function. The loader will automatically perform this action for it.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75183 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerge a bunch of doxygen updates to header files. This includes changes to
Russell Bryant [Mon, 16 Jul 2007 02:51:56 +0000 (02:51 +0000)]
Merge a bunch of doxygen updates to header files.  This includes changes to
use the \retval tag for documenting return values, fixing various warnings
when generating the documentation, and various other things.
(closes issue #10203, snuffy)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75164 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoCast the 2nd argument to iconv() to a void *, as some systems define it as a
Russell Bryant [Mon, 16 Jul 2007 02:44:49 +0000 (02:44 +0000)]
Cast the 2nd argument to iconv() to a void *, as some systems define it as a
(const char *), while others define it as (char *).  This is done to suppress
compiler warnings about it.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75163 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75108 via svnmerge from
Russell Bryant [Fri, 13 Jul 2007 20:37:27 +0000 (20:37 +0000)]
Merged revisions 75108 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75108 | russell | 2007-07-13 15:36:16 -0500 (Fri, 13 Jul 2007) | 11 lines

Merged revisions 75107 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75107 | russell | 2007-07-13 15:35:22 -0500 (Fri, 13 Jul 2007) | 3 lines

Fix a couple potential minor memory leaks.  load_moh_classes() could return
without destroying the loaded configuration.

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75109 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75078 via svnmerge from
Mark Michelson [Fri, 13 Jul 2007 20:16:40 +0000 (20:16 +0000)]
Merged revisions 75078 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75078 | mmichelson | 2007-07-13 15:15:30 -0500 (Fri, 13 Jul 2007) | 13 lines

Merged revisions 75066 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75066 | mmichelson | 2007-07-13 15:10:39 -0500 (Fri, 13 Jul 2007) | 5 lines

Fixed an issue where chanspy flags were uninitialized if no options were passed.
What triggered this investigation was an IRC chat where some people's quiet flags were
set while others' weren't even though none of them had specified the q option.

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75082 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoresolve a compiler warning
Russell Bryant [Fri, 13 Jul 2007 20:15:16 +0000 (20:15 +0000)]
resolve a compiler warning

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75077 65c4cc65-6c06-0410-ace0-fbb531ad65f3

15 years agoMerged revisions 75067 via svnmerge from
Russell Bryant [Fri, 13 Jul 2007 20:14:23 +0000 (20:14 +0000)]
Merged revisions 75067 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75067 | russell | 2007-07-13 15:10:40 -0500 (Fri, 13 Jul 2007) | 14 lines

Merged revisions 75059 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75059 | russell | 2007-07-13 15:07:21 -0500 (Fri, 13 Jul 2007) | 6 lines

Ensure that adding a user to the list of users of a specific music on hold
class is not done at the same time as any of the other operations on this list
to prevent list corruption.  Using the global moh_data lock for this is not
ideal, but it is what is used to protect these lists everywhere else in the
module, and I am only changing what is necessary to fix the bug.

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75075 65c4cc65-6c06-0410-ace0-fbb531ad65f3